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

MPEG-TS instead of MP4 #26410

Open
Anuskuss opened this issue Aug 22, 2020 · 0 comments
Open

MPEG-TS instead of MP4 #26410

Anuskuss opened this issue Aug 22, 2020 · 0 comments

Comments

@Anuskuss
Copy link

@Anuskuss Anuskuss commented Aug 22, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.07.28
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-o', u'video.mp4', u'-v', u'--merge-output-format', u'mp4', u'--recode-video', u'mp4', u'https://v.redd.it/16cqbkev2ci51']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 2.7.16 (CPython) - Linux-5.4.51-v7l+-armv7l-with-debian-10.4
[debug] exe versions: ffmpeg N-98802-g01a580f
[debug] Proxy map: {}
[RedditR] iduchl: Downloading JSON metadata
[Reddit] 16cqbkev2ci51: Downloading m3u8 information
[Reddit] 16cqbkev2ci51: Downloading MPD manifest
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://v.redd.it/16cqbkev2ci51/HLS_540.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 3
[download] Destination: video.mp4
[download] 100% of 1.98MiB in 00:01
[debug] ffmpeg command line: ffmpeg -i 'file:video.mp4'
[ffmpeg] Not converting video file video.mp4 - already is in target format mp4

Description

Most videos from v.redd.it are DASH, which means audio and video get downloaded separately and then get combined into a (working) MP4. Some videos are MPEG-TS though and youtube-dl just downloades them and leaves them alone (even though I specified -o video.mp4). Those videos play fine but they don't work as HTML5 video.
I've tried adding --merge-output-format mp4 and --recode-video mp4 but youtube-dl keeps saying

[ffmpeg] Not converting video file video.mp4 - already is in target format mp4

As a workaround I've added my own exec (youtube-dl -o tmp.mp4 --exec "ffmpeg -i {} -c copy video.mp4 && rm {}" "https://v.redd.it/16cqbkev2ci51"), which runs ffmpeg for less than a second and actually gives me a web-browser playable MP4.
Also if it help you guys to debug this: I replaced my /bin/ffmpeg with echo $* > /tmp/ffmpeg.txt and as it turns out the system ffmpeg doesn't even get called.

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
1 participant
You can’t perform that action at this time.