yt-dlc
yt-dlc copied to clipboard
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
And when you leave out the &feature=youtu.be
part of the URL?
Works here:
youtube-dlc -v --ignore-config --merge-output-format mp4 -f 278+249 https://www.youtube.com/watch?v=sVDDgrM6bIo
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config', '--merge-output-format', 'mp4', '-f', '278+249', 'https://www.youtube.com/watch?v=sVDDgrM6bIo']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dlc version 2020.11.17
[debug] Python version 3.6.9 (CPython) - Linux-4.15.0-124-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-99932-g17a0dfe-Nico-20201118, ffprobe N-99932-g17a0dfe-Nico-20201118
[debug] Proxy map: {}
[youtube] sVDDgrM6bIo: Downloading webpage
[debug] Invoking downloader on 'https://r3---sn-5hnedn7z.googlevideo.com/videoplayback?expire=1605802753&ei=oUa2X_zMCIqI-gb--674DA&ip=<REDACTED>&id=o-AMgjDw-geBAlDcst7eBVRLEh2SCbJB59D0Ye8VKdF38z&itag=278&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-5hnedn7z%2Csn-5hne6ns6&ms=au%2Crdu&mv=m&mvi=3&pl=15&initcwndbps=1773750&vprv=1&mime=video%2Fwebm&gir=yes&clen=9564173&dur=1389.763&lmt=1541357484934916&mt=1605780998&fvip=3&keepalive=yes&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgGqbmbZatO7_UTgFoEbm4HOG_GaXNe5qOpmnuuSAgLm4CIQDee4b2YwLr_Djg09tOXMWvy5_P7fk_LdbWEskGEH7T_g%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgOusnWL5AZaU7ZukLRKT9Y-rus1NK54KXwUccYfMB7vcCIQClnPvRt8Yf2df3YcW5mPqQVb_51wnyfO_LY5cr-tAKlQ%3D%3D&ratebypass=yes'
[download] Destination: MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español-sVDDgrM6bIo.f278.webm
[download] 100% of 9.12MiB in 00:01
[debug] Invoking downloader on 'https://r3---sn-5hnedn7z.googlevideo.com/videoplayback?expire=1605802753&ei=oUa2X_zMCIqI-gb--674DA&ip=<REDACTED>&id=o-AMgjDw-geBAlDcst7eBVRLEh2SCbJB59D0Ye8VKdF38z&itag=249&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-5hnedn7z%2Csn-5hne6ns6&ms=au%2Crdu&mv=m&mvi=3&pl=15&initcwndbps=1773750&vprv=1&mime=audio%2Fwebm&gir=yes&clen=8290580&dur=1389.781&lmt=1541357849868605&mt=1605780998&fvip=3&keepalive=yes&c=WEB&txp=5411222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgYut3ZBOyAIjAr2qGsXpHd5tJ7c0W2UvamJ3WuUYRwr4CIQCHg1U5lJjWrmyQfhkX2tQ7U9Okii_hfLf7b4KvcQK1Ow%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgOusnWL5AZaU7ZukLRKT9Y-rus1NK54KXwUccYfMB7vcCIQClnPvRt8Yf2df3YcW5mPqQVb_51wnyfO_LY5cr-tAKlQ%3D%3D&ratebypass=yes'
[download] Destination: MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español-sVDDgrM6bIo.f249.webm
[download] 100% of 7.91MiB in 00:01
[ffmpeg] Merging formats into "MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español-sVDDgrM6bIo.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español-sVDDgrM6bIo.f278.webm' -i 'file:MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español-sVDDgrM6bIo.f249.webm' -c copy -map 0:v:0 -map 1:a:0 'file:MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español-sVDDgrM6bIo.temp.mp4'
Deleting original file MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español-sVDDgrM6bIo.f278.webm (pass -k to keep)
Deleting original file MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español-sVDDgrM6bIo.f249.webm (pass -k to keep)
how to merge and convert to mp4 without temp.mp4 and ERROR: Stream #1:0 -> #0:1 (copy)
?
how to merge and convert to mp4 without temp.mp4
Don't know if that's possible... What's the problem with having a temporary file created? Maybe that's part of the process; I don't know. Maybe @blackjack4494 knows...
and
ERROR: Stream #1:0 -> #0:1 (copy)
?
No idea...
It would be very helpful, if you posted the full --verbose
(-v
) output here (between code tags), like I did above.
youtube-dlc -v --merge-output-format mp4 -f 278+249 https://www.youtube.com/watch?v=sVDDgrM6bIo
and
ERROR: Stream #1:0 -> #0:1 (copy)
?
Maybe your ffmpeg version is too old and lacks support for some codec YouTube uses (wild guess).
@candrapersada Please provide the verbose log. We can't do anything to help you without it
youtube-dlc --newline -i --hls-prefer-native -o /media/candra/TOSHIBA/Game/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s --merge-output-format mp4 -v -f worstvideo+worstaudio https://www.youtube.com/watch?v=sVDDgrM6bIo
[debug] Loading archive file None
[youtube] sVDDgrM6bIo: Downloading webpage
[debug] Invoking downloader on 'https://r3---sn-2uuxa3vh-n0cl.googlevideo.com/videoplayback?expire=1605810196&ei=tGO2X4ytKJS-vASwxIeYAQ&ip=125.164.58.158&id=o-APBZdTZ4FZ-VXAc4C44XlQMJZ-GSEz0zA7Kopi9XXL_1&itag=278&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-2uuxa3vh-n0cl%2Csn-npoe7n76&ms=au%2Crdu&mv=m&mvi=3&pl=20&pcm2=yes&initcwndbps=240000&vprv=1&mime=video%2Fwebm&gir=yes&clen=9564173&dur=1389.763&lmt=1541357484934916&mt=1605788444&fvip=3&keepalive=yes&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cpcm2%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgF-7Ut-7jAGhOR7g5y6y7anDscSuN9otFQtu-BHTOjO4CIEQYbfG1XYCBsucF1qRxOqUpOjoOJTzrNaLg-TaP0MTb&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIw-mo9ObMMoJbLqeIdJPQs1Y2yPr3DSovJpCK9qU80iAiEAjSOeMGr-uQrMK8hU4_ZIK1OxfUv8JSL67LFP4JZnhy0%3D&ratebypass=yes'
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f278.webm
[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f278.webm
[download] 100% of 9.12MiB in 01:37
[debug] Invoking downloader on 'https://r3---sn-2uuxa3vh-n0cl.googlevideo.com/videoplayback?expire=1605810196&ei=tGO2X4ytKJS-vASwxIeYAQ&ip=125.164.58.158&id=o-APBZdTZ4FZ-VXAc4C44XlQMJZ-GSEz0zA7Kopi9XXL_1&itag=249&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-2uuxa3vh-n0cl%2Csn-npoe7n76&ms=au%2Crdu&mv=m&mvi=3&pl=20&pcm2=yes&initcwndbps=240000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=8290580&dur=1389.781&lmt=1541357849868605&mt=1605788444&fvip=3&keepalive=yes&c=WEB&txp=5411222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cpcm2%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAOBO0mMDuKe95Q-PA0SD1rjroh0pMKXmZg5vU8R4GVn0AiEA_x2hSX4slYRn5ukstlCyKKK5LQbFpbQAlz536n_Kllc%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIw-mo9ObMMoJbLqeIdJPQs1Y2yPr3DSovJpCK9qU80iAiEAjSOeMGr-uQrMK8hU4_ZIK1OxfUv8JSL67LFP4JZnhy0%3D&ratebypass=yes'
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f249.webm
[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f249.webm
[download] 100% of 7.91MiB in 01:28
[ffmpeg] Merging formats into "/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.f278.webm' -i 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.f249.webm' -c copy -map 0:v:0 -map 1:a:0 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.temp.mp4'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', '/media/candra/TOSHIBA/Game/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s', '--merge-output-format', 'mp4', '-v', '-f', 'worstvideo+worstaudio', 'https://www.youtube.com/watch?v=sVDDgrM6bIo']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-54-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: ()
ERROR: Stream #1:0 -> #0:1 (copy)
Traceback (most recent call last):
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 551, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Stream #1:0 -> #0:1 (copy)youtube-dlc --newline -i --hls-prefer-native -o /media/candra/TOSHIBA/Game/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s --merge-output-format mp4 -v -f worstvideo+worstaudio https://www.youtube.com/watch?v=sVDDgrM6bIo
[debug] Loading archive file None
[youtube] sVDDgrM6bIo: Downloading webpage
[debug] Invoking downloader on 'https://r3---sn-2uuxa3vh-n0cl.googlevideo.com/videoplayback?expire=1605810196&ei=tGO2X4ytKJS-vASwxIeYAQ&ip=125.164.58.158&id=o-APBZdTZ4FZ-VXAc4C44XlQMJZ-GSEz0zA7Kopi9XXL_1&itag=278&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-2uuxa3vh-n0cl%2Csn-npoe7n76&ms=au%2Crdu&mv=m&mvi=3&pl=20&pcm2=yes&initcwndbps=240000&vprv=1&mime=video%2Fwebm&gir=yes&clen=9564173&dur=1389.763&lmt=1541357484934916&mt=1605788444&fvip=3&keepalive=yes&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cpcm2%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgF-7Ut-7jAGhOR7g5y6y7anDscSuN9otFQtu-BHTOjO4CIEQYbfG1XYCBsucF1qRxOqUpOjoOJTzrNaLg-TaP0MTb&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIw-mo9ObMMoJbLqeIdJPQs1Y2yPr3DSovJpCK9qU80iAiEAjSOeMGr-uQrMK8hU4_ZIK1OxfUv8JSL67LFP4JZnhy0%3D&ratebypass=yes'
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f278.webm
[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f278.webm
[download] 100% of 9.12MiB in 01:37
[debug] Invoking downloader on 'https://r3---sn-2uuxa3vh-n0cl.googlevideo.com/videoplayback?expire=1605810196&ei=tGO2X4ytKJS-vASwxIeYAQ&ip=125.164.58.158&id=o-APBZdTZ4FZ-VXAc4C44XlQMJZ-GSEz0zA7Kopi9XXL_1&itag=249&source=youtube&requiressl=yes&mh=Sk&mm=31%2C29&mn=sn-2uuxa3vh-n0cl%2Csn-npoe7n76&ms=au%2Crdu&mv=m&mvi=3&pl=20&pcm2=yes&initcwndbps=240000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=8290580&dur=1389.781&lmt=1541357849868605&mt=1605788444&fvip=3&keepalive=yes&c=WEB&txp=5411222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cpcm2%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAOBO0mMDuKe95Q-PA0SD1rjroh0pMKXmZg5vU8R4GVn0AiEA_x2hSX4slYRn5ukstlCyKKK5LQbFpbQAlz536n_Kllc%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIw-mo9ObMMoJbLqeIdJPQs1Y2yPr3DSovJpCK9qU80iAiEAjSOeMGr-uQrMK8hU4_ZIK1OxfUv8JSL67LFP4JZnhy0%3D&ratebypass=yes'
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f249.webm
[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: /media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.f249.webm
[download] 100% of 7.91MiB in 01:28
[ffmpeg] Merging formats into "/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream 'Duo' Capitulo 1 Sub Español.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.f278.webm' -i 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.f249.webm' -c copy -map 0:v:0 -map 1:a:0 'file:/media/candra/TOSHIBA/Game/NA/NA - MegaMan_RockMan.EXE Stream '"'"'Duo'"'"' Capitulo 1 Sub Español.temp.mp4'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', '/media/candra/TOSHIBA/Game/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s', '--merge-output-format', 'mp4', '-v', '-f', 'worstvideo+worstaudio', 'https://www.youtube.com/watch?v=sVDDgrM6bIo']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-54-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: ()
ERROR: Stream #1:0 -> #0:1 (copy)
Traceback (most recent call last):
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 551, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Stream #1:0 -> #0:1 (copy)
You can at least try with a new ffmpeg version and see if the problem persists. 4.3.1 is the latest stable version. But you can safely use the git master version as well.
I can download fine here with the build I compiled myself yesterday.
A 18.1 MB .mp4
file with opus
audio and vp9
video.
(opus in .mp4
support was experimental in the past)
how to use git master version for windows?
how to use git master version for windows?
Here you go:
https://www.gyan.dev/ffmpeg/builds/
You can use the git essentials
version.
Direct link:
https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z
Put ffmpeg.exe
and ffprobe.exe
(from the \bin
folder in the .7z
file) in the folder where youtube-dlc.exe
is.
By the way, did you manage to download on Linux without error now?
yes
yes
Good! I think that you can close the issue now. :)
can or not use ffmpeg-python?
why Conversion failed?
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', '/home/candra/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s', '--merge-output-format', 'mp4', '-f', 'worstvideo+worstaudio', '-v', '--ffmpeg-location', '/media/candra/Game/FFmpeg/ffmpeg', 'https://www.youtube.com/watch?v=FbNEvuaUabY']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-54-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg N-54874-ga1553b0cfb-static, ffprobe N-54874-ga1553b0cfb-static
[debug] Proxy map: ()
ERROR: Conversion failed!
Traceback (most recent call last):
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 551, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
why Conversion failed?
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', '/home/candra/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s', '--merge-output-format', 'mp4', '-f', 'worstvideo+worstaudio', '-v', '--ffmpeg-location', '/media/candra/Game/FFmpeg/ffmpeg', 'https://www.youtube.com/watch?v=FbNEvuaUabY']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-54-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg N-54874-ga1553b0cfb-static, ffprobe N-54874-ga1553b0cfb-static
[debug] Proxy map: ()
ERROR: Conversion failed!
Traceback (most recent call last):
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 551, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/home/candra/.local/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
It only works here without --merge-output-format mp4
.
Then it will be saved as .mkv
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
With --merge-output-format mp4
it fails with the same error you had.
This however works:
youtube-dlc --ignore-config -v -f worstvideo[ext=mp4]+worstaudio --merge-output-format mp4 https://www.youtube.com/watch?v=FbNEvuaUabY
It only works here without --merge-output-format mp4. Then it will be saved as .mkv
how to auto --merge-output-format mp4
or without --merge-output-format mp4
for youtube playlist?
--merge-output-format mp4
attempts to merge the video and audio into the specified container without re-encoding. If you try to do this with formats that are not supported by the mp4 container, ffmpeg will throw an error.
If you want to ensure that the downloaded formats is compatible with mp4, use -f worstvideo[ext=mp4]+worstaudio[ext=m4a]/worst[ext=mp4]
.
Or, instead if you want to remux the video into mp4, use --remux-video mp4
instead of --merge-output-format
. Note that this will take more time to complete.
Or, instead if you want to remux the video into mp4, use --remux-video mp4 instead of --merge-output-format. Note that this will take more time to complete.
why are there two files mkv and mp4 not one? --remux-video mp4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', 'C:/Users/Candra Persada/Downloads/Music/%(title)s.%(ext)s', '-f', 'worstvideo+worstaudio', '--remux-video', 'mp4', '-v', 'https://youtu.be/FbNEvuaUabY']
[debug] Encodings: locale cp1252, fs utf-8, out cp1252, pref cp1252
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.3 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3, ffprobe 4.3, rtmpdump 2.4
[debug] Proxy map: ()
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
ERROR: Conversion failed!
Traceback (most recent call last):
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 366, in run
self.run_ffmpeg(path, outpath, options)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 239, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
and how to Automatically delete mp4 if the Conversion failed.
It is working fine for me with ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev
. Try updating your ffmpeg to 4.3.1
It is working fine for me with
ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev
. Try updating your ffmpeg to4.3.1
it's still the same. Conversion failed
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--hls-prefer-native', '-o', 'D:/grub-backup/%(title)s.%(ext)s', '-f', 'worstvideo+worstaudio', '--remux-video', 'mp4', '-v', 'https://youtu.be/FbNEvuaUabY']
[debug] Encodings: locale cp1252, fs utf-8, out cp1252, pref cp1252
[debug] youtube-dlc version 2020.11.11-3
[debug] Python version 3.8.3 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev, rtmpdump 2.4
[debug] Proxy map: ()
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
ERROR: Conversion failed!
Traceback (most recent call last):
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/YoutubeDL.py", line 2150, in post_process
files_to_delete, info = pp.run(info)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 366, in run
self.run_ffmpeg(path, outpath, options)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 239, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "D:/tartube portable/mingw64/lib/python3.8/site-packages/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
and there two files mkv and mp4 not one.
I assume the mp4 is 0 bytes and result of previous failures. Try deleting it.
Fails here as well...
All I get is a small 98.6 KB mp4 file (duration 5 s 366 ms).
Ffmpeg compiled myself recently.
But I see it does -c copy
, which will not work.
youtube-dl -v --ignore-config -f "worstvideo+worstaudio" --remux-video mp4 https://youtu.be/FbNEvuaUabY
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config', '-f', 'worstvideo+worstaudio', '--remux-video', 'mp4', 'https://youtu.be/FbNEvuaUabY']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dlc version 2020.11.17
[debug] Python version 3.6.9 (CPython) - Linux-4.15.0-124-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-99932-g17a0dfe-Nico-20201118, ffprobe N-99932-g17a0dfe-Nico-20201118
[debug] Proxy map: {}
[youtube] FbNEvuaUabY: Downloading webpage
[youtube] FbNEvuaUabY: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/dash/expire/1606338372/ei/5HK-X_j_Mcie1gKPvLL4Cg/ip/<REDACTED>/id/15b344bee69469b6/source/youtube/requiressl/yes/playback_host/r6---sn-5hnedn7l.googlevideo.com/mh/Zy/mm/31%2C29/mn/sn-5hnedn7l%2Csn-5hne6n7s/ms/au%2Crdu/mv/m/mvi/6/pl/15/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1921250/vprv/1/mt/1606316451/fvip/6/keepalive/yes/beids/9466585/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRgIhAKT2105987XbNf4zmXoyr0-1VMGyoXG-T_u3lM4L4nPjAiEApOunNMCvpcRswrsb8Tlf128XGpF8PjCN3oskPUfixKE%3D/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3C_xAwRQIhAIX7XPWzaNMYpXFqkOBFsyy9P32pa7Ylq4L6RerqadOjAiBU-qvKEthzGAo1h8o9oIZh-cJ4vkP71RI0aEodPzMRnw%3D%3D'
[dashsegments] Total fragments: 236
[download] Destination: #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f278.webm
[download] 100% of 13.16MiB in 00:33
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/dash/expire/1606338372/ei/5HK-X_j_Mcie1gKPvLL4Cg/ip/<REDACTED>/id/15b344bee69469b6/source/youtube/requiressl/yes/playback_host/r6---sn-5hnedn7l.googlevideo.com/mh/Zy/mm/31%2C29/mn/sn-5hnedn7l%2Csn-5hne6n7s/ms/au%2Crdu/mv/m/mvi/6/pl/15/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1921250/vprv/1/mt/1606316451/fvip/6/keepalive/yes/beids/9466585/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRgIhAKT2105987XbNf4zmXoyr0-1VMGyoXG-T_u3lM4L4nPjAiEApOunNMCvpcRswrsb8Tlf128XGpF8PjCN3oskPUfixKE%3D/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3C_xAwRQIhAIX7XPWzaNMYpXFqkOBFsyy9P32pa7Ylq4L6RerqadOjAiBU-qvKEthzGAo1h8o9oIZh-cJ4vkP71RI0aEodPzMRnw%3D%3D'
[dashsegments] Total fragments: 126
[download] Destination: #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f139.m4a
[download] 100% of 7.25MiB in 00:08
[ffmpeg] Merging formats into "#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f278.webm' -i 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f139.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.temp.mkv'
Deleting original file #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f278.webm (pass -k to keep)
Deleting original file #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.f139.m4a (pass -k to keep)
[ffmpeg] Remuxing video from mkv to mp4, Destination: #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mkv' -c copy 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mp4'
ERROR: Conversion failed!
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dlc/YoutubeDL.py", line 2166, in post_process
files_to_delete, info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dlc/postprocessor/ffmpeg.py", line 366, in run
self.run_ffmpeg(path, outpath, options)
File "/usr/local/bin/youtube-dl/youtube_dlc/postprocessor/ffmpeg.py", line 239, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "/usr/local/bin/youtube-dl/youtube_dlc/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
However with --recode-video mp4
it works:
[ffmpeg] Converting video from mkv to mp4, Destination: #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mkv' 'file:#4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mp4'
Deleting original file #4【実況】FINAL FANTASY IV THE AFTER YEARS【PSP】-FbNEvuaUabY.mkv (pass -k to keep)
However with
--recode-video mp4
it works:
but why the file size increased to 32,8 MB from 20,4 MB?
but why the file size increased to 32,8 MB from 20,4 MB?
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?
Fails here as well... All I get is a small 98.6 KB mp4 file (duration 5 s 366 ms).
and how to Automatically delete mp4 if the Conversion failed?
and how to Automatically delete mp4 if the Conversion failed?
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
@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...
Fails here as well... All I get is a small 98.6 KB mp4 file (duration 5 s 366 ms).
how to auto delete if convert to fails? for --remux-video mp4
98.6 KB mp4 file (duration 5 s 366 ms).