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

[twitch] downloaded garbage, ffmpeg says (incorrect codec parameters ?) Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449) (Unsupported codec with id 100358) #14291

Closed
raszpl opened this issue Sep 21, 2017 · 3 comments

Comments

@raszpl
Copy link

@raszpl raszpl commented Sep 21, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.09.15
  • At least skimmed through the [README](https://github.com/rg3/youtube-
  • Searched the bugtracker for similar issues
  • Bug report (encountered problems with youtube-dl)
d:\_learning>d:\_learning\youtube-dl.exe -c --no-playlist --no-cache-dir --no-mtime --prefer-insecure -v "https://www.twitch.tv/videos/174342176"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-c', '--no-playlist', '--no-cache-dir', '--no-mtime', '--prefer-insecure', '-v', 'https://www.twitch.tv/videos/174342176']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.09.15
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: ffmpeg N-81555-g496d97f, ffprobe N-81555-g496d97f
[debug] Proxy map: {}
[twitch:vod] 174342176: Downloading vod info JSON
[twitch:vod] 174342176: Downloading vod access token
[twitch:vod] 174342176: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://fastly.vod.hls.ttvnw.net/4f6b99e3f60cea91ee86_beagsandjam_26244497952_708951313/chunked/index-dvr.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 1701
[download] Destination: TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4
[download] 100% of 10.17GiB in 31:51
[debug] ffmpeg command line: ffprobe -show_streams "file:TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4"
[ffmpeg] Fixing malformed AAC bitstream in "TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4"
[debug] ffmpeg command line: ffmpeg -y -i "file:TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4" -c copy -f mp4 "-bsf:a" aac_adtstoasc "file:TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.temp.mp4"
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\build\youtube_dl\YoutubeDL.py", line 2013, in post_process
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\build\youtube_dl\postprocessor\ffmpeg.py", line 546, in run
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\build\youtube_dl\postprocessor\ffmpeg.py", line 208, in run_ffmpeg
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl1klaw4y\build\youtube_dl\postprocessor\ffmpeg.py", line 204, in run_ffmpeg_multiple_files
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
D:\_learning\bin>avconv.exe -i "..\TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4"  -f mp4 -c copy -bsf:a aac_adtstoasc video.mp4
avconv version v13_dev0-1047-g9e4a5eb, Copyright (c) 2000-2017 the Libav developers
  built on Apr 15 2017 12:31:44 with gcc 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)
[aac @ 00000000023ef000] Input buffer exhausted before END element found
    Last message repeated 216 times
[mpegts @ 0000000000dae880] max_analyze_duration 5000000 reached
Input #0, mpegts, from '..\TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball ΓÇó STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula ΓÇó-v174342176.mp4':
  Duration: 04:43:27.40, start: 66.000000, bitrate: 5137 kb/s
  Program 1
    Stream #0:0[0x100]: Audio: aac (LC) [[15][0][0][0] / 0x000F]
      stereo, fltp, 74 kb/s
    Stream #0:1[0x101]: Video: h264 (Main) [[27][0][0][0] / 0x001B]
      yuv420p, tv, bt470bg/unknown/unknown
      1280x720 [PAR 1:1 DAR 16:9]
      60 fps, 90k tbn
    Stream #0:2[0x102]: Data: [21][0][0][0] / 0x0015
[mp4 @ 00000000026c0460] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurredStream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
=�

Description of issue:

