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

Youtube-dl spams the console with errors when downloading a Twitch VoD #5591

Open
mateon1 opened this issue May 3, 2015 · 3 comments
Open

Youtube-dl spams the console with errors when downloading a Twitch VoD #5591

mateon1 opened this issue May 3, 2015 · 3 comments

Comments

@mateon1
Copy link

@mateon1 mateon1 commented May 3, 2015

When downloading a Twitch vod, http://www.twitch.tv/andy/v/4218137, the console is spammed with errors "Error parsing ADTS frame header!" and "Failed to open bitstream filter aac_adtstoasc for stream 0 with codec copy: Operation not permitted".

I generated output by running cmd < in.txt 1>out.txt 2>&1, where in.txt is py -2 -m youtube_dl http://www.twitch.tv/andy/v/4218137 --verbose -f best.

The full output is 14MB in size, however zipped it is 17kB: http://puu.sh/hzUQF/9e5f0d486d.zip

This is the beginning of the output with the debug info:

D:\V\C>py -2 -m youtube_dl http://www.twitch.tv/andy/v/4218137 --verbose -f best
[debug] System config: []
[debug] User config: ['--write-info-json', '--write-all-thumbnails', '--all-subs', '-o', 'D:\\V\\%(extractor)s\\%(uploader)s\\%(upload_date)s %(title)s - %(id)s\\[%(format)s].%(ext)s', '-f', 'best,bestvideo[ext!=webm]+bestaudio', '--no-post-overwrite']
[debug] Command-line args: [u'http://www.twitch.tv/andy/v/4218137', u'--verbose', u'-f', u'best']
WARNING: Parameter outtmpl is bytes, but should be a unicode string. Put  from __future__ import unicode_literals  at the top of your code file or consider switching to Python 3.x.
[debug] Encodings: locale cp1250, fs mbcs, out None, pref cp1250
[debug] youtube-dl version 2015.04.09
[debug] Python version 2.7.5 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-50911-g9efcfbe
[debug] Proxy map: {}
[twitch:vod] 4218137: Downloading vod info JSON
[twitch:vod] 4218137: Downloading vod access token
[twitch:vod] 4218137: Downloading m3u8 information
[info] Writing video description metadata as JSON to: D:\V\twitch -vod\Andy\20150421 Ori and the Blind Forest _ Any% Speedrun _ 37_24 - v4218137\[Source - unknown].info.json
[twitch:vod] v4218137: Downloading thumbnail ...
[twitch:vod] v4218137: Writing thumbnail to: D:\V\twitch -vod\Andy\20150421 Ori and the Blind Forest _ Any% Speedrun _ 37_24 - v4218137\[Source - unknown].jpg
[debug] Invoking downloader on u'http://vod.ak.hls.ttvnw.net/v1/AUTH_system/vods_01ec/andy_14095574032_233944361/chunked/highlight-4218137.m3u8'
[download] Destination: D:\V\twitch -vod\Andy\20150421 Ori and the Blind Forest _ Any% Speedrun _ 37_24 - v4218137\[Source - unknown].mp4
ffmpeg version N-50911-g9efcfbe Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 13 2013 21:26:48 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 19.100 / 52. 19.100
  libavcodec     55.  0.100 / 55.  0.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    54.  4.100 / 54.  4.100
  libavfilter     3. 45.103 /  3. 45.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpegts @ 022bf680] max_analyze_duration 5000000 reached at 5000000 microseconds
[mpegts @ 022bf680] Could not find codec parameters for stream 2 (Audio: mp3 ([21][0][0][0] / 0x0015), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 022bf680] Estimating duration from bitrate, this may be inaccurate
[hls,applehttp @ 022b8820] max_analyze_duration 5000000 reached at 5000000 microseconds
[hls,applehttp @ 022b8820] Could not find codec parameters for stream 2 (Audio: mp3 ([21][0][0][0] / 0x0015), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hls,applehttp, from 'http://vod.ak.hls.ttvnw.net/v1/AUTH_system/vods_01ec/andy_14095574032_233944361/chunked/highlight-4218137.m3u8':
  Duration: 00:44:28.00, start: 4253.070656, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Audio: mp3 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, s16p, 128 kb/s
    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 30 fps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:2: Audio: mp3 ([21][0][0][0] / 0x0015), 0 channels, s16p
Output #0, mp4, to 'D:\V\twitch -vod\Andy\20150421 Ori and the Blind Forest _ Any% Speedrun _ 37_24 - v4218137\[Source - unknown].mp4.part':
  Metadata:
    encoder         : Lavf55.0.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=2-31, 30 fps, 90k tbn, 90k tbc
    Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 44100 Hz, stereo, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[NULL @ 09aac5a0] Error parsing ADTS frame header!
Failed to open bitstream filter aac_adtstoasc for stream 0 with codec copy: Operation not permitted
[NULL @ 09aac5a0] Error parsing ADTS frame header!
Failed to open bitstream filter aac_adtstoasc for stream 0 with codec copy: Operation not permitted
[NULL @ 09aac5a0] Error parsing ADTS frame header!
Failed to open bitstream filter aac_adtstoasc for stream 0 with codec copy: Operation not permitted

The video downloaded is fine, everything looks good and the sound is okay.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 3, 2015

That's actually from ffmpeg, not youtube-dl.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 4, 2015

The raw .ts segments from this video have mp3 audio streams:

$ ffprobe index-0000001739-wvgw.ts\?start_offset=13170716\&end_offset=14338195
ffprobe version 2.6.2 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC) 20150304 (prerelease)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[NULL @ 0x7fbe0cb19600] start time for stream 0 is not set in estimate_timings_from_pts
[mpegts @ 0x7fbe0cb15620] Could not find codec parameters for stream 0 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'index-0000001739-wvgw.ts?start_offset=13170716&end_offset=14338195':
  Duration: 00:00:04.00, start: 6943.449000, bitrate: 2335 kb/s
  Program 1 
    Stream #0:0[0x100]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, s16p
    Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709/bt709/iec61966-2-1), 1280x720, 60 fps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
Unsupported codec with id 1414087731 for input stream 2

So the aac_adtstoasc option in this line simply fails. I've inspected several videos from twitch, and found no other one with a non-aac audio stream. Maybe adding a workaround option to disable aac_adtstoaac in HlsFD can solve this issue?

@scottjad
Copy link

@scottjad scottjad commented May 12, 2015

This might be helpful:
http://blog.twitch.tv/2015/05/weve-updated-our-content-appeals-process/

Vod urls with /v/ in them on twitch are new (HLS), while the old vod url format was /b/ (FLV). I don't think youtube-dl currently handles the /v/ urls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.