Closed jgreco closed 6 years ago
Please post logs.
Log snippets: https://gist.github.com/jgreco/2e8a861f60c7943768b5c233a29fea2b
When logging the 90degree rotation scenario that causes it to hang, after killing one of the mpv processes it spammed my log with 90MB of this in a few seconds:
[ 69.190][v][webm] [ao/lavc] not ready yet for encoding audio
[ 69.190][v][webm] [ao/lavc] Audio device returned broken buffer state (sent 12032 samples, got 0 samples, 12032 period)!
[ 69.190][v][webm] [ao/lavc] Audio output is reporting incorrect buffer status.
[ 69.190][v][webm] [encode-lavc] Called a function on a failed encoding context. Bailing out.
but I'm guessing that's unrelated.
I also tried rotating the video 180 degrees so it would have the same horizontal and vertical dimensions, and the encode completed successfully.
Hmm, I see. The code attempts to crop on the rotated video, however does not rotate on the encode (pretty much what you figured out).
[ 69.190][v][webm] [ffmpeg] filter: Invalid too big or non positive size for width '720' or height '1280'
[ 69.190][v][webm] [ffmpeg] filter: Failed to configure input pad on filter
Hopefully just adding the corresponding video-rotate
flag should solve it then. I'll look at it when I have some time.
video-rotate
is now supported, however, when I attempted this on the old version, I didn't find the error you've described (hanging and Bailing out...
spam), it just encoded without rotating. Did you update your mpv? There was a big commit that changed lots of encoding code.
Log for reference: encode_no_video_rotate.txt
mpv version
mpv 0.28.2
Description
I set video-rotate to 90 and expected the output webm to be rotated. Instead, the encoding process (mpv, not ffmpeg) started using 100% of one of my cores and failed to terminate.
If I try cropping the video such that the cropped region would be in bounds no matter which way the video is rotated then the encoding process no longer hangs, however the resultant webm is not rotated.
It would be nice if video-rotate would apply to the output webm. I'm not sure if that's feasible, but if not maybe have mpv-webm simply abort the encode with an error message if video-rotate is set?