Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#11198 closed defect (invalid)

Specified MPEG-TS mpegts_pmt_start_pid is not written to HLS(-ssegment) segments

Reported by: adamvaul Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: hls metadata segment
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description (last modified by adamvaul)

Summary of the bug:

See a partial fix (12 years ago) here: https://trac.ffmpeg.org/ticket/2230

This only provided a fix for metadata flags
-service_name
-service_provider
to be passed on to the chained mpegts muxer

but it did not pass on the flags for
-mpegts_pmt_start_pid or
-mpegts_start_pid

You can obtain a copy of big buck bunny here: https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4

What I want:

-mpegts_pmt_start_pid and/or -mpegts_start_pid flags to be passed on to the mpegts muxer

Then, if you use TSDuck tsanalyze tool (or another mpegts analyzyer) on .ts segment files you should see
tsanalyze output of final file:
|===========================================================================|
|  PID: 0x01E0 (480)                                                     PMT| 

What I get:

|===========================================================================|
|  PID: 0x1000 (4096)                                                    PMT|

How to reproduce:

ffmpeg -i BigBuckBunny_320x180.mp4 -t 24 -hls_playlist_type vod -sc_threshold 0 -mpegts_pmt_start_pid 480 -mpegts_start_pid 481 -f hls BigBuckBunny.m3u8

See Report logs attached.

Attachments (1)

ffmpeg-20240919-165410.log (366.3 KB ) - added by adamvaul 23 months ago.
Report logs

Download all attachments as: .zip

Change History (12)

by adamvaul, 23 months ago

Attachment: ffmpeg-20240919-165410.log added

Report logs

comment:1 by adamvaul, 23 months ago

Description: modified (diff)

comment:2 by adamvaul, 23 months ago

Description: modified (diff)

comment:3 by adamvaul, 23 months ago

Description: modified (diff)

comment:4 by adamvaul, 23 months ago

Description: modified (diff)

comment:5 by Gyan, 23 months ago

Resolution: invalid
Status: newclosed

Your command uses the HLS muxer (-f hls), for which you have to specify
-hls_segment_options mpegts_pmt_start_pid=X:mpegts_start_pid=Y to pass on the values

comment:6 by Gyan, 23 months ago

Priority: importantnormal
Version: git-master

comment:7 by adamvaul, 23 months ago

Description: modified (diff)

Thank you so much. I will try this!

comment:8 by adamvaul, 23 months ago

Description: modified (diff)

comment:9 by adamvaul, 23 months ago

Full working command here:

ffmpeg 
  -i BigBuckBunny_320x180.mp4 
  -t 24 
  -hls_playlist_type vod 
  -sc_threshold 0 
  -hls_segment_options mpegts_pmt_start_pid=480:mpegts_start_pid=481 
  -f hls 
  BigBuckBunny.m3u8
Last edited 23 months ago by adamvaul (previous) (diff)

comment:10 by adamvaul, 23 months ago

Description: modified (diff)

comment:11 by adamvaul, 23 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.