RTMP and proxy

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RTMP and proxy

Verachten Bruno
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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: RTMP and proxy

Madovsky

On 6/29/2020 10:23 AM, Verachten Bruno wrote:

> 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.
take a look here
https://ffmpeg.org/ffmpeg-protocols.html#rtmp

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: RTMP and proxy

Verachten Bruno
Thanks. I have just recompiled ffmpeg with librtmp, and I now have
access to the socks proxy option. Except my proxy is not a socks
proxy.
What about the -http_proxy option? Do I have to add a special option
to configure to get ffmpeg to understand this option?

Thanks.

On Mon, Jun 29, 2020 at 7:29 PM Madovsky <[hidden email]> wrote:

>
>
> On 6/29/2020 10:23 AM, Verachten Bruno wrote:
> > 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.
> take a look here
> https://ffmpeg.org/ffmpeg-protocols.html#rtmp
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".



--
Bruno Verachten
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: RTMP and proxy

Moritz Barsnick
In reply to this post by Verachten Bruno
On Mon, Jun 29, 2020 at 19:23:25 +0200, Verachten Bruno wrote:
> 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
> Option http_proxy not found.
>
> Why do I get "option http_proxy not found"?

Because you specified it as an option for the input file.

I assume you will get the same error, though, when you "correctly"
place the option before your output URI, because RTMP does not support
this option either. As far as I understand, RTMP is nothing like HTTP,
so an HTTP proxy would be of no use.

Apparently, RTMPT is the protocol that was made for encapsulating RTMP
in HTTP, but then twitch would have to support that too, in order for
it to work for you.

(If you are in an environment with an HTTP proxy but no SOCKS proxy,
and no direct internet access, then this is exactly the sort of thing
they are trying to prevent you doing.)

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: RTMP and proxy

Verachten Bruno
Thanks a lot Moritz, I figured the option placement later on, I
thought it applied to the whole command.
And you're right, all is done so that I can't stream from inside the
company to outside the company... except the company now wants to
stream outside.
I will try to get a SOCKS proxy installed... and will go on with my
redsocks2 experiments (it worked on one machine) with the CONNECT
proxy command.

Best regards,

On Mon, Jun 29, 2020 at 10:26 PM Moritz Barsnick <[hidden email]> wrote:

>
> On Mon, Jun 29, 2020 at 19:23:25 +0200, Verachten Bruno wrote:
> > 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
> > Option http_proxy not found.
> >
> > Why do I get "option http_proxy not found"?
>
> Because you specified it as an option for the input file.
>
> I assume you will get the same error, though, when you "correctly"
> place the option before your output URI, because RTMP does not support
> this option either. As far as I understand, RTMP is nothing like HTTP,
> so an HTTP proxy would be of no use.
>
> Apparently, RTMPT is the protocol that was made for encapsulating RTMP
> in HTTP, but then twitch would have to support that too, in order for
> it to work for you.
>
> (If you are in an environment with an HTTP proxy but no SOCKS proxy,
> and no direct internet access, then this is exactly the sort of thing
> they are trying to prevent you doing.)
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".



--
Bruno Verachten
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".