Create fragmented mp4 files for Mediathek downloads #9963

Closed
opened 2026-02-21 05:17:56 -05:00 by deekerman · 6 comments
Owner

Originally created by @madduck on GitHub (Feb 16, 2017).

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

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably 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)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

If youtube-dl downloads a file from the Mediathek (extractor/ard.py), it creates a so-called non-fragmented mp4 file, which cannot be played unless it is fully downloaded.

it'd be better if youtube-dl could repack the file creating fragmented mp4. Please see https://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg for information on how this can be achieved using ffmpeg.

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.

Originally created by @madduck on GitHub (Feb 16, 2017). - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.16** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### 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) - [x] Feature request (request for a new functionality) - [ ] Question - [ ] Other ### Description of your *issue*, suggested solution and other information If youtube-dl downloads a file from the Mediathek (extractor/ard.py), it creates a so-called non-fragmented mp4 file, which cannot be played unless it is fully downloaded. it'd be better if youtube-dl could repack the file creating fragmented mp4. Please see https://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg for information on how this can be achieved using ffmpeg. Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). 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.
deekerman 2026-02-21 05:17:56 -05:00
Author
Owner

@yan12125 commented on GitHub (Feb 16, 2017):

Coud you give an example video URL?

@yan12125 commented on GitHub (Feb 16, 2017): Coud you give an example video URL?
Author
Owner

@madduck commented on GitHub (Feb 16, 2017):

also sprach Yen Chi Hsuan notifications@github.com [2017-02-16 23:46 +1300]:

Coud you give an example video URL?

Of course, though they are often only valid for a few days:

http://www.ardmediathek.de/tv/Tatort/Vorschau-auf-Tatort-Land-in-dieser-Zei/Das-Erste/Video?bcastId=602916&documentId=39711304

This is also just a short film. If you need a longer one, try this:

http://www.ardmediathek.de/tv/Tatort/Hinter-dem-Spiegel/Das-Erste/Video?bcastId=602916&documentId=40609022

--
The sender e-mail address used (github.com@pobox.madduck.net)
is valid and specific to our correspondence. It should not indicate any
affiliation with your organisation.

Die verwendete E-mail-Adresse (github.com@pobox.madduck.net)
ist gültig und spezifisch für unsere Korrespondenz. Sie soll in keiner Weise
auf eine Verbindung mit Ihrer Organisation hindeuten.

Spamtrap: github.com.bogus@pobox.madduck.net

@madduck commented on GitHub (Feb 16, 2017): also sprach Yen Chi Hsuan <notifications@github.com> [2017-02-16 23:46 +1300]: > Coud you give an example video URL? Of course, though they are often only valid for a few days: http://www.ardmediathek.de/tv/Tatort/Vorschau-auf-Tatort-Land-in-dieser-Zei/Das-Erste/Video?bcastId=602916&documentId=39711304 This is also just a short film. If you need a longer one, try this: http://www.ardmediathek.de/tv/Tatort/Hinter-dem-Spiegel/Das-Erste/Video?bcastId=602916&documentId=40609022 -- The sender e-mail address used (github.com@pobox.madduck.net) is valid and specific to our correspondence. It should not indicate any affiliation with your organisation. Die verwendete E-mail-Adresse (github.com@pobox.madduck.net) ist gültig und spezifisch für unsere Korrespondenz. Sie soll in keiner Weise auf eine Verbindung mit Ihrer Organisation hindeuten. Spamtrap: github.com.bogus@pobox.madduck.net
Author
Owner

@yan12125 commented on GitHub (Feb 16, 2017):

which cannot be played unless it is fully downloaded

Try this:

youtube-dl -v "http://www.ardmediathek.de/tv/Tatort/Hinter-dem-Spiegel/Das-Erste/Video?bcastId=602916&documentId=40609022" --hls-use-mpegts
@yan12125 commented on GitHub (Feb 16, 2017): > which cannot be played unless it is fully downloaded Try this: ``` youtube-dl -v "http://www.ardmediathek.de/tv/Tatort/Hinter-dem-Spiegel/Das-Erste/Video?bcastId=602916&documentId=40609022" --hls-use-mpegts ```
Author
Owner

@madduck commented on GitHub (Feb 16, 2017):

This seems to work, indeed. Is there a way to make this default for a site?

@madduck commented on GitHub (Feb 16, 2017): This seems to work, indeed. Is there a way to make this default for a site?
Author
Owner

@yan12125 commented on GitHub (Feb 16, 2017):

Site-specific options is still on its way: #8901. --hls-use-mpegts brings no harm unless you're using quite old video players. You may want to just put it in global configuration files.

Closing as the request feature is already implemented.

@yan12125 commented on GitHub (Feb 16, 2017): Site-specific options is still on its way: #8901. --hls-use-mpegts brings no harm unless you're using quite old video players. You may want to just put it in [global configuration files](https://github.com/rg3/youtube-dl/blob/master/README.md#configuration). Closing as the request feature is already implemented.
Author
Owner

@madduck commented on GitHub (Feb 16, 2017):

Thanks, already done!

@madduck commented on GitHub (Feb 16, 2017): Thanks, already done!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#9963
No description provided.