Opened 3 months ago

Last modified 3 months ago

#7159 new task

recursive create segment folder with HLS muxer

Reported by: krs_vital Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg doesn't create HLS segment folder if it not exists. It is inconvenient to use an additional script to create and track folders...

command line:
/usr/local/bin/ffmpeg -dts_delta_threshold 3600 -fflags +flush_packets+genpts -err_detect ignore_err -correct_ts_overflow 0 -vsync 0 -buffer_size 8388608 -fifo_size 40000 -overrun_nonfatal 1 -copytb 1 -i udp://239.192.2.250:1234 -y -sn -dn -vcodec copy -acodec aac -hls_time 10 -map 0 -ignore_unknown -strict -2 -use_localtime 1 -max_interleave_delta 360000000000 -hls_segment_filename /home/TNT/%Y/%m/%d/%H/%s.ts /tmp/TNT.m3u8

ffmpeg version N-90817-gd9706f7 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
configuration:
libavutil 56. 15.100 / 56. 15.100
libavcodec 58. 19.100 / 58. 19.100
libavformat 58. 13.100 / 58. 13.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 19.100 / 7. 19.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100

[h264 @ 0x26bfd00] SPS unavailable in decode_picture_timing
[h264 @ 0x26bfd00] non-existing PPS 0 referenced
[h264 @ 0x26bfd00] SPS unavailable in decode_picture_timing
[h264 @ 0x26bfd00] non-existing PPS 0 referenced
[h264 @ 0x26bfd00] decode_slice_header error
................................
................................

Last message repeated 1 times

[h264 @ 0x26bfd00] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
Input #0, mpegts, from 'udp://239.192.2.250:1234':

Duration: N/A, start: 26982.132778, bitrate: N/A
Program 2090

Metadata:

service_name : ?19 б╫б
service_provider: ?юбюа

Stream #0:0[0x82d]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x82e]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x835]: Data: scte_35

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))

Press [q] to stop, ? for help
[hls @ 0x282bd00] Opening '/home/TNT/2018/04/24/12/1524547429.ts' for writing
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
Error initializing output stream 0:1 --

Can you create advanced hls parameter, sush as -hls_force_create_segment_folder which would solve the problem?

Change History (1)

comment:1 Changed 3 months ago by stevenliu

there have an option -use_localtime_mkdir you can try it

Note: See TracTickets for help on using tickets.