Cant download usable "https://www.twitch.tv/videos/174342176" (warning, 10GB), nor second part "https://www.twitch.tv/videos/176054787". All other VODs on this channel made by same Author using same setup (obs/encoder/computer etc) work just fine, even the super long 13 hour 33GB ones like (https://www.twitch.tv/videos/171325156) are ok.
Files dont play in mplayer, freez on first I‑frame.

Edit:
Actually the file plays without sound after ~20 second freeze, seeking freezes it again.

ffprobe with really big (fails without those) -analyzeduration 1000009990 -probesize 10000000999 parameters is able to finally detect whats in the file. I compared this output to other VODs from this channel and the difference is "Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Unsupported codec with id 100358 for input stream 2"

D:\_learning>ffprobe "TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball • STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula •-v174342176.mp4" -analyzeduration 1000009990 -probesize 10000000999
ffprobe version N-81555-g496d97f Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 54.102 / 57. 54.102
  libavformat    57. 48.102 / 57. 48.102
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 60.100 /  6. 60.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 64 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 8 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 43 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 13 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 4 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 3 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 44 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 156 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 64 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 8 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 43 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 19 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 3 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 44 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 160 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 119 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 45 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 3 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 28 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 4 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 38 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 160 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 18 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 13 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 8 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 49 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 8 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 49 times
[aac @ 00000000024354c0] invalid band type
[aac @ 00000000024354c0] decode_band_types: Input buffer exhausted before END element found
    Last message repeated 11 times
Input #0, mpegts, from 'TOMB OF ANNIHILATION Ep. 1 _ DnD 5E with Jamball ΓÇó STARRING Beagle, Boganova, David, Steve, Whoopah and Yogzula ΓÇó-v174342176.mp4':
  Duration: 04:43:27.42, start: 66.000000, bitrate: 5137 kb/s
  Program 1
    Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 134 kb/s
    Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
Unsupported codec with id 100358 for input stream 2
@raszpl raszpl changed the title [twitch] downloaded garbage, ffmpeg says (incorrect codec parameters ?) [twitch] downloaded garbage, ffmpeg says (incorrect codec parameters ?) Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449) (Unsupported codec with id 100358) Sep 21, 2017
@mpenkov
Copy link

@mpenkov mpenkov commented Jul 30, 2018

The original URL is unavailable.

I tried with another URL, and it worked:

misha@cabron:~/git/youtube-dl$ bin/youtube-dl -c --no-playlist --no-cache-dir --no-mtime --prefer-insecure -v "https://www.twitch.tv/videos/282104099"                              
[debug] System config: []                                                                                                                                                           
[debug] User config: []                                                                                                                                                             
[debug] Custom config: []                                                                                                                                                           
[debug] Command-line args: [u'-c', u'--no-playlist', u'--no-cache-dir', u'--no-mtime', u'--prefer-insecure', u'-v', u'https://www.twitch.tv/videos/282104099']                      
[debug] Encodings: locale UTF-8, fs UTF-8, out utf-8, pref UTF-8                                                                                                                    
[debug] youtube-dl version 2018.07.29                                                                                                                                               
[debug] Git HEAD: 7ff129d3e                                                                                                                                                         
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-29-generic-x86_64-with-Ubuntu-18.04-bionic                                                                                
[debug] exe versions: none                                                                                                                                                          
[debug] Proxy map: {}                                                                                                                                                               
[twitch:vod] 282104099: Downloading vod info JSON                                                                                                                                   
[twitch:vod] 282104099: Downloading vod access token                                                                                                                                
[twitch:vod] 282104099: Downloading m3u8 information                                                                                                                                
[debug] Default format spec: best/bestvideo+bestaudio                                                                                                                               
[debug] Invoking downloader on u'https://vod193-ttvnw.akamaized.net/nannaninja/282104099/34b9967f-60e4-46da-886d-7eed57791129/1080p60/index-dvr.m3u8'                               
[hlsnative] Downloading m3u8 manifest                                                                                                                                               
[hlsnative] Total fragments: 11                                                                                                                                                     
[download] Destination: Uploaded short videos of PUBG in Collection-v282104099.mp4                                                                                                  
[download] 100% of 26.06MiB in 00:22                                                                                                                                                
WARNING: v282104099: malformed AAC bitstream detected. Install ffmpeg or avconv to fix this automatically.                                                                          
misha@cabron:~/git/youtube-dl$

I'm running on Ubuntu, though. Perhaps this could be a Windows-specific problem. Can you retry with the above URL?

@raszpl
Copy link
Author

@raszpl raszpl commented Jul 30, 2018

it only happened with those 2 specific videos, because "Unsupported codec with id 100358 for input stream 2"

@mpenkov
Copy link

@mpenkov mpenkov commented Jul 30, 2018

Both those videos are gone, so we can probably close this issue.

@raszpl raszpl closed this Jul 30, 2018
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
2 participants
You can’t perform that action at this time.