Opened 8 years ago

Closed 5 years ago

#5692 closed defect (wontfix)

problem with ":" sign in HLS / tee output

Reported by: Milan Cizek Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: hls tee
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

N-80900-g77eb05a

Hi, I have problem with HLS parameters in tee output...

Problem is with parameter with ":" sign such as hls_base_url.
I try escape this with \ and
(described in docs), but the problem remains.

sample:

[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://X.X.X.X/101/:hls_flags=delete_segments...]]/hls/101/mystream.m3u8
[tee @ 0x3647e60] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[tee @ 0x3647e60] No option found near "//X.X.X.X/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8"
[tee @ 0x3647e60] All tee outputs failed.

Change History (7)

comment:1 by Carl Eugen Hoyos, 8 years ago

Please provide the command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:2 by Milan Cizek, 8 years ago

Full command

ffmpeg -hide_banner -loglevel debug -i "udp://@239.23.1.104:1234?fifo_size=1000000&overrun_nonfatal=1" -flags -global_header -map v:0 -c:v nvenc_hevc -b:v 1200k -maxrate 1800k -bufsize 3000k -deinterlace -vf crop=in_w-0:in_h-0,scale=720:576,null -keyint_min 15 -g 50 -map a:0 -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 -f tee "[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://X.X.X.X/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://@239.23.1.101:1234"

comment:3 by Carl Eugen Hoyos, 8 years ago

Please provide the command line (without using -hide_banner) that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:4 by Milan Cizek, 8 years ago

Only public IP address was replaced by A.B.C.D.

# ffmpeg -loglevel debug -i "udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1" -flags -global_header -map v:0 -c:v nvenc_hevc -b:v 1200k -maxrate 1800k -bufsize 32000k -deinterlace -vf crop=in_w-0:in_h-0,scale=720:576,null -keyint_min 15 -g 50 -map a:0 -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 -f tee "[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234"
ffmpeg version N-80900-g77eb05a Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --prefix=/FFMPEG --pkg-config-flags=--static --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-nvenc --enable-libmfx --enable-version3 --enable-pthreads --enable-runtime-cpudetect --disable-ffserver --enable-libfreetype --enable-filter=drawtext
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.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 'udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '-global_header'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument 'v:0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'nvenc_hevc'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '1200k'.
Reading option '-maxrate' ... matched as AVOption 'maxrate' with argument '1800k'.
Reading option '-bufsize' ... matched as AVOption 'bufsize' with argument '32000k'.
Reading option '-deinterlace' ... matched as option 'deinterlace' (this option is deprecated, use the yadif filter instead) with argument '1'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'crop=in_w-0:in_h-0,scale=720:576,null'.
Reading option '-keyint_min' ... matched as AVOption 'keyint_min' with argument '15'.
Reading option '-g' ... matched as AVOption 'g' with argument '50'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument 'a:0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libfdk_aac'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '128k'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'tee'.
Reading option '[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option deinterlace (this option is deprecated, use the yadif filter instead) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1.
Successfully parsed a group of options.
Opening an input file: udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1.
[udp @ 0x4177160] No default whitelist set
[udp @ 0x4177160] end receive buffer size reported is 131072
[mpegts @ 0x4176760] Format mpegts probed with size=2048 and score=50
[mpegts @ 0x4176760] stream=0 stream_type=6 pid=34 prog_reg_desc=
[mpegts @ 0x4176760] stream=1 stream_type=3 pid=64 prog_reg_desc=
[mpegts @ 0x4176760] stream=2 stream_type=2 pid=a5 prog_reg_desc=
[mpegts @ 0x4176760] Before avformat_find_stream_info() pos: 0 bytes read:28952 seeks:0 nb_streams:3
[mpegts @ 0x4176760] parser not found for codec dvb_teletext, packets or times may be invalid.
    Last message repeated 1 times
[mpeg2video @ 0x419d980] Invalid frame dimensions 0x0.
    Last message repeated 10 times
[mpegts @ 0x4176760] max_analyze_duration 7000000 reached at 7008000 microseconds st:1
[mpegts @ 0x4176760] After avformat_find_stream_info() pos: 3050488 bytes read:3050488 seeks:0 frames:657
Input #0, mpegts, from 'udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1':
  Duration: N/A, start: 92306.331533, bitrate: N/A
  Program 8006
    Stream #0:0[0x34](cze), 181, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:1[0x64](cze), 294, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:2[0xa5], 182, 1/90000: Video: mpeg2video (Main), 1 reference frame ([2][0][0][0] / 0x0002), yuv420p(tv, left), 720x576 [SAR 64:45 DAR 16:9], 0/1, 25 fps, 25 tbr, 90k tbn, 50 tbc
Successfully opened the file.
Parsing a group of options: output file [f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234.
Applying option map (set input stream mapping) with argument v:0.
Applying option c:v (codec name) with argument nvenc_hevc.
Applying option b:v (video bitrate (please use -b:v)) with argument 1200k.
Applying option vf (set video filters) with argument crop=in_w-0:in_h-0,scale=720:576,null.
Applying option map (set input stream mapping) with argument a:0.
Applying option c:a (codec name) with argument libfdk_aac.
Applying option b:a (video bitrate (please use -b:v)) with argument 128k.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option f (force format) with argument tee.
Successfully parsed a group of options.
Opening an output file: [f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234.
Successfully opened the file.
detected 8 logical cores
[Parsed_crop_0 @ 0x451e780] Setting 'out_w' to value 'in_w-0'
[Parsed_crop_0 @ 0x451e780] Setting 'out_h' to value 'in_h-0'
[Parsed_scale_1 @ 0x41917e0] Setting 'w' to value '720'
[Parsed_scale_1 @ 0x41917e0] Setting 'h' to value '576'
[Parsed_scale_1 @ 0x41917e0] Setting 'flags' to value 'bicubic'
[Parsed_scale_1 @ 0x41917e0] w:720 h:576 flags:'bicubic' interl:0
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'video_size' to value '720x576'
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'time_base' to value '1/90000'
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'pixel_aspect' to value '64/45'
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:2 @ 0x4192080] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:2 @ 0x4192080] w:720 h:576 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:64/45 sws_param:flags=2
[format @ 0x4192980] compat: called with args=[yuv420p|nv12|yuv444p]
[format @ 0x4192980] Setting 'pix_fmts' to value 'yuv420p|nv12|yuv444p'
[AVFilterGraph @ 0x44c8b40] query_formats: 7 queried, 6 merged, 0 already done, 0 delayed
[Parsed_crop_0 @ 0x451e780] w:720 h:576 sar:64/45 -> w:720 h:576 sar:64/45
[Parsed_scale_1 @ 0x41917e0] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:yuv420p sar:64/45 flags:0x4
[graph 1 input from stream 0:1 @ 0x41932e0] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 0:1 @ 0x41932e0] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 0:1 @ 0x41932e0] Setting 'sample_fmt' to value 's16p'
[graph 1 input from stream 0:1 @ 0x41932e0] Setting 'channel_layout' to value '0x3'
[graph 1 input from stream 0:1 @ 0x41932e0] tb:1/48000 samplefmt:s16p samplerate:48000 chlayout:0x3
[audio format for output stream 0:1 @ 0x41951e0] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 0x41951e0] Setting 'sample_rates' to value '44100'
[audio format for output stream 0:1 @ 0x41951e0] Setting 'channel_layouts' to value '0x3'
[audio format for output stream 0:1 @ 0x41951e0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[AVFilterGraph @ 0x41c76e0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x41c8b40] [SWR @ 0x41f0060] Using s16p internally between filters
[auto-inserted resampler 0 @ 0x41c8b40] ch:2 chl:stereo fmt:s16p r:48000Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[nvenc_hevc @ 0x451cf80] This encoder is deprecated, use 'hevc_nvenc' instead
[nvenc_hevc @ 0x451cf80] Nvenc initialized successfully
[nvenc_hevc @ 0x451cf80] 1 CUDA capable devices found
[nvenc_hevc @ 0x451cf80] [ GPU #0 - < Quadro M4000 > has Compute SM 5.2 ]
[nvenc_hevc @ 0x451cf80] supports NVENC
[tee @ 0x41eaa60] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[tee @ 0x41eaa60] No option found near "//A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8"
[tee @ 0x41eaa60] Slave muxer #0 failed: Invalid argument, continuing with 1/2 slaves.
[udp @ 0x4d4c000] No default whitelist set
[mpegts @ 0x4d49f00] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
[tee @ 0x41eaa60] filename:'udp://239.23.1.101:1234' format:mpegts
[tee @ 0x41eaa60]     stream:0 codec:hevc type:video
[tee @ 0x41eaa60]     stream:1 codec:aac type:audio
Output #0, tee, to '[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234':
  Metadata:
    encoder         : Lavf57.41.100
    Stream #0:0, 0, 1/25: Video: hevc (nvenc_hevc) (Main), 1 reference frame, yuv420p(left), 720x576 [SAR 64:45 DAR 16:9], 0/1, q=-1--1, 1200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.48.101 nvenc_hevc
    Side data:
      cpb: bitrate max/min/avg: 1800000/0/1200000 buffer size: 32000000 vbv_delay: -1
    Stream #0:1(cze), 0, 1/44100: Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc57.48.101 libfdk_aac
Stream mapping:
  Stream #0:2 -> #0:0 (mpeg2video (native) -> hevc (nvenc_hevc))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    Last message repeated 3 times
[mpegts @ 0x4176760] Correcting start time by 159078
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    Last message repeated 33 times
*** 14 dup!
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    Last message repeated 151 times
[AVIOContext @ 0x4d5c8a0] Statistics: 0 seeks, 2003 writeoutsN/A dup=14 drop=0 speed=4.37x
frame=  252 fps=109 q=29.0 Lsize=N/A time=00:00:10.08 bitrate=N/A dup=14 drop=0 speed=4.35x
video:2109kB audio:156kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (udp://@239.23.0.104:1234?fifo_size=1000000&overrun_nonfatal=1):
  Input stream #0:0 (subtitle): 182 packets read (161798 bytes);
  Input stream #0:1 (audio): 414 packets read (159620 bytes); 414 frames decoded (476928 samples);
  Input stream #0:2 (video): 253 packets read (4387918 bytes); 240 frames decoded;
  Total: 849 packets (4709336 bytes) demuxed
Output file #0 ([f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\://A.B.C.D/101/:hls_flags=delete_segments:hls_segment_filename=/hls/101/mystream-%08d.ts]/hls/101/mystream.m3u8|[f=mpegts]udp://239.23.1.101:1234):
  Output stream #0:0 (video): 252 frames encoded; 252 packets muxed (2159942 bytes);
  Output stream #0:1 (audio): 427 frames encoded (437248 samples); 429 packets muxed (159682 bytes);
  Total: 681 packets (2319624 bytes) muxed
654 frames successfully decoded, 0 decoding errors
[nvenc_hevc @ 0x451cf80] Nvenc unloaded
[AVIOContext @ 0x4197480] Statistics: 5020540 bytes read, 0 seeks

comment:5 by Carl Eugen Hoyos, 8 years ago

Keywords: hls tee added

Is this still reproducible?
Is network input required to reproduce this issue or is it also reproducible with -f lavfi -i testsrc?

comment:6 by tbucher, 7 years ago

This does not concern the input type.

The issue here is that one backward slash in the example is not enough, triple escaping is actually necessary (escaping just twice is also fine on Windows).

Based on the provided example, the command line params need to be (note the hls_base_url part)

[f=hls:hls_time=5:hls_list_size=6:hls_base_url=http\\\://X.X.X.X/101/:hls_flags=delete_segments...]]/hls/101/mystream.m3u8

comment:7 by Balling, 5 years ago

Resolution: wontfix
Status: newclosed

Well it works. "triple escaping", heh.

Note: See TracTickets for help on using tickets.