Re: [FFmpeg-user] RTMP and proxy

2020-06-30 Thread 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  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
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".



-- 
Bruno Verachten
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] RTMP and proxy

2020-06-29 Thread Moritz Barsnick
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
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] RTMP and proxy

2020-06-29 Thread 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  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
> >libavformat58. 29.100 / 58. 29.100
> >libavdevice58.  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
> >libpostproc55.  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
> >libavformat58. 29.100 / 58. 29.100
> >libavdevice58.  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
> >libpostproc55.  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 

Re: [FFmpeg-user] RTMP and proxy

2020-06-29 Thread 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
   libavformat58. 29.100 / 58. 29.100
   libavdevice58.  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
   libpostproc55.  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
   libavformat58. 29.100 / 58. 29.100
   libavdevice58.  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
   libpostproc55.  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: