Opened 3 months ago

#11123 new defect

Incorrect first audio segment name when using segment_timeline while creating MPEG-DASH

Reported by: James Owned by:
Priority: normal Component: ffmpeg
Version: 7.0 Keywords: dash hls audio segment
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Attachments (5)

1024x576.png (8.1 KB ) - added by James 3 months ago.
1024x576.png Resolution File
1280x720.png (8.6 KB ) - added by James 3 months ago.
1280x720.png Resolution File
1920x1080.png (9.4 KB ) - added by James 3 months ago.
1920x1080.png Resolution File
2560x1440.png (9.2 KB ) - added by James 3 months ago.
2560x1440.png Resolution File
3840x2160.png (10.0 KB ) - added by James 3 months ago.
3840x2160.png Resolution File

Download all attachments as: .zip

Change History (5)

by James, 3 months ago

Attachment: 1024x576.png added

1024x576.png Resolution File

by James, 3 months ago

Attachment: 1280x720.png added

1280x720.png Resolution File

by James, 3 months ago

Attachment: 1920x1080.png added

1920x1080.png Resolution File

by James, 3 months ago

Attachment: 2560x1440.png added

2560x1440.png Resolution File

by James, 3 months ago

Attachment: 3840x2160.png added

3840x2160.png Resolution File

Note: See TracTickets for help on using tickets.