Closed andimachovec closed 2 years ago
Progress bar not equal to actual progress. See attached screenshot, encode is finished, but progress bar at 6%
That's interesting 😀. Never happened during my test runs. Can you upload the video somewhere for me?
And the ffmpeg output from the output tab would be very interesting too.
Seems to happen when the video file is truncated or otherwise damaged and the duration detected by ffmpeg doesn´t match the actual duration. Will have to investigate further ;-)
The file I used was a .mov file from Train's Drops of Jupiter CD. The playback of the resulting file seems to be playing at the wrong frame rate as well. Likely means it had a non standard frame rate to begin with. I'll play around with the settings when i get time.
After fairly extensive testing I'm pretty sure that my progress detection code is correct, as long as ffmpeg is running without errors. Everytime the progress bar isn't displaying correct results I have errors in the ffmpeg output. But ffmpeg itself still exits with return code 0 so ffmpegGUI thinks everything is alright. I've searched for ffmpeg options to change the behaviour (fail with a non zero exit code when an error occurs) but so far found nothing.
Maybe add a case that if ffmpeg exits with a 0 && the progress bar didn't reach 100%, just have it jump to 100%? Maybe print a warning text to the output indicating something happened?
Yeah I thought of that too but I´ve pursued a different (and in my view better) solution that checks the ffmpeg output for errors and stops the encoding process if an encoding error occurs. You can check it out from the progressbar_test branch from my repo.
@andimachovec , I checked your progressbar_test branch and it seems to be working nicely.
I checked your progressbar_test branch and it seems to be working nicely.
That´s great. I´m currently on vacation, when I get home I´ll do some more testing, clean up the code and add the changes to this PR.
I've merged the changes from progressbar test into the progressbar branch and pushed them to be added to this PR.
and cleaned up the leftover lines from editing with Pe in the Makefile
added a progress bar to indicate the progress of the video encoding. The progress percentage is calculated from the time and duration values in the ffmpeg output.