ekisu / mpv-webm

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

[Question/feature request] mp4 support on the ffmpeg-support branch #51

Closed woolwood closed 5 years ago

woolwood commented 5 years ago

Are there plans to bring the ffmpeg-support branch up to feature parity with the main branch? I understand mp4 support is not a priority, since it's mpv-webm after all.

ekisu commented 5 years ago

Well, mp4 support shouldn't be a problem, however I don't plan to maintain the ffmpeg branch, as it's only better than just using mpv on a few cases (twopass is a pretty major one though, but I have no idea how to fix it in mpv).

That being said, is there any reason you want to use the ffmpeg branch? mp4 is supported on the master one.

woolwood commented 5 years ago

I originally wanted to try to edit the script to have it copy the audio stream, (like ffmpeg -c:a copy), which I know mpv can’t do. Though I haven't figured out how to make that work yet.

ekisu commented 5 years ago

You should be able to set @audioCodec = "copy" in src/formats/mp4.moon.

woolwood commented 5 years ago

Thank you, unfortunately the built script just seems to hang when I try, however.

ekisu commented 5 years ago

Do you mean it hangs up when you use the "copy" codec, or that the updated script just doesn't work?

woolwood commented 5 years ago

The former, there's no output printed to the terminal either, it just doesn't encode.

ekisu commented 5 years ago

Have you tried running with the -v flag? This might print more information.

woolwood commented 5 years ago

[webm_ffmpeg] Encoding to /home/adriaan/Videos/Film/Jamila, the Algerian/Jamila, the Algerian-[00.06.000-00.13.000]-audio.mp4 [webm_ffmpeg] Command line: mpv /home/adriaan/Videos/Film/Jamila, the Algerian/Jamila, the Algerian.avi --start=0:00:06.000 --end=0:00:13.000 --ovc=libx264 --oac=copy --loop-file=no --vid=1 --aid=1 --sid=no --sub-ass-override=yes --sub-auto=exact --vf-add=lavfi-crop=640:480:0:0 --ovcopts-add=b=2857k --ovcopts-add=crf=10 -o=/home/adriaan/Videos/Film/Jamila, the Algerian/Jamila, the Algerian-[00.06.000-00.13.000]-audio.mp4

woolwood commented 5 years ago

Using that flag made me realise it actually still just uses mpv for encoding, and mpv doesn't support copying streams. I thought ffmpeg handled it.

ekisu commented 5 years ago

Switch the backend to ffmpeg on the options, and remove the additional flags.

woolwood commented 5 years ago

Ah, I didn't realise the backend had to be switched manually! Thank you, it works now.