A diesel-electric engine is a diesel generator, a diesel engine that drives an electric generator. The generator feeds electric power to an electric motor which turns a driveshaft. Its efficiency is higher than when an engine drives a shaft through gears. Most locomotives and many ships use diesel-electric drive.
Many diesel-electric drives, especially small ones, store the electricity in a battery. Some designs also store braking energy in a flywheel, which can also charge a battery. However, these add even more complexity and weight to the vehicle, so are more appropriate for city driving where service stations are always available and there is much stop and go driving.
Because they do not require any change or investment in stations nor much in vehicle design, diesel-electric vehicles are believed to be the most likely replacement for today's internal combustion engine. When properly tuned, they have low emissions and they use only about one-third of the fossil fuel of most gasoline engines powering similar vehicles.
Honda and Toyota are presently delivering consumer priced diesel-electric cars. By contrast, hydrogen infrastructure is thought to be decades off, and is not fully implemented even in Iceland where there is abundant free geothermal electricity.
In countries like India, government is focusing on fully electric trains rather than diesel electric. That too electricity will be produced by renewable sources like Solar.
Many activists feel that promoting hydrogen is a stall, a way to avoid forcing the shift to diesel-electric vehicles in the nearer term.