[FFmpeg-trac] #11123(ffmpeg:new): Incorrect first audio segment name when using segment_timeline while creating MPEG-DASH

FFmpeg trac at avcodec.org
Sun Aug 4 01:07:07 EEST 2024


#11123: Incorrect first audio segment name when using segment_timeline while
creating MPEG-DASH
-------------------------------------+-------------------------------------
             Reporter:  James        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  7.0
             Keywords:  dash hls     |               Blocked By:
  audio segment                      |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 **What you were trying to accomplish:**

 I'm trying to generate working MPEG-DASH and HLS stream when using
 segment_timeline set to 1.

 **The problem you encountered:**

 The first audio chunk has incorrect name. Instead of having file with name
 like: **chunk_stream_128000_0.m4s**

 FFmpeg generates filename: **chunk_stream_128000_-1024.m4s**

 After manually changing the filename of the first audio chunk to
 **chunk_stream_128000_0.m4s** MPEG-DASH stream plays without any problems.

 Also I've noticed that HLS has proper name added to the the playlist.

 How to reproduce:
 {{{
 % ffmpeg -threads 4 -i Tearsofsteel_4K_Proper_HQ.mp4 -i 3840x2160.png -i
 2560x1440.png -i 1920x1080.png -i 1280x720.png -i 1024x576.png
 -filter_complex "[0:v][1:v]overlay=50:50[out0]" -filter_complex
 "[0:v][2:v]overlay=50:50[out1]" -filter_complex "[0:v][3
 :v]overlay=50:50[out2]" -filter_complex "[0:v][4:v]overlay=50:50[out3]"
 -filter_complex "[0:v][5:v]overlay=50:50[out4]" -flags +cgop+ilme -pix_fmt
 nv12 -g 24 -keyint_min 48 -b_strategy 0 -bf 1 -c:a:0 aac -b:a:0 128000
 -preset veryfast -tune zerolatency -
 ac:a:0 2 -ar:a:0 48000 -map "[out0]" -map "[out1]" -map "[out2]" -map
 "[out3]" -map "[out4]" -map a:0 -s:v:0 3840x2160 -c:v:0 h264_qsv -b:v:0
 15000000 -s:v:1 2560x1440 -c:v:1 h264_qsv -b:v:1 6500000 -s:v:2 1920x1080
 -c:v:2 h264_qsv -b:v:2 5000000 -s:v:3
 1280x720 -c:v:3 h264_qsv -b:v:3 1500000 -s:v:4 1024x576 -c:v:4 h264_qsv
 -b:v:4 1000000 -force_key_frames:v:0 "expr:gte(t,n_forced*2)"
 -force_key_frames:v:1 "expr:gte(t,n_forced*2)" -force_key_frames:v:2
 "expr:gte(t,n_forced*2)" -force_key_frames:v:3 "exp
 r:gte(t,n_forced*2)" -force_key_frames:v:4 "expr:gte(t,n_forced*2)"
 -profile:v:0 high -level:v:0 5.2 -profile:v:1 high -level:v:1 5.2
 -profile:v:2 high -level:v:2 4.1 -profile:v:3 high -level:v:3 4.0
 -profile:v:4 main -level:v:4 4.0 -profile:v:5 baseline
  -level:v:5 3.0 -minrate:v:0 15000000 -maxrate:v:0 15000000 -bufsize:v:0
 15000000 -minrate:v:1 6500000 -maxrate:v:1 6500000 -bufsize:v:1 6500000
 -minrate:v:2 5000000 -maxrate:v:2 5000000 -bufsize:v:2 5000000
 -minrate:v:3 1500000 -maxrate:v:3 1500000 -buf
 size:v:3 1500000 -minrate:v:4 1000000 -maxrate:v:4 1000000 -bufsize:v:4
 1000000 -metadata "title=Tears of Steel" -metadata:s:a:0 "language=eng"
 -use_timeline 1 -use_template 1 -async 1 -vsync 1 -ldash 1 -lhls 1
 -index_correction 1 -strftime 1 -adaptation
 _sets "id=0,streams=0,1,2,3,4 id=1,streams=5" -mpd_profile 1+2
 -hls_playlist 1 -hls_master_name master.m3u8 -init_seg_name
 "\$RepresentationID\$/init_stream_\$Bandwidth\$.mp4" -media_seg_name
 "\$RepresentationID\$/chunk_stream_\$Bandwidth\$_\$Time\$.\$ex
 t\$" -seg_duration 2 -frag_duration 2 -frag_type duration -strict
 experimental -movflags +faststart+cmaf -write_prft 1 -utc_timing_url
 "https://time.akamai.com/?iso" -dash_segment_type mp4 -chunk_duration_ms
 2000 -r 24 -f dash video.mpd -report

 ffmpeg version 7.0.1 Copyright (c) 2000-2024 the FFmpeg developers
   built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
   configuration: --cc='gcc -m64 -fPIC' --prefix=/usr/local --pkg-config-
 flags=--static --extra-cflags=-I/usr/local/include --extra-
 ldflags=-L/usr/local/lib --extra-libs='-lpthread -lm' --ld=g++
 --bindir=/usr/local/bin --enable-gpl --enable-shared --enabl
 e-gnutls --enable-nonfree --enable-version3 --enable-libbluray --enable-
 libopenjpeg --enable-libtheora --enable-vdpau --enable-opencl --enable-
 libsmbclient --enable-libsoxr --enable-libspeex --enable-libssh --enable-
 libxvid --enable-omx --enable-openal -
 -enable-vaapi --enable-libass --enable-libfdk-aac --enable-libfreetype
 --enable-libmp3lame --enable-libopus --enable-libdav1d --enable-libvorbis
 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libvpl
 --enable-demuxer=dash --enable-libxml2 --en
 able-nonfree

 }}}

 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11123>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list