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

Download of twitter video fails #13932

Closed
hadmut opened this issue Aug 16, 2017 · 2 comments
Closed

Download of twitter video fails #13932

hadmut opened this issue Aug 16, 2017 · 2 comments
Labels

Comments

@hadmut
Copy link

@hadmut hadmut commented Aug 16, 2017

Hi,
when trying to download videos from twitter (giving the tweet's url as argument, e.g.
https://twitter.com/tagesschau/status/897680996929339392
(using Ubuntu 16.04) it results in the error message

[mp4 @ 0x29232c0] 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
frame= 3 fps=0.0 q=-1.0 Lsize= 45kB time=00:00:00.08 bitrate=4592.8kbits/s
video:44kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.131660%
Conversion failed!

ERROR: ffmpeg exited with code 1

% /tmp/youtube-dl --version
2017.08.13

Before submitting an issue make sure you have:

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

yeah, did so.

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


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. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-4', u'-v', u'https://twitter.com/tagesschau/status/897680996929339392']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2017.08.13
[debug] Python version 2.7.12 - Linux-4.4.0-91-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: {}
[twitter] 897680996929339392: Downloading webpage
[twitter:card] 897680996929339392: Downloading webpage
[twitter:card] 897680996929339392: Downloading m3u8 information
[twitter:card] 897680996929339392: Downloading mobile webpage
[twitter:card] 897680996929339392: Downloading main script
[twitter:card] 897680996929339392: Downloading mobile API data
[twitter:card] 897680996929339392: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://video.twimg.com/ext_tw_video/897680301144645633/pu/pl/1280x720/W0VVPkgF9cIXEPbs.m3u8'
[download] Destination: tagesschau - Dazu eine Einschätzung von @jpburgard aus Washington.-897680996929339392.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 'https://video.twimg.com/ext_tw_video/897680301144645633/pu/pl/1280x720/W0VVPkgF9cIXEPbs.m3u8' -c copy -f mp4 'file:tagesschau - Dazu eine Einschätzung von @jpburgard aus Washington.-897680996929339392.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 @ 0xf53500] HLS request for url 'https://video.twimg.com/ext_tw_video/897680301144645633/pu/vid/0/3000/1280x720/td6Ae8lSgH1Hjv0-.ts', offset 0, playlist 0
[h264 @ 0x141e580] Current profile doesn't provide more RBSP data in PPS, skipping
Input #0, hls,applehttp, from 'https://video.twimg.com/ext_tw_video/897680301144645633/pu/pl/1280x720/W0VVPkgF9cIXEPbs.m3u8':
Duration: 00:01:48.96, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Main), 2 reference frames ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
[mp4 @ 0x19e0a40] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x19e0a40] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:tagesschau - Dazu eine Einschätzung von @jpburgard aus Washington.-897680996929339392.mp4.part':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264, 1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 1280x720 (0x0), q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 126 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x19e0a40] 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.
frame= 3 fps=0.0 q=-1.0 Lsize= 45kB time=00:00:00.08 bitrate=4592.8kbits/s
video:44kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.131660%
Input file #0 (https://video.twimg.com/ext_tw_video/897680301144645633/pu/pl/1280x720/W0VVPkgF9cIXEPbs.m3u8):
Input stream #0:0 (video): 3 packets read (45072 bytes);
Input stream #0:1 (audio): 1 packets read (348 bytes);
Total: 4 packets (45420 bytes) demuxed
Output file #0 (file:tagesschau - Dazu eine Einschätzung von @jpburgard aus Washington.-897680996929339392.mp4.part):
Output stream #0:0 (video): 3 packets muxed (45072 bytes);
Output stream #0:1 (audio): 1 packets muxed (348 bytes);
Total: 4 packets (45420 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 "/tmp/youtube-dl/main.py", line 19, in
youtube_dl.main()
File "/tmp/youtube-dl/youtube_dl/init.py", line 465, in main
_real_main(argv)
File "/tmp/youtube-dl/youtube_dl/init.py", line 455, in _real_main
retcode = ydl.download(all_urls)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 1956, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 787, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 879, in process_ie_result
new_result, download=download, extra_info=extra_info)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 841, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 1599, in process_video_result
self.process_info(new_info)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 1863, in process_info
success = dl(filename, info_dict)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 1805, in dl
return fd.download(name, info)
File "/tmp/youtube-dl/youtube_dl/downloader/common.py", line 361, in download
return self.real_download(filename, info_dict)
File "/tmp/youtube-dl/youtube_dl/downloader/external.py", line 57, in real_download
self.get_basename(), retval))
File "/tmp/youtube-dl/youtube_dl/downloader/common.py", line 163, in report_error
self.ydl.report_error(*args, **kargs)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 604, in report_error
self.trouble(error_message, tb)
File "/tmp/youtube-dl/youtube_dl/YoutubeDL.py", line 566, in trouble
tb_data = traceback.format_list(traceback.extract_stack())

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.08.13
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 16, 2017

Update ffmpeg.

@dstftw dstftw closed this Aug 16, 2017
@dstftw dstftw added the invalid label Aug 16, 2017
@hadmut
Copy link
Author

@hadmut hadmut commented Aug 16, 2017

Adding the -bsf:a aac_adtstoasc option to avconv or ffmpeg (as the error message tells to do) solves the problem. Both avconv and ffmpeg then properly download the m3u8 file and produce an mp4.

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.