ekisu / mpv-webm

Simple WebM maker for mpv, with no external dependencies.
MIT License
556 stars 33 forks source link

Encode freezes with certain files when audio is enabled #87

Open ekisu opened 4 years ago

ekisu commented 4 years ago

pasting here so that it doesnt get into the limbo yaaay

76321609 (You) Well the gist is like this: Trying to encode "bad" videos with audio will freeze the encoding at random points. By bad videos I mean videos that throw up such error when scanned with ffmpeg for errors: Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2893 >= 2893 Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2897 >= 2897 Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2901 >= 29013 When encoding such videos with webm-script and audio active, encoding freezes and console gets flooded with such errors: [webm] "[ao/lavc] audio frame pts went backwards (2375952 <- 49499), autofixed" [webm] "[ao/lavc] audio frame pts went backwards (2376000 <- 49500), autofixed" [webm] "[ao/lavc] audio frame pts went backwards (2376048 <- 49501), autofixed" If audio is muted, encoding seem to pass successfully 100% of the time. However sometimes for whatever reason encoding will pass even with audio active when you encode the same video portion. Most likely caused by mpv commits pushed in response to this issue: https://github.com/mpv-player/mpv/issues/7524 Older builds of mpv, before those commits, encode bad video files with your script just fine. Last working build is mpv 0.32.0-288-gee70e8ce50 so anything newer will likely freeze during encoding stage of bad files. Example file would be Blade.Runner.2049.2017.1080p.BluRay.x265-RARBG.mp4 76321028 (You) i've noticed the encodes were a lot slower than what they used to though, not sure if its related Yeah I get this feeling too, it feels like encoding is faster on older mpv builds e.g. the one I mentioned. Could be related to those commits from 7524 too.

ekisu commented 4 years ago

couldn't reproduce 😔

ghost commented 3 years ago

This sounds relevant to the issue I had a few days ago. I tried to create a webm from Beatrice-Raws' encode of Kizumonogatari and it permanently froze the player. I had to turn off the audio in mpv to create a webm.