[FFmpeg-trac] #3356(undetermined:open): feature request: Segment HLS streams on SCTE 35 markers

FFmpeg trac at avcodec.org
Thu Dec 25 15:26:11 CET 2014


#3356: feature request: Segment HLS streams on SCTE 35 markers
-------------------------------------+-------------------------------------
             Reporter:  adamscybot   |                    Owner:
                 Type:  enhancement  |                   Status:  open
             Priority:  wish         |                Component:
              Version:  git-master   |  undetermined
             Keywords:  hls bounty   |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by er.anshul.maheshwari@…):

 @adamscybot

 I am able to parse scte data using ffmpeg,
 here is debug print of ffmpeg.
 a141982112 at linux-6jho:~/work/anshul/Project/FFmpeg> ./ffmpeg -loglevel
 debug -i ~/test_videos/mpegwithscte35.ts -dcodec cue_xml -map 0:0 some.ts
 ffmpeg version N-67232-g2ff4edf Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Dec 24 2014 16:06:16 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libass --disable-optimizations --enable-libx264
 --enable-gpl --enable-libfreetype --disable-optimizations
   libavutil      54. 11.100 / 54. 11.100
   libavcodec     56. 10.100 / 56. 10.100
   libavformat    56. 11.100 / 56. 11.100
   libavdevice    56.  2.100 / 56.  2.100
   libavfilter     5.  2.100 /  5.  2.100
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Reading option '-i' ... matched as input file with argument
 '/home/a141982112/test_videos/mpegwithscte35.ts'.
 Reading option '-dcodec' ... matched as option 'dcodec' (force data codec
 ('copy' to copy stream)) with argument 'cue_xml'.
 Reading option '-map' ... matched as option 'map' (set input stream
 mapping) with argument '0:0'.
 Reading option 'some.ts' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Successfully parsed a group of options.
 Parsing a group of options: input file
 /home/a141982112/test_videos/mpegwithscte35.ts.
 Successfully parsed a group of options.
 Opening an input file: /home/a141982112/test_videos/mpegwithscte35.ts.
 [mpegts @ 0xa21c980] Format mpegts probed with size=2048 and score=100
 [mpegts @ 0xa21c980] stream=1 stream_type=1b pid=65 prog_reg_desc=CUEI
 [mpegts @ 0xa21c980] stream=2 stream_type=4 pid=100 prog_reg_desc=CUEI
 [mpegts @ 0xa21c980] Before avformat_find_stream_info() pos: 0 bytes
 read:131072 seeks:1
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] non-existing SPS 0 referenced in buffering period
 [h264 @ 0xa220d00] non-existing PPS 0 referenced
 [h264 @ 0xa220d00] decode_slice_header error
 [h264 @ 0xa220d00] no frame!
 [h264 @ 0xa220d00] Current profile doesn't provide more RBSP data in PPS,
 skipping
 [h264 @ 0xa220d00] Increasing reorder buffer to 1
 [h264 @ 0xa220d00] no picture
 [mpegts @ 0xa21c980] All programs have pmt, headers found
 [mpegts @ 0xa21c980] All info found
 [mpegts @ 0xa21c980] Estimating duration from bitrate, this may be
 inaccurate
 [mpegts @ 0xa21c980] After avformat_find_stream_info() pos: 153032 bytes
 read:294912 seeks:1 frames:39
 Input #0, mpegts, from '/home/a141982112/test_videos/mpegwithscte35.ts':
   Duration: 02:08:49.44, start: 89668.801522, bitrate: 120 kb/s
   Program 1
     Stream #0:0[0x135], 0, 1/90000: Data: scte_35, 0/1
     Stream #0:1[0x65], 21, 1/90000: Video: h264 (Main) ([27][0][0][0] /
 0x001B), yuv420p(tv, bt470bg, left), 544x576 [SAR 64:33 DAR 544:297],
 1/50, 25 fps, 50 tbr, 90k tbn, 50 tbc
     Stream #0:2[0x100](eng), 18, 1/90000: Audio: mp2 ([4][0][0][0] /
 0x0004), 48000 Hz, stereo, s16p, 120 kb/s
 Successfully opened the file.
 Parsing a group of options: output file some.ts.
 Applying option dcodec (force data codec ('copy' to copy stream)) with
 argument cue_xml.
 Applying option map (set input stream mapping) with argument 0:0.
 Successfully parsed a group of options.
 Opening an output file: some.ts.
 File 'some.ts' already exists. Overwrite ? [y/N] y
 Successfully opened the file.
 [mpegts @ 0xa2881a0] muxrate VBR, pcr every 9000 pkts, sdt every 200,
 pat/pmt every 40 pkts
 Output #0, mpegts, to 'some.ts':
   Metadata:
     encoder         : Lavf56.11.100
     Stream #0:0, 0, 1/90000: Data: cue_xml, 0/1, 128 kb/s
     Metadata:
       encoder         : Lavc56.10.100 cue_xml
 Stream mapping:
   Stream #0:0 -> #0:0 (scte_35 (native) -> cue_xml (native))
 Press [q] to stop, [?] for help
 [mpegts @ 0xa21c980] Correcting start time by 9223371947185974285
 [SCTE 35 Decoder @ 0xa222ec0] NULL packet
     Last message repeated 29 times
 [SCTE 35 Decoder @ 0xa222ec0] Insert cmd
 [SCTE 35 Decoder @ 0xa222ec0] event_id  = 296
 [SCTE 35 Decoder @ 0xa222ec0] splice_event_cancel_indicator  = 0
 [SCTE 35 Decoder @ 0xa222ec0] flags  = ef
 [SCTE 35 Decoder @ 0xa222ec0] out_of_network_indicator  = 1
 [SCTE 35 Decoder @ 0xa222ec0] program_splice_flag  = 1
 [SCTE 35 Decoder @ 0xa222ec0] duration_flag  = 1
 [SCTE 35 Decoder @ 0xa222ec0] splice_immediate_flag  = 0
 [SCTE 35 Decoder @ 0xa222ec0] time  = 1e16a1ab8
 [SCTE 35 Decoder @ 0xa222ec0] NULL packet
     Last message repeated 119 times
 [SCTE 35 Decoder @ 0xa222ec0] Insert cmd
 [SCTE 35 Decoder @ 0xa222ec0] event_id  = 296
 [SCTE 35 Decoder @ 0xa222ec0] splice_event_cancel_indicator  = 0
 [SCTE 35 Decoder @ 0xa222ec0] flags  = 4f
 [SCTE 35 Decoder @ 0xa222ec0] out_of_network_indicator  = 0
 [SCTE 35 Decoder @ 0xa222ec0] program_splice_flag  = 1
 [SCTE 35 Decoder @ 0xa222ec0] duration_flag  = 0
 [SCTE 35 Decoder @ 0xa222ec0] splice_immediate_flag  = 0
 [SCTE 35 Decoder @ 0xa222ec0] time  = 1e2b670d8
 [SCTE 35 Decoder @ 0xa222ec0] NULL packet

 I dont have any tool to cross verify the output.
 In the video you have shared, there is only one splice command, which is
 insert.
 I do need more video with more commands in it.

 I was also looking for some ready made(may be enterprise) tool output to
 verify my output.
 If you can help me, please.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3356#comment:19>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list