cmxl / FFmpeg.NET

.NET wrapper for common ffmpeg tasks
MIT License
611 stars 99 forks source link

Support for totalDuration metadata from network inputs #54

Closed faldor20 closed 3 years ago

faldor20 commented 3 years ago

Description:

Include in the OnProgressChanged event args an object containing data supplied by ffmpeg's startup logging, Specifically this line :

Duration: 00:05:34.08, start: 0.000000, bitrate: 1530 kb/s 

The MediaInfo replaces the current totalDuration value that doesn't work much of the time. The current value reports 00:00:00 when the source is accessed by ftp/http or when the engine is started using custom args by calling Execute I am unsure if my technique of getting the data from the ffmpeg stdout logging has any downsides, but as far as I can see it works well.

Perhaps MediaInfo should be renamed to ClipInfo? Thoughts?

faldor20 commented 3 years ago

I just removed a few lines that snuck in from something else I was testing.