yt-dlc: merge video and audio. and convert video to mp4 ERROR
why --merge-output-format mp4 -f 278+249
ERROR: Stream #1:0 -> #0:1 (copy)
. for merge and convert to mp4?
URL https://www.youtube.com/watch?v=sVDDgrM6bIo&feature=youtu.be
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 30 (5 by maintainers)
Commits related to this issue
- [youtube] Improve channel syncid extraction to support ytcfg (#241) Authored by: colethedj — committed to siikamiika/yt-dlc by coletdjnz 3 years ago
I don’t know, but why don’t you use:
-f worstvideo[ext=mp4]+worstaudio[ext=m4a]/worst[ext=mp4]
Then it will never fail.
[Edit] I’m trying to help you and all you come up with is a thumbs down? Please explain.
@nicolaasjan Write your own postprocessing. Something like
youtube-dlc --exec "ffmpeg -i {} -preset fast -c:a copy {}.mp4" URL
Thanks, I forgot about that one. Must be my age…
This worked:
youtube-dl -v --ignore-config -f "worstvideo+worstaudio" --exec "ffmpeg -i {} -preset fast -c:a copy {}.mp4" https://youtu.be/FbNEvuaUabY
Besides this, I believe this whole issue here is not really a youtube-dlc one, but more related to ffmpeg itself…
That’s because of the compression values ffmpeg uses by default. See: https://trac.ffmpeg.org/wiki/Encode/H.264
For example it used a Constant Rate Factor (crf) of 23 in this case. If you want a smaller file size, you’ll have to try other options.
I downloaded the
.mkv
and managed to get a 21.5 MB.mp4
with this command: (renamed to 1.mkv for convenience)ffmpeg -i 1.mkv -preset fast -c:a copy 1.mp4
@pukkandan, Can such ffmpeg options be somehow incorporated in the youtube-dlc command?