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

[tele5] Missing ffmpeg audio postprocessing #22062

Closed
SebiderSushi opened this issue Aug 11, 2019 · 2 comments
Closed

[tele5] Missing ffmpeg audio postprocessing #22062

SebiderSushi opened this issue Aug 11, 2019 · 2 comments
Labels

Comments

@SebiderSushi
Copy link

@SebiderSushi SebiderSushi commented Aug 11, 2019

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.08.02
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl:

bash$ youtube-dl -v -o '%(upload_date)s-%(title)s-%(id)s.%(ext)s'  https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/das-letzte-seiner-art/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-o', u'%(upload_date)s-%(title)s-%(id)s.%(ext)s', u'https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/das-letzte-seiner-art/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.08.02
[debug] Python version 2.7.12 (CPython) - Linux-4.15.0-55-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15, rtmpdump 2.4
[debug] Proxy map: {}
[Tele5] das-letzte-seiner-art: Downloading webpage
[Nexx] 1619079: Downloading JSON metadata
[Nexx] 1619079: Downloading m3u8 information
[Nexx] 1619079: Downloading MPD manifest
[Nexx] 1619079: Downloading ISM manifest
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://tele5nexx.akamaized.net/a1a3e2a1-789a-4da3-b72c-8dfa437ab3dd/1619079_src.ism/QualityLevels(1492538)/Manifest(video,format=m3u8-aapl)'
[download] 20190712-Das letzte seiner Art-1619079.fazure-hls-1672.mp4 has already been downloaded
[download] 100% of 536.90MiB
[debug] Invoking downloader on u'http://tele5nexx.akamaized.net/a1a3e2a1-789a-4da3-b72c-8dfa437ab3dd/1619079_src.ism/QualityLevels(128001)/Manifest(aac_UND_2_128,format=m3u8-aapl)'
[download] 20190712-Das letzte seiner Art-1619079.fazure-hls-138.mp4 has already been downloaded
[download] 100% of 47.21MiB
[ffmpeg] Merging formats into "20190712-Das letzte seiner Art-1619079.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:20190712-Das letzte seiner Art-1619079.fazure-hls-1672.mp4' -i 'file:20190712-Das letzte seiner Art-1619079.fazure-hls-138.mp4' -c copy -map '0:v:0' -map '1:a:0' 'file:20190712-Das letzte seiner Art-1619079.temp.mp4'
ERROR: Conversion failed!
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2054, in post_process
    files_to_delete, info = pp.run(info)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 512, in run
    self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError: Conversion failed!

ffmpeg conversion:

bash$ ffmpeg -i 20190712-Das\ letzte\ seiner\ Art-1619079.fazure-hls-138.mp4 -c copy audio.m4a
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 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
  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
Input #0, mpegts, from '20190712-Das letzte seiner Art-1619079.fazure-hls-138.mp4':
  Duration: 00:48:20.22, start: 0.000000, bitrate: 136 kb/s
  Program 1 
    Stream #0:0[0x12d]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 131 kb/s
[ipod @ 0x152f360] Codec for stream 0 does not use global headers but container format requires global headers
Output #0, ipod, to 'audio.m4a':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 131 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[ipod @ 0x152f360] 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
size=       0kB time=00:00:00.02 bitrate=  95.3kbits/s    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

Description

When downloading from tele5 merging audio and video files fails.
When trying to copy the audio stream from the downloaded audio file to another using ffmpeg, it tells me to use the option -bsf:a aac_adtstoasc to fix the malformed AAC bitstream. (See second log)
Replicating the ffmpeg command line call used by youtube-dl to merge (according to the verbose log) and adding the option -bsf:a aac_adtstoasc makes the whole thing work.

Seems like youtube-dl needs to determine when this is needed and add that option to make the merge work?

Example URLs:

https://www.tele5.de/digimon/ganze-folge/gargomon-in-hochform/
https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/implosion-der-spirale/
https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/spitze-des-eisberges/
https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/der-fall-charly/
https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/das-letzte-seiner-art/
https://www.tele5.de/star-trek/raumschiff-enterprise/ganze-folge/der-kaefig-pilot/
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 11, 2019

Outdated ffmpeg.

@dstftw dstftw closed this Aug 11, 2019
@dstftw dstftw added the invalid label Aug 11, 2019
@SebiderSushi
Copy link
Author

@SebiderSushi SebiderSushi commented Aug 11, 2019

So you confirm that this should work with an up-to-date version of ffmpeg?
I'm on an older Ubuntu LTS version so i can't really update or even test this out without greater efforts.

Edit: NVM, testing this out turned out to be quite easy. Thank you for clearing it up :)

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.