[FFmpeg-user] RTMP and proxy

Verachten Bruno gounthar at gmail.com
Mon Jun 29 20:23:25 EEST 2020


Hi there,

I'm trying to get ffmpeg to use a proxy. Here is my command:
 ffmpeg -http_proxy "http://192.168.0.217:3128/" -i sample.h264 -c:v
copy -c:a copy -f flv "rtmp://live-cdg.twitch.tv/app/live_toto"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-http_proxy' ... matched as AVOption 'http_proxy' with
argument 'http://192.168.0.217:3128/'.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto' ... matched
as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
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 url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x2c7a580] Opening 'sample.h264' for reading
[file @ 0x2c7adc0] Setting default whitelist 'file,crypto'
[h264 @ 0x2c7a580] Format h264 probed with size=2048 and score=51
Option http_proxy not found.

Why do I get "option http_proxy not found"?

I tried another way of using the proxy:
 ffmpeg -i sample.h264 -c:v copy -c:a copy -f flv
"rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128"
-loglevel debug
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-39)
  configuration: --pkg-config-flags=--static --prefix=/root/bin
--extra-cflags=-I/root/bin/include --extra-ldflags=-L/root/bin/lib
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/root/bin --enable-debug=3 --disable-debug --enable-gpl
--cpu=native --enable-libfdk-aac --enable-libx264
--extra-libs=-lpthread --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'sample.h264'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'flv'.
Reading option 'rtmp://live-cdg.twitch.tv/app/live_toto
socks=192.168.0.217:3128' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
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 url sample.h264.
Successfully parsed a group of options.
Opening an input file: sample.h264.
[NULL @ 0x40d24c0] Opening 'sample.h264' for reading
[file @ 0x40d2dc0] Setting default whitelist 'file,crypto'
[h264 @ 0x40d24c0] Format h264 probed with size=2048 and score=51
[h264 @ 0x40d24c0] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:1
[AVBSFContext @ 0x40d3000] nal_unit_type: 7(SPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 8(PPS), nal_ref_idc: 1
[AVBSFContext @ 0x40d3000] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 8(PPS), nal_ref_idc: 1
[h264 @ 0x40d3bc0] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x40d3bc0] Format yuv420p chosen by get_format().
[h264 @ 0x40d3bc0] Reinit context to 960x720, pix_fmt: yuv420p
[h264 @ 0x40d3bc0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 1
    Last message repeated 5 times
[h264 @ 0x40d24c0] max_analyze_duration 5000000 reached at 5000000
microseconds st:0
[h264 @ 0x40d24c0] After avformat_find_stream_info() pos: 192512 bytes
read:196608 seeks:0 frames:127
Input #0, h264, from 'sample.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0, 127, 1/1200000: Video: h264 (High), 1 reference
frame, yuv420p(progressive, left), 960x720, 0/1, 25 fps, 25 tbr, 1200k
tbn, 50 tbc
Successfully opened the file.
Parsing a group of options: output url
rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128.
Applying option c:v (codec name) with argument copy.
Applying option c:a (codec name) with argument copy.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://live-cdg.twitch.tv/app/live_toto
socks=192.168.0.217:3128.
[rtmp @ 0x40d5c80] No default whitelist set
[rtmp @ 0x40d5c80] Detected librtmp style URL parameters, these aren't
supported by the libavformat internal RTMP handler currently enabled.
See the documentation for the correct way to pass parameters.
[tcp @ 0x40d3580] No default whitelist set
[tcp @ 0x40d3580] Original list of addresses:
[tcp @ 0x40d3580] Address 52.223.195.194 port 1935
[tcp @ 0x40d3580] Address 52.223.195.236 port 1935
[tcp @ 0x40d3580] Address 52.223.195.16 port 1935
[tcp @ 0x40d3580] Address 52.223.195.205 port 1935
[tcp @ 0x40d3580] Address 52.223.195.25 port 1935
[tcp @ 0x40d3580] Address 52.223.195.28 port 1935
[tcp @ 0x40d3580] Address 52.223.195.146 port 1935
[tcp @ 0x40d3580] Address 52.223.195.95 port 1935
[tcp @ 0x40d3580] Address 52.223.195.9 port 1935
[tcp @ 0x40d3580] Address 52.223.195.211 port 1935
[tcp @ 0x40d3580] Address 52.223.195.119 port 1935
[tcp @ 0x40d3580] Address 52.223.195.169 port 1935
[tcp @ 0x40d3580] Interleaved list of addresses:
[tcp @ 0x40d3580] Address 52.223.195.194 port 1935
[tcp @ 0x40d3580] Address 52.223.195.236 port 1935
[tcp @ 0x40d3580] Address 52.223.195.16 port 1935
[tcp @ 0x40d3580] Address 52.223.195.205 port 1935
[tcp @ 0x40d3580] Address 52.223.195.25 port 1935
[tcp @ 0x40d3580] Address 52.223.195.28 port 1935
[tcp @ 0x40d3580] Address 52.223.195.146 port 1935
[tcp @ 0x40d3580] Address 52.223.195.95 port 1935
[tcp @ 0x40d3580] Address 52.223.195.9 port 1935
[tcp @ 0x40d3580] Address 52.223.195.211 port 1935
[tcp @ 0x40d3580] Address 52.223.195.119 port 1935
[tcp @ 0x40d3580] Address 52.223.195.169 port 1935
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.194 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.194 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.236 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.236 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.16 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.16 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.205 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.205 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.25 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.25 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.28 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.28 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.146 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.146 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.95 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.95 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.9 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.9 port 1935 failed:
Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.211 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.211 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.119 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.119 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Starting connection attempt to 52.223.195.169 port 1935
[tcp @ 0x40d3580] Connection attempt to 52.223.195.169 port 1935
failed: Connection refused
[tcp @ 0x40d3580] Connection to tcp://live-cdg.twitch.tv:1935 failed:
Connection refused
[rtmp @ 0x40d5c80] Cannot open connection tcp://live-cdg.twitch.tv:1935
rtmp://live-cdg.twitch.tv/app/live_toto socks=192.168.0.217:3128:
Connection refused

The message that bugs me is : "Detected librtmp style URL parameters,
these aren't supported by the libavformat internal RTMP handler
currently enabled. See the documentation for the correct way to pass
parameters."
I have not been able to find that documentation yet, just that:
https://ffmpeg.org/ffmpeg.html#AVOptions

Thanks.

-- 
Bruno Verachten


More information about the ffmpeg-user mailing list