[FFmpeg-trac] #9701(undetermined:new): DASH: Cannot skip to unbuffered video parts in ffmpeg > 4.2.2

FFmpeg trac at avcodec.org
Sun Mar 27 15:12:45 EEST 2022


#9701: DASH: Cannot skip to unbuffered video parts in ffmpeg > 4.2.2
--------------------------------------+----------------------------------
             Reporter:  cars10        |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  undetermined  |                  Version:  4.2.4
             Keywords:  DASH          |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 == Summary of the bug: ==

 When using DASH with ffmpeg <= 4.2.2 i can skip to unbuffered parts in the
 video (tested with the official dash.js client and with shaka player).
 With every version >4.2.2 this is not possible, the video does not load.

 Link to playable MPD file:
 * '''working manifest''', generated with ffmpeg 4.2.2:
 https://static.cars10k.de/dash-error/ffmpeg-4.2.2/manifest.mpd
 * '''not working manifest''', generated with ffmpeg n5.0:
 https://static.cars10k.de/dash-error/ffmpeg-n5.0/manifest.mpd

 You can test these files in any dash capable player, for example
 * the official dash reference player
 [https://reference.dashif.org/dash.js/latest/samples/dash-if-reference-
 player/index.html]
 * shaka player [https://shaka-player-
 demo.appspot.com/demo/#build=compiled]


 == How to reproduce: ==

 1. Get a test video, for example this 1080p test video of a timer:
 [https://static.cars10k.de/dash-error/input.mp4]
 2. Create 480p and 720p version of the video

 480p
 {{{
 bash -c "ffmpeg -y -i input.mp4 -map 0:v:0 -vsync passthrough -c:v libx264
 -keyint_min 24 -g 24 -sc_threshold 0 -crf 23 -maxrate 2500k -bufsize 5M
 -profile:v main -preset slow -an -dn -sn -write_tmcd 0 -map_chapters -1
 -vf scale='trunc(oh*a/2)'*2:480 -movflags +faststart -aspect 16:9
 output480.mp4"
 }}}

 720p
 {{{
 bash -c "ffmpeg -y -i input.mp4 -map 0:v:0 -vsync passthrough -c:v libx264
 -keyint_min 24 -g 24 -sc_threshold 0 -crf 20 -maxrate 5M -bufsize 10M
 -profile:v main -preset slow -an -dn -sn -write_tmcd 0 -map_chapters -1
 -vf scale='trunc(oh*a/2)'*2:720 -movflags +faststart -aspect 16:9
 output720.mp4"
 }}}

 3. Generate dash manifest

 {{{
 bash -c 'ffmpeg -y -i output480.mp4 -i output720.mp4 -c copy \
         -map 0:v:0 -map 0:v:0 -f dash -single_file 1 -single_file_name
 stream-\$RepresentationID\$.m4s \
         -adaptation_sets "id=0,streams=0,1" manifest.mpd'
 }}}

 4. Load the manifest in a dash capable player, for example
 * the official dash reference player
 [https://reference.dashif.org/dash.js/latest/samples/dash-if-reference-
 player/index.html]
 * shaka player [https://shaka-player-
 demo.appspot.com/demo/#build=compiled]

 5. Immediately skip to an unbuffered part of the video (just click on the
 progress bar near the end)


 == Observed behavior ==
 FFMPEG <= 4.2.2 works as expected. You can skip to an unbuffered part, the
 player loads the video, and starts playing.

 FFMPEG > 4.2.2 does not work. It does not load the needed parts and
 play/pause do not work. The videos is broken until you reload the player.
 You can only skip to buffered parts of the video.


 == Expected behavior ==
 The player should load the video correctly, as it does when the file is
 generated with ffmpeg <= 4.2.2

 I have tested multiple versions of ffmpeg (4.3, 4.4, 5.0, etc) and i can
 reproduce the issue with every version > 4.2.2. The last working version
 for this setup is 4.2.2. I have also tested multiple videos from different
 sources.

 It is irrelevant which version of ffmpeg you use to create the 480p and
 720p files, only the last step (dash manifest creation) matters.


 I have already opened an issue in the dashjs repo, but they believe this
 is an issue with ffmpeg. [https://github.com/Dash-Industry-
 Forum/dash.js/issues/3905]
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9701>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list