VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jun 2019
    Location
    USA
    Search Comp PM
    I use youtube-dl to download video from websites of television networks such as nbc.com, abc.com, cbs.com etc. Once youtube-dl extracts the playlists it then calls ffmpeg to download the video. On some websites, such as tntdrama.com, ffmpeg repeatedly prints the message "Non-monotonous DTS in output stream 0:0; previous: ..., current: ...; changing to ... This may result in incorrect timestamps in the output file." When I play the downloaded file, it will play fine up to about 14-21 minutes in then hang. When I asked about this problem in another forum a member stated "Some playlists contain a sequence of separately produced MPEG-TS files. So, there's a timestamp reset when each new segment is received. At this point, the timestamp code in libavformat's mux.c simply increments the output timestamp by one when this happens. Unless the timebase resolution is 1/fps, this produces an unsound file." I've been trying to find a solution for over a year on various forums but nothing suggested so far has helped. Anyone here use ffmpeg to download video available to watch online and encounter this problem? I'm at a loss and so far nothing really helpful from the ffmpeg forum.
    Quote Quote  
  2. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    Use the -F switch to browse the available streams then run again with -f with different streams until one Works. On the CW I have to play around with different ones at different resolutions as I sometimes get the same error.
    if all else fails read the manual
    Quote Quote  
  3. Member
    Join Date
    Jun 2019
    Location
    USA
    Search Comp PM
    Thanks I'll try that just won't get it in 1080 or maybe not at all...
    Quote Quote  
  4. For tntdrama.com:

    youtube-dl --hls-prefer-native URL.m3u8
    Quote Quote  
  5. Member
    Join Date
    Jun 2019
    Location
    USA
    Search Comp PM
    Thanks but I've tried that but it doesn't work for me: "[hlsnative] Downloading m3u8 manifest
    WARNING: hlsnative has detected features it does not support, extraction will be delegated to ffmpeg"
    Quote Quote  
  6. Member
    Join Date
    Jun 2019
    Location
    USA
    Search Comp PM
    I'm trying to download the video on this page: https://www.tntdrama.com/movies/tomorrowland
    Quote Quote  
  7. [generic] master_unpv_de: Requesting header
    [generic] master_unpv_de: Downloading m3u8 information
    [info] Available formats for master_unpv_de:
    format code extension resolution note
    140 mp4 audio only 140k , mp4a.40.2
    855 mp4 640x360 855k , avc1.42001e, mp4a.40.2
    1343 mp4 640x360 1343k , avc1.42001e, mp4a.40.2
    1821 mp4 852x480 1821k , avc1.42001f, mp4a.40.2
    2564 mp4 960x540 2564k , avc1.4d001f, mp4a.40.2
    3526 mp4 1280x720 3526k , avc1.4d001f, mp4a.40.2 (best)
    max 720p

    I can only download preview without access.

    https://mega.nz/#!hZ82QIRZ!6m4VVQj09A0Ul4vBGn_rryJW6VP8AR4EAUsBRNUYBAA
    Last edited by slimozis; 10th Jun 2019 at 05:56.
    Quote Quote  
  8. Member Emeritus
    Join Date
    May 2014
    Search PM
    Originally Posted by Hansg View Post
    When I asked about this problem in another forum a member stated "Some playlists contain a sequence of separately produced MPEG-TS files. So, there's a timestamp reset when each new segment is received. At this point, the timestamp code in libavformat's mux.c simply increments the output timestamp by one when this happens. Unless the timebase resolution is 1/fps, this produces an unsound file." I've been trying to find a solution for over a year on various forums but nothing suggested so far has helped.
    What is the other forum?

    But, yes, that is correct (the separately produced MPEG-TS files) for almost all program-length videos on all tbs owned websites.

    One solution is to download each individual contiguous block of ts segments (there are around 3 or 4 such blocks per 30 minutes of content).

    The blocks are demarcated by:

    #EXT-X-DISCONTINUITY
    #EXT-X-CUE-OUT:0

    found at the end of each block within the hlsvariant playlist for the desired quality.

    Then, join the individually downloaded blocks using the concatenation function of ffmpeg. The concat function of ffmpeg will make the timestamp codes in the resulting joined file to be properly consecutive for the length of the joined file.

    A batch file could be made to automate all of this.
    Last edited by ponens; 11th Jun 2019 at 14:02.
    Quote Quote  
  9. Member
    Join Date
    Jun 2019
    Location
    USA
    Search Comp PM
    slimozis: Thank you for checking this for me.

    ponens:
    Thank you for your suggestions.

    I've asked about this problem at github.com/ytdl-org/youtube-dl/issues and on the forum at ffmpeg.org. Someone on the mailing list at ffmpeg.org posted that reply.

    I see those in the m3u file. How can I download the individual blocks of segments? Then how do I join them with ffmpeg ensuring that it makes the timestamps continuous? Could this be added to the youtube-dl script or must it be done separately?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!