Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video+audio merge failed on a system with older FFmpeg version (regression) #20344

Open
nachanon opened this issue Mar 14, 2019 · 2 comments
Open

Comments

@nachanon
Copy link

nachanon commented Mar 14, 2019

This is a recent regression on post-processing, very similar to bug #19067, likely originated from the same root cause.

After upgraded YouTube-DL to current version, I was trying to to download a video from YouTube in 480p H.264 video resolution, combined with 128kbps AAC audio. Note that I have been successfully using the remuxing feature of YouTube-DL on this system before...

Video URL: https://www.youtube.com/watch?v=ueoRSzCn4kA

With the format specified as 135+140, both video and audio downloads completed successfully, but the process failed with a cryptic ERROR: "debug" message at the part where a remuxer would have to run to combine video and audio into a single file (in this case, FFmpeg is the remuxer)...

C>youtube-dl --no-mtime --no-part --format 135+140 --verbose -o ueoRSzCn4kA.480p+m4a128k.mp4 https://www.youtube.com/watch?v=ueoRSzCn4kA
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--no-mtime', '--no-part', '--format', '135+140', '--verbose', '-o', 'ueoRSzCn4kA.480p+m4a128k.mp4', 'https://www.youtube.com/watch?v=ueoRSzCn4kA']
[debug] Encodings: locale cp874, fs mbcs, out cp874, pref cp874
[debug] youtube-dl version 2019.03.09
[debug] Python version 3.4.4 (CPython) - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-49610-gc2dd5a1, ffprobe N-49610-gc2dd5a1
[debug] Proxy map: {}
[youtube] ueoRSzCn4kA: Downloading webpage
[youtube] ueoRSzCn4kA: Downloading video info webpage
[debug] Invoking downloader on 'https://r6---sn-j5u-c33e7.googlevideo.com/videoplayback?mm=31%2C29&mn=sn-j5u-c33e7%2Csn-npoe7n7z&id=o-AJshA2WSiwvN3c9mNYrwKtfz_UkOeXPdLIKb5rdSXbiz&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ip=159.192.218.249&key=yt6&mt=1552548229&txp=5533432&mv=m&gir=yes&ms=au%2Crdu&clen=123497437&ipbits=0&initcwndbps=1016250&signature=16B2AEC6318BE3AA1E0E141D389E18CC7961F38A.7C49C5D9A62B83A7AB5BD42B9F4043B0327F4878&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&c=WEB&expire=1552569962&mime=video%2Fmp4&dur=1458.080&itag=135&pl=24&source=youtube&keepalive=yes&requiressl=yes&lmt=1540146743788782&ei=CQKKXIX_PPzOz7sPzeStgAI&fvip=6&ratebypass=yes'
[download] Destination: ueoRSzCn4kA.480p+m4a128k.f135.mp4
...
[download] 100% of 117.78MiB in 00:15                          
[debug] Invoking downloader on 'https://r6---sn-j5u-c33e7.googlevideo.com/videoplayback?mm=31%2C29&mn=sn-j5u-c33e7%2Csn-npoe7n7z&id=o-AJshA2WSiwvN3c9mNYrwKtfz_UkOeXPdLIKb5rdSXbiz&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ip=159.192.218.249&key=yt6&mt=1552548229&txp=5533432&mv=m&gir=yes&ms=au%2Crdu&clen=23599223&ipbits=0&initcwndbps=1016250&signature=A87DBAA154F683AFFB3F1C7EFC64CBD0DBF2E214.6D5FFF49467B4B6F03E38584CF41535AD88900A8&c=WEB&expire=1552569962&mime=audio%2Fmp4&dur=1458.143&itag=140&pl=24&source=youtube&keepalive=yes&requiressl=yes&lmt=1540145719628694&ei=CQKKXIX_PPzOz7sPzeStgAI&fvip=6&ratebypass=yes'
[download] Destination: ueoRSzCn4kA.480p+m4a128k.mp4.f140
...
[download] 100% of 22.51MiB in 00:03                          
[ffmpeg] Merging formats into "ueoRSzCn4kA.480p+m4a128k.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:ueoRSzCn4kA.480p+m4a128k.f135.mp4" -i "file:ueoRSzCn4kA.480p+m4a128k.mp4.f140" -c copy -map "0:v:0" -map "1:a:0" "file:ueoRSzCn4kA.480p+m4a128k.temp.mp4"
ERROR: "debug"
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 2052, in post_process
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\postprocessor\ffmpeg.py", line 512, in run
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\postprocessor\ffmpeg.py", line 235, in run_ffmpeg_multiple_files
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: "debug"

C>echo %ERRORLEVEL%
1

Directly running the FFmpeg command shown in Youtube-DL log resulted in an error message, with exit code 1:

C>ffmpeg -y -loglevel "repeat+info" -i "file:ueoRSzCn4kA.480p+m4a128k.f135.mp4" -i "file:ueoRSzCn4kA.480p+m4a128k.mp4.f140" -c copy -map "0:v:0" -map "1:a:0" "file:ueoRSzCn4kA.480p+m4a128k.temp.mp4"
Invalid loglevel "repeat+info". Possible levels are numbers or:
"quiet"
"panic"
"fatal"
"error"
"warning"
"info"
"verbose"
"debug"

C>echo %ERRORLEVEL%
1

From the changelog in releases page, this problem seems to be rooted from pull #19025 (introduced in release 2019.01.30). The pull request added -loglevel "repeat+info" parameter to FFmpeg command line without checking whether it was supported by the FFmpeg version in use or not.

Running the same FFmpeg command line, without the problematic -loglevel "repeat+info" part, resulted in a successful remux and a watchable file; the remuxer also exited with code 0:

C>ffmpeg -y -i "file:ueoRSzCn4kA.480p+m4a128k.f135.mp4" -i "file:ueoRSzCn4kA.480p+m4a128k.mp4.f140" -c copy -map "0:v:0" -map "1:a:0" "file:ueoRSzCn4kA.480p+m4a128k.temp.mp4"
...
frame=36452 fps=464 q=-1.0 size=  142867kB time=00:24:16.10 bitrate= 803.8kbits/s
frame=36452 fps=464 q=-1.0 Lsize=  144068kB time=00:24:18.14 bitrate= 809.4kbits/s
video:120143kB audio:22783kB subtitle:0 global headers:0kB muxing overhead 0.798212%

C>echo %ERRORLEVEL%
0

I guess this was essentially what YouTube-DL originally did before the 2019.01.30 release.

Anyway, YouTube-DL should not be picky about which FFmpeg version(s) that users are able to use; expecially not for such a trivial reason like this.

Please investigate and fix.

YouTube-DL: 2019.03.09 (Win32)
FFmpeg: git c2dd5a1 "N-49610-gc2dd5a1" (5-Feb-2013, Win32/Zeranoe dynamically-linked)
System: Microsoft Windows XP Professional SP3

@TanukiAI
Copy link

You should just upgrade your ffmpeg?
I mean it's from 2013, 6 years ago... ^^

@ghost
Copy link

ghost commented Mar 14, 2019

@TA40 On top of that he's running Windows XP. I think this is one of those guys that expects everything to work but never wants to update anything on his machine. This issue isn't helping anybody but him.

@dstftw dstftw closed this as completed Mar 14, 2019
@dstftw dstftw reopened this Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants