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

TV4 module is broken when called from code ("FFmpegPostProcessorError: Conversion failed!") #16696

Closed
hakanw opened this issue Jun 11, 2018 · 4 comments
Labels

Comments

@hakanw
Copy link

@hakanw hakanw commented Jun 11, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.06.11. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.06.11

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

Working:

youtube-dl -x http://tv4play.se/program/nyheterna/10002198

Output for WORKING version:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-x', u'http://tv4play.se/program/nyheterna/10002198', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.06.11
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-75-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {}
[debug] Using fake IP 78.70.61.169 (SE) as X-Forwarded-For.
[TV4] 10002198: Downloading video info JSON
[TV4] 10002198: Downloading JSON metadata
[TV4] 10002198: Downloading m3u8 information
[TV4] 10002198: Downloading MPD manifest
[TV4] 10002198: Downloading f4m manifest
[TV4] 10002198: Downloading ISM manifest
[debug] Invoking downloader on u'https://lbs-usp-hls-vod.cmore.se/vod/3e70f/nyheterna080011juni2018_74924221(10002198_ISMUSP).ism/nyheterna080011juni2018_74924221(10002198_ISMUSP)-audio=96000.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 106
[download] Destination: Nyheterna 08.00 11 juni 2018-10002198.mp4
[download] 100% of 3.73MiB in 00:11
[debug] avconv command line: avprobe -show_streams 'file:Nyheterna 08.00 11 juni 2018-10002198.mp4'
[ffmpeg] Fixing malformed AAC bitstream in "Nyheterna 08.00 11 juni 2018-10002198.mp4"
[debug] ffmpeg command line: avconv -y -i 'file:Nyheterna 08.00 11 juni 2018-10002198.mp4' -c copy -f mp4 '-bsf:a' aac_adtstoasc 'file:Nyheterna 08.00 11 juni 2018-10002198.temp.mp4'
[debug] avconv command line: avprobe -show_streams 'file:Nyheterna 08.00 11 juni 2018-10002198.mp4'
[ffmpeg] Destination: Nyheterna 08.00 11 juni 2018-10002198.m4a
[debug] ffmpeg command line: avconv -y -i 'file:Nyheterna 08.00 11 juni 2018-10002198.mp4' -vn -acodec copy '-bsf:a' aac_adtstoasc 'file:Nyheterna 08.00 11 juni 2018-10002198.m4a'
Deleting original file Nyheterna 08.00 11 juni 2018-10002198.mp4 (pass -k to keep)

Somehow suddenly NOT working:

with youtube_dl.YoutubeDL({
	'verbose':True,
	'noplaylist': True,
}) as yt:
	yt.download(["http://tv4play.se/program/nyheterna/10002198"])

Output for NOT working version:

[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.06.11
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-75-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1
[debug] Proxy map: {'sweden': u'sweden-proxy.signalsignal.internal:65432'}
[debug] Using fake IP 78.76.242.132 (SE) as X-Forwarded-For.
[TV4] 10002198: Downloading video info JSON
[TV4] 10002198: Downloading JSON metadata
[TV4] 10002198: Downloading m3u8 information
[TV4] 10002198: Downloading MPD manifest
[TV4] 10002198: Downloading f4m manifest
[TV4] 10002198: Downloading ISM manifest
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://lbs-usp-hls-vod.cmore.se/vod/3e70f/nyheterna080011juni2018_74924221(10002198_ISMUSP).ism/nyheterna080011juni2018_74924221(10002198_ISMUSP)-video=3143751.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 106
[download] Destination: Nyheterna 08.00 11 juni 2018-10002198.fhls-3430.mp4
[download] 100% of 122.31MiB in 00:20
[debug] Invoking downloader on u'https://lbs-usp-hls-vod.cmore.se/vod/3e70f/nyheterna080011juni2018_74924221(10002198_ISMUSP).ism/nyheterna080011juni2018_74924221(10002198_ISMUSP)-audio=96000.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 106
[download] Destination: Nyheterna 08.00 11 juni 2018-10002198.fhls-97.mp4
[download] 100% of 3.73MiB in 00:09
[ffmpeg] Merging formats into "Nyheterna 08.00 11 juni 2018-10002198.mp4"
[debug] ffmpeg command line: avconv -y -i 'file:Nyheterna 08.00 11 juni 2018-10002198.fhls-3430.mp4' -i 'file:Nyheterna 08.00 11 juni 2018-10002198.fhls-97.mp4' -c copy -map '0:v:0' -map '1:a:0' 'file:Nyheterna 08.00 11 juni 2018-10002198.temp.mp4'
ERROR: Conversion failed!
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/production2/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 2047, in post_process
    files_to_delete, info = pp.run(info)
  File "/home/ubuntu/.virtualenvs/production2/local/lib/python2.7/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 479, in run
    self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
  File "/home/ubuntu/.virtualenvs/production2/local/lib/python2.7/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 204, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError: Conversion failed!

Video file to be tested on: http://tv4play.se/program/nyheterna/10002198

When downloading this video file using the Python library, it fails during FFMpeg conversion.
When downloading it via command line, it works flawlessly.

This is a new regression, since 30 may.

@hakanw hakanw changed the title TV4 mpd is broken when called from code TV4 module is broken when called from code (Conversion error) Jun 11, 2018
@hakanw hakanw changed the title TV4 module is broken when called from code (Conversion error) TV4 module is broken when called from code ("FFmpegPostProcessorError: Conversion failed!") Jun 11, 2018
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 11, 2018

Outdated avconv not capable of merging properly. Nothing to do with youtube-dl.

@dstftw dstftw closed this Jun 11, 2018
@dstftw dstftw added the invalid label Jun 11, 2018
@hakanw
Copy link
Author

@hakanw hakanw commented Jun 11, 2018

Thanks @dstftw ! It would be awesome if youtube-dl could warn if you're using a too old ffmpeg. But maybe that's difficult?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 11, 2018

Well, it's hard to be 100% sure whether it fails due to outdated version, malformed source files or something else. So it's barely possible to output warning at an appropriate occasion. A general rule when you encounter some merge/postprocessing error is to check for a newer version of avconv/ffmpeg.

@hakanw
Copy link
Author

@hakanw hakanw commented Jun 11, 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.