Open stephane-archer opened 4 months ago
Or ask for .mkv and sort out any desired conversion locally. Or pass additional ffmpeg arguments to force transcoding during the merge step (may fall into the category of "possible but inadvisable").
The message vp9 only supported in MP4
from ffmpeg is misleading. MP4 and MOV are technically similar containers, so the same muxer code handles both, but they support different content types. The message lacks the introductory context "Out of the two major container formats that this code implements, ...".
why would it be in the category of "possible but inadvisable"?
otherwise my next command would be ffmpeg -i downloadedvideo.mkv output.mov
because my next program can't read mkv
can your next program read mp4?
--merge-output mp4 --remux mp4
should work in most cases
or if you only want to download codecs that are supported by the mov container:
-S vcodec:h264,res,acodec:aac --merge-output mov --remux mov
@bashonly the next program is final cut: https://support.apple.com/en-gb/guide/final-cut-pro/ver2833f855/mac
so it supports the mp4 container but not the vp9 codec, (h265 works)
Does this next line make sense to get the best quality with a compatible format?
is there a way to sort formats for video and audio separately?
-S vcodec:h265,vcodec:h264,quality,res,acodec:aac --merge-output mov --remux mov
vcodec:h265,vcodec:h264
is not valid syntax
youtube doesn't serve h265 anyways, so I think -S vcodec:h264,res,acodec:aac --merge-output mov --remux mov
should be enough
@bashonly what about:
yt-dlp -f 'bestvideo*[vcodec*=avc1]+bestaudio[acodec*=mp4a]' --merge-output mov $argv
is it better to use -f
or -S
?
It's better to use -S
. Format sorting is "smart" and knows that h264 == avc == avc1, etc. With -f
you need to be exact, and the representation of the codec can vary from site to site.
@bashonly Moving back to the original subject of the opened issue, does yt-dlp --recode mov
always transcode, or is able to remux compatible format with the target container?
--recode
will always re-encode. --remux
will losslessly remux; but it only works if the codecs are compatible with the target container. Re-encoding can change the codec+container; remuxing can only change the container.
so we can imagine an option like: --smart-recode
or the fact of using --recode
and --remux
at the same time should avoid useless re-encode?
Related: #7607
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Provide a description that is worded well enough to be understood
Can you add an option to not only remux but transcode if the target container doesn't support the current format?
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output