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

[ABC-News.go.com] -- Malformed AAC bitstream #15452

Closed
AdamDanischewski opened this issue Jan 29, 2018 · 1 comment
Closed

[ABC-News.go.com] -- Malformed AAC bitstream #15452

AdamDanischewski opened this issue Jan 29, 2018 · 1 comment

Comments

@AdamDanischewski
Copy link

@AdamDanischewski AdamDanischewski commented Jan 29, 2018

[X] I've verified and I assure that I'm running youtube-dl 2018.01.27

Before submitting an issue make sure you have:

  • [X ] At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here:

youtube-dl -v 'http://abcnews.go.com/Technology/suns-setting-double-sun-video-china-viral-web/story?id=13076753'[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'http://abcnews.go.com/Technology/suns-setting-double-sun-video-china-viral-web/story?id=13076753']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.01.27
[debug] Python version 2.7.12 (CPython) - Linux-4.13.1-041301-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.11-0ubuntu0.16.04.1, avprobe 2.8.11-0ubuntu0.16.04.1, ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[abcnews] 13076753: Downloading webpage
[abcnews:video] Downloading Akamai AMP feed
[abcnews:video] 13077936: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://a1.media.abcnews.com.edgesuite.net/m3u8out/110307_abc_two_suns/110307_abc_two_suns_700k.m3u8'
[download] Destination: Two Suns Setting Over China-13077936.mp4
[debug] avconv command line: avconv -y -loglevel verbose -headers 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
' -i 'http://a1.media.abcnews.com.edgesuite.net/m3u8out/110307_abc_two_suns/110307_abc_two_suns_700k.m3u8' -c copy -f mp4 'file:Two Suns Setting Over China-13077936.mp4.part'
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[hls,applehttp @ 0x1112580] HLS request for url 'http://a1.media.abcnews.com.edgesuite.net/m3u8out/110307_abc_two_suns/110307_abc_two_suns_700k_00001.ts', offset 0, playlist 0
[h264 @ 0x1119fa0] Current profile doesn't provide more RBSP data in PPS, skipping
Input #0, hls,applehttp, from 'http://a1.media.abcnews.com.edgesuite.net/m3u8out/110307_abc_two_suns/110307_abc_two_suns_700k.m3u8':
  Duration: 00:00:58.00, start: 0.000000, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Constrained Baseline), 2 reference frames ([27][0][0][0] / 0x001B), yuv420p, 480x360 (480x368), 24 fps, 24 tbr, 90k tbn, 48 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 32000 Hz, stereo, fltp, 51 kb/s
[mp4 @ 0x119a520] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x119a520] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:Two Suns Setting Over China-13077936.mp4.part':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264, 1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 480x360 (0x0), q=2-31, 24 fps, 24 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 32000 Hz, stereo, 51 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x119a520] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
av_interleaved_write_frame(): Operation not permitted
No more output streams to write to, finishing.
[mp4 @ 0x119a520] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
frame=    2 fps=0.0 q=-1.0 Lsize=       6kB time=00:00:00.09 bitrate= 494.6kbits/s    
video:5kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.099265%
Input file #0 (http://a1.media.abcnews.com.edgesuite.net/m3u8out/110307_abc_two_suns/110307_abc_two_suns_700k.m3u8):
  Input stream #0:0 (video): 2 packets read (5109 bytes); 
  Input stream #0:1 (audio): 2 packets read (331 bytes); 
  Total: 4 packets (5440 bytes) demuxed
Output file #0 (file:Two Suns Setting Over China-13077936.mp4.part):
  Output stream #0:0 (video): 2 packets muxed (5109 bytes); 
  Output stream #0:1 (audio): 2 packets muxed (331 bytes); 
  Total: 4 packets (5440 bytes) muxed
Conversion failed!


ERROR: ffmpeg exited with code 1
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 465, in main
    _real_main(argv)
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 455, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1988, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 795, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 887, in process_ie_result
    new_result, download=download, extra_info=extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 849, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1622, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1895, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1834, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 361, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/external.py", line 57, in real_download
    self.get_basename(), retval))
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 163, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 612, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 574, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Description of your issue, suggested solution and other information

I'm not sure if it's already possible somehow, I tried to play around with --encode and some features to bypass in case but it gets complicated and I thought it's probably that needs to be fixed in the code permanently as a fallback or a new option to fallback in case there is a malformed AAC stream.

What would be nice is if you could add [and better still to also remove] options since ffmpeg is kind enough to tell you what is wrong and how to fix it, until it is permanently fixed in youtube-dl -- it would be useful if you could provide an easy way to inject options to ffmpeg (and better still to zap options out if necessary).

E.g. --add-fmpeg-option '-bsf:a aac_adtstoasc'
E.g. --remove-fmpeg-option '-c copy'

For now, running it in debug and gleaning the ffmpeg string and modifying it, workaround works.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 29, 2018

Outdated ffmpeg.

@dstftw dstftw closed this Jan 29, 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.