lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
543 stars 24 forks source link

ask-ffmpeg-log failing on some log files #126

Closed martinpickett closed 2 years ago

martinpickett commented 2 years ago

ask-ffmpeg-log fails to report an encoding fps or encoding time for some log files. I have taken a quick look and I cannot see anything obviously wrong, but the three log files I have which it fails on are all for short video inputs.

Below are the three log files which fail: Banana (2010).mkv.log Home Makeover (2010).mkv.log Orientation Day (2010).mkv.log

Plus one transcoded in the same batch which works: Despicable Me (2010).mkv.log

For the avoidance of doubt, all four videos look great and there were no errors whilst transcoding. It is just ask-ffmpeg-log which is failing.

lisamelton commented 2 years ago

@martinpickett Great find, sir! 👍 And I now have a fix.

Here's the bug: the regular expression I'm using to match the frame count for the video was not taking into account that there could be a space between frame= and the actual number of frames. And ffmpeg sets the minimum width of the count to five digits and pads it on the left side with spaces. D'oh!

Obviously, this bug manifests itself only on videos with very short frame counts. Just like the short videos you transcoded.

Anyway, I'll have the fix checked in later today.

Thanks again for finding this!

lisamelton commented 2 years ago

@martinpickett OK, the change is checked in! Please try it out and let me know if everything is still working.

martinpickett commented 2 years ago

Thanks! It now works as intended.