Re: [FFmpeg-user] ffmpeg to stream an already h.264 encoded stream

2019-09-12 Thread Verachten Bruno
Thanks a lot Moritz, that did the trick.
So I now have:
ffmpeg -i "$SOURCE" -thread_queue_size 2048 -f pulse -i "$AUDIO_SOURCE"
-c:v copy -map 0:v:0 -map 1:a:0 -c:a libmp3lame -f tee
"[f=flv:onfail=ignore]$YOUTUBE_URL/$KEY|[f=flv:onfail=ignore]local_file.mkv"
which gives
Output #0, tee, to '[f=flv:onfail=ignore]rtmp://
a.rtmp.youtube.com/live2/my-key|[f=flv:onfail=ignore]local_file.mkv':

The output file is created, and the stream on YouTube is working too. I
don't know if MKV is the best format to use in this case.

I still have to figure out how to create a filename with a timestamp in it.
I had a look at the strftime option, but I don't know how to insert it into
the tee parameters.

I have another problem now, which is that the bitrate and the size have
disappeared:
frame= 4491 fps= 29 q=-1.0 size=N/A time=00:02:34.16 bitrate=N/A
speed=0.999x
I guess it's because of the tee. Is there any way to put them back on? It
was useful to check the streaming was going ok.

On Tue, Sep 10, 2019 at 10:03 PM Moritz Barsnick  wrote:

> On Tue, Sep 10, 2019 at 17:25:43 +0200, Verachten Bruno wrote:
> > ffmpeg -i rtmp://192.168.1.212:1935/live/stream1 -thread_queue_size
> > 2048 -f pulse -i
> > alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo -c:v copy
> > -map 0:v:0 -map 1:a:0 -f tee "[f=flv:onfail=ignore]$YOUTUBE_URL/$KEY"
> [...]
> > Automatic encoder selection failed for output stream #0:1. Default
> > encoder for format tee (codec none) is probably disabled. Please
> > choose an encoder manually.
> > Error selecting an encoder for stream 0:1
> >
> > I had other outputs for the tee, but as it was not working, I removed
> > them. There must be something important that I missed in that tee
> > format...
> > Please let me know.
>
> Yes, you missed the actual error message. ;-)
>
> The tee muxer, unlike the flv muxer, doesn't have useful defaults for
> codecs. You are only specifying the video codec ("-c:v copy"), you also
> need to specify an audio codec. AFAICT, flv defaults to mp3, so if you
> want that, you should add "-c:a libmp3lame" to your command line.
>
> Hope this helps,
> 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] ffmpeg to stream an already h.264 encoded stream

2019-09-10 Thread Verachten Bruno
Thanks a lot, I am now able to stream two videos at the same time with
the computer doing almost nothing.
Now, I have to replace the audio of the streams with what is coming
from the FocusRite Scarlett 2i4 2nd generation, and lots of other
things.

Best regards,

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".

[FFmpeg-user] ffmpeg to stream an already h.264 encoded stream

2019-09-09 Thread Verachten Bruno
Hi there,

this is my first message on this list, so please bear with me.
I have access to a h.264 encoder that will supply a few rtmp streams
corresponding to the various HDMI inputs it has. It is supposed to use
ffmpeg by the way (TBS2605).
Anyway... I have a Linux machine, and my goal is to:
 - grab one of these streams, add audio coming from a USB sound card
(FocusRite 2i4 2nd Gen), and stream that to YouTube while recording on
the disk too.
 - grab two of these streams, compose them on top of a template, add
audio (like in https://youtu.be/01nM2Shnyz0?t=1638), stream that to
YouTube while recording on the disk too.

For the time being, I have managed to stream to YouTube, but the
YouTube platform is not happy with my stream quality, saying "The
stream's current bitrate (1653.00 Kbps) is lower than the recommended
bitrate. We recommend that you use a stream bitrate of 4500 Kbps.".
The bitrate that is output by the encoder is supposed to be 4000Kbps.
The ffmpeg command I have gives me around 2200/2400Kbps.
So I guess I made a mess and decoded with my command the h.264 stream
before encoding again... as the speed is around 0.962x, and the CPU is
quite busy. I thought there was no need to decode/encode to add an
audio stream (but I have no idea what I'm doing, as you had already
guessed ;-) ).

I recompiled the 4.2 ffmpeg release sources on this very machine.

Here is the kind of output I get:
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --enable-gpl --enable-version3 --disable-static
--enable-shared --enable-small --enable-avisynth --enable-chromaprint
--enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa
--enable-libaom --enable-libass --enable-libcaca --enable-libcdio
--enable-libcodec2 --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopenmpt --enable-libopus
--enable-libpulse --enable-librsvg --enable-librubberband
--enable-librtmp --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtesseract
--enable-libtheora --enable-libtwolame --enable-libv4l2
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi
--enable-lv2 --enable-libmysofa --enable-openal --enable-opencl
--enable-opengl --enable-libdrm --enable-nonfree --enable-libfdk-aac
--enable-libbluray --extra-libs='-lnettle -lhogweed -lgmp'
  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
Input #0, flv, from 'rtmp://192.168.1.211:1935/live/stream0':
  Duration: N/A, start: 15024.271000, bitrate: N/A
Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 30 fps,
30 tbr, 1k tbn
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, pulse, from 'default':
  Duration: N/A, start: 1568033472.683289, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[libx264 @ 0x559c4df3e780] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x559c4df3e780] profile High, level 4.0
[libx264 @ 0x559c4df3e780] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4
AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60
keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=3.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=7000
vbv_bufsize=512 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40
aq=1:1.00
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/dh5g-r8tf-x5qy-cse8':
  Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007),
yuv420p, 1920x1080, q=-1--1, 5000 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
  encoder : Lavc58.54.100 libx264
Side data:
  cpb: bitrate max/min/avg: 700/0/500 buffer size: 512000

Re: [FFmpeg-user] ffmpeg to stream an already h.264 encoded stream

2019-09-10 Thread Verachten Bruno
First of all, I don't know if I should continue within this thread or
create a new one. It's all about the same subject, streaming and
recording locally RTMP streams. Please let me know.

So, for the time being, I am able to stream the h.264 encoded stream
with the audio changed thanks to:
ffmpeg -i "$SOURCE" -thread_queue_size 2048 -f pulse -i
"alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo" -c:v copy
 -map 0:v:0 -map 1:a:0 -f flv "$YOUTUBE_URL/$KEY"
That's fine, I'm really happy with that.
Now, I have to save the video on the disk too.
So I had a look at the tee format, and issued that command:
ffmpeg -i rtmp://192.168.1.212:1935/live/stream1 -thread_queue_size
2048 -f pulse -i
alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo -c:v copy
-map 0:v:0 -map 1:a:0 -f tee "[f=flv:onfail=ignore]$YOUTUBE_URL/$KEY"
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --enable-gpl --enable-version3 --disable-static
--enable-shared --enable-small --enable-avisynth --enable-chromaprint
--enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa
--enable-libaom --enable-libass --enable-libcaca --enable-libcdio
--enable-libcodec2 --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopenmpt --enable-libopus
--enable-libpulse --enable-librsvg --enable-librubberband
--enable-librtmp --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtesseract
--enable-libtheora --enable-libtwolame --enable-libv4l2
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi
--enable-lv2 --enable-libmysofa --enable-openal --enable-opencl
--enable-opengl --enable-libdrm --enable-nonfree --enable-libfdk-aac
--enable-libbluray --extra-libs='-lnettle -lhogweed -lgmp'
  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
Input #0, flv, from 'rtmp://192.168.1.212:1935/live/stream1':
  Duration: N/A, start: 12094.717000, bitrate: N/A
Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 29.97
fps, 29.97 tbr, 1k tbn
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, pulse, from
'alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo':
  Duration: N/A, start: 1568128912.858773, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Automatic encoder selection failed for output stream #0:1. Default
encoder for format tee (codec none) is probably disabled. Please
choose an encoder manually.
Error selecting an encoder for stream 0:1

I had other outputs for the tee, but as it was not working, I removed
them. There must be something important that I missed in that tee
format...
Please let me know.

Best wishes,

Bruno Verachten

On Tue, Sep 10, 2019 at 11:23 AM Verachten Bruno  wrote:
>
> Thanks a lot, I am now able to stream two videos at the same time with
> the computer doing almost nothing.
> Now, I have to replace the audio of the streams with what is coming
> from the FocusRite Scarlett 2i4 2nd generation, and lots of other
> things.
>
> Best regards,
>
> Bruno Verachten



-- 
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] ffmpeg to stream an already h.264 encoded stream

2019-09-13 Thread Verachten Bruno
As for the filename, I used a bash variable, and it worked. I should have
thought about it earlier.
I haven't found yet how to keep the bitrate and size, and still have to add
delay for the sound.

I tried to play back the file on another machine (Windows this time), and
it doesn't work.
It stays on the first part of the video, ignoring the rest, and giving
errors when trying to fast forward:
 ./ffmpeg-20181106-d96ae9d-win64-static/bin/ffplay.exe
third-HDMI-input-20190912.182417486.mkv
ffplay version N-94455-g01994c93db Copyright (c) 2003-2019 the FFmpeg
developers
  built with gcc 9.1.1 (GCC) 20190716
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth --enable-libopenmpt
  libavutil  56. 33.100 / 56. 33.100
  libavcodec 58. 55.100 / 58. 55.100
  libavformat58. 30.100 / 58. 30.100
  libavdevice58.  9.100 / 58.  9.100
  libavfilter 7. 58.100 /  7. 58.100
  libswscale  5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
Input #0, flv, from 'third-HDMI-input-20190912.182417486.mkv':
  Metadata:
encoder : Lavf58.29.100
  Duration: 00:00:00.00, start: 0.00, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 100
tbr, 1k tbn
Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
SDL_OpenAudio (2 channels, 48000 Hz): WASAPI can't initialize audio client:
CoInitialize n’a pas été appelé.

SDL_OpenAudio (1 channels, 48000 Hz): WASAPI can't initialize audio client:
CoInitialize n’a pas été appelé.

SDL_OpenAudio (2 channels, 44100 Hz): WASAPI can't initialize audio client:
CoInitialize n’a pas été appelé.

SDL_OpenAudio (1 channels, 44100 Hz): WASAPI can't initialize audio client:
CoInitialize n’a pas été appelé.

No more combinations to try, audio open failed
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0   B f=0/0
   f=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
third-HDMI-input-20190912.182417486.mkv: error while seekingf=0/0
 673.85 M-V:  0.000 fd= 225 aq=0KB vq=0KB sq=0B f=0/0

Bruno

On Thu, Sep 12, 2019 at 10:31 AM Verachten Bruno  wrote:

> Thanks a lot Moritz, that did the trick.
> So I now have:
> ffmpeg -i "$SOURCE" -thread_queue_size 2048 -f pulse -i "$AUDIO_SOURCE"
> -c:v copy -map 0:v:0 -map 1:a:0 -c:a libmp3lame -f tee
> "[f=flv:onfail=ignore]$YOUTUBE_URL/$KEY|[f=flv:onfail=ignore]local_file.mkv"
> which gives
> Output #0, tee, to '[f=flv:onfail=ignore]rtmp://
> a.rtmp.youtube.com/live2/my-key|[f=flv:onfail=ignore]local_file.mkv
> <http://a.rtmp.youtube.com/live2/my-key%7C%5Bf=flv:onfail=ignore%5Dlocal_file.mkv>
> ':
>
> The output file is created, and the stream on YouTube is working too. I
> don't know if MKV is the best format to use in this case.
>
> I still have to figure out how to create a filename with a timestamp in
> it. I had a look at the strftime option, but I don't know how to insert
> it into the tee parameters.
>
> I have another problem now, which is that the bitrate and the size have
> disappeared:
> frame= 4491 fps= 29 q=-1.0 size=N/A time=00:02:34.16 bitrate=N/A
> speed=0.999x
> I guess it's because of the tee. Is there any way to put them back on? It
> was useful to check the streaming was going ok.
>
> On Tue, Sep 10, 2019 at 10:03 PM Moritz Barsnick  wrote:
>
>> On Tue, Sep 10, 2019 at 17:25:43 +0200, Verachten Bruno wrote:
>> > ffmpeg -i rtmp://192.168.1.212:1935/live/stream1 -thread_queue_size
>> > 2048 

Re: [FFmpeg-user] Listing the hardware accelerators

2019-09-27 Thread Verachten Bruno
Thanks a lot for your answers and new questions.
When I run the -hwaccels, I get:
 ffmpeg -hwaccels
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --enable-gpl --enable-version3 --disable-static
--enable-shared --enable-small --enable-avisynth --enable-chromaprint
--enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa
--enable-libaom --enable-libass --enable-libcaca --enable-libcdio
--enable-libcodec2 --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg
--enable-librubberband --enable-librtmp --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh
--enable-libtesseract --enable-libtheora --enable-libtwolame
--enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi
--enable-lv2 --enable-libmysofa --enable-openal --enable-opencl
--enable-opengl --enable-libdrm --enable-nonfree --enable-libfdk-aac
--enable-libbluray --extra-libs='-lnettle -lhogweed -lgmp'
  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
Hardware acceleration methods:
drm
opencl

So... That would mean that on this machine, with what configure has been
able to detect, I only have access to drm and opencl.

That's on a i5 laptop with an Intel 5500GPU

Information gathered from Chromium with the "about:gpu":
GPU0VENDOR = 0x8086 [Intel Open Source Technology Center], DEVICE=
0x1616 [Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) ] *ACTIVE*

> We (developers) apparently think that just as you have to know your
> input file to use ffmpeg (not every command line supports every
> input file), you also have to know the hardware you are using...
Great. That was not crystal clear for me up to now.
My first (reasonable) option would be to study the various systems I use,
try to understand which hardware accelerators they have if any, and then
choose the correct options in configure so that I will have a bespoke
ffmpeg. I have already tried that path (more or less) with ARM SoCs, and my
wounds have not healed yet.
The second (harebrained) option would be to turn every hardware accelerator
related option on with configure on every machine, so that I have a
consistent ffmpeg build script, and then try to understand for each
machine/build the hardware accelerators we have access to, if any (that
would be once more a pain in the neck with ARM SoCs).

Thanks.


On Fri, Sep 27, 2019 at 10:17 AM Moritz Barsnick  wrote:

> On Fri, Sep 27, 2019 at 09:14:07 +0200, Michael Koch wrote:
> > Does that mean
> > a) List all hardware acceleration methods supported in this build of
> > ffmpeg, regardless if the hardware is really built into this computer,
> > or does it mean
> > b) List all hardware acceleration methods supported in this build of
> > ffmpeg and this hardware is really available in this computer?
>
> a)
> Which is not what the original poster requested.
>
> On the other hand, the command line needs to be adapted anyway,
> depending on hwaccel. Perhaps one could use ffmpeg to query by doing
> trial and error (e.g. encoding to /dev/null) - unfortunately, ffmpeg
> won't say what the actual issue was, unless you want to parse log
> messages.
>
> 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".

[FFmpeg-user] Listing the hardware accelerators

2019-09-26 Thread Verachten Bruno
Hi List,

I have different environments (X86, ARM, Jetson Nano) on which I'd like to
use hardware encoders and decoders if available.
I guess that I won't be able to use them if they have not been built in the
ffmpeg dependencies if I install a "generic" version.
Will the configure command autodetect what it should build, or do I have to
know my hardware before launching configure with specific options?
I have read https://trac.ffmpeg.org/wiki/HWAccelIntro but it's not clear to
me yet.
Is there any way to have ffmpeg list what it has "found" on my system?
Do I have to launch a series of commands with the different accelerators
that exist, and see the output?
I suppose we have to specify on the command line the hardware acceleration
chosen for the ffmpeg command, it won't autodetect and choose one that is
available, am I right?

Thanks a bunch,

Bruno
-- 
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] Using h264_mmal decoder on Raspberry Pi 4

2019-11-01 Thread Verachten Bruno
Simon,

there is a script there:
https://www.raspberrypi.org/forums/viewtopic.php?t=199775 that could
help you entering the right parameters to compile ffmpeg for the
Raspberry Pi. Yes, it's a bit dated (ffmpeg 4.0.2 and Debian Stretch)
but it worked for me.
I did not say your parameters are not the right ones, I honestly have
no idea, that's just in case...
As for what ffmpeg says about hardware encoders/decoders, I think I
understood that it will list what has been compiled, and not what is
available on this particular machine.

Bruno (who is fighting on a daily basis with the compilation of ffmpeg
on another ARM machine)
___
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".

[FFmpeg-user] H.264 and RockChip MPP

2019-11-14 Thread Verachten Bruno
Hi there,

I compiled the RockChip fork of ffmpeg because I wanted to use
hardware acceleration on one of their chips (RK3399).
For the time being, it looks like only the hardware accelerated
decoding is implemented. So I tried:
ffmpeg -benchmark -loglevel 48 -vcodec h264_rkmpp -i
bbb_sunflower_1080p_30fps_normal.mp4 -map 0:v:0 -f null -
and got at the end:
frame=19036 fps=237 q=-0.0 Lsize=N/A time=00:10:34.83 bitrate=N/A speed=7.91x
video:7585kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
Input file #0 
(/media/linaro/0E9ACA2339F586E5/slides_rushes/bbb_sunflower_1080p_30fps_normal.mp4):
  Input stream #0:0 (video): 19036 packets read (237848132 bytes);
19036 frames decoded;
  Input stream #0:1 (audio): 21 packets read (10080 bytes);
  Input stream #0:2 (audio): 2 packets read (2560 bytes);
  Total: 19059 packets (237860772 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 19036 frames encoded; 19036 packets
muxed (7766688 bytes);
  Total: 19036 packets (7766688 bytes) muxed
mpp_thread: MPP_THREAD_STOPPING status set mThread 0xab44b8f0
mpp_dec: mpp_dec_parser_thread exit
mpp_dec: mpp_dec_parser_thread exit ok
mpp_thread: MPP_THREAD_STOPPING status set mThread 0xab44b9f8
mpp_dec: mpp_dec_hal_thread exit ok
bench: utime=10.101s
19036 frames successfully decoded, 0 decoding errors
bench: maxrss=93880kB
[AVIOContext @ 0xab3cd8a0] Statistics: 259311905 bytes read, 972 seeks

As I had read RockChip had made a PR to ffmpeg, I tried the latest
source from ffmpeg official repository, and to my surprise, I also got
the RockChip hardware accelerated decoding.

frame=19036 fps=234 q=-0.0 Lsize=N/A time=00:10:34.83 bitrate=N/A speed=7.79x
video:7585kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
Input file #0 
(/media/linaro/0E9ACA2339F586E5/slides_rushes/bbb_sunflower_1080p_30fps_normal.mp4):
  Input stream #0:0 (video): 19036 packets read (237848132 bytes);
19036 frames decoded;
  Input stream #0:1 (audio): 21 packets read (10080 bytes);
  Input stream #0:2 (audio): 2 packets read (2560 bytes);
  Total: 19059 packets (237860772 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 19036 frames encoded; 19036 packets
muxed (7766688 bytes);
  Total: 19036 packets (7766688 bytes) muxed
mpp_thread: MPP_THREAD_STOPPING status set mThread 0xab149dd0
mpp_dec: mpp_dec_parser_thread exit
mpp_dec: mpp_dec_parser_thread exit ok
mpp_thread: MPP_THREAD_STOPPING status set mThread 0xab149ed8
mpp_dec: mpp_dec_hal_thread exit ok
bench: utime=9.628s stime=8.357s rtime=81.544s
19036 frames successfully decoded, 0 decoding errors
bench: maxrss=75008kB
[AVIOContext @ 0xab11b8b0] Statistics: 259311905 bytes read, 972 seeks

I suppose there are lots of other RockChip specific features that have
not made it yet into the official ffmpeg repository, but for the time
being, it looks like half of what I need is already there.
On the RockChip wiki, it is written that the hardware encoding should
be available Q4 2019 for ffmpeg, so I still have hope (if this work, I
could deploy lots of these machines in the company I work for). It
seems to be already available for gstreamer.
Is there anything going on on your side for the RockChip hardware encoding?

Thanks.
-- 
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] Piping raw video from ffmpeg

2019-11-18 Thread Verachten Bruno
Thanks Carl Eugen, that worked. I will have a look at the pix_fmt option.
I now have to find how to pipe correctly to gstreamer, as it does not
like what I'm feeding him with.

WARNING: erroneous pipeline: could not link fdsrc0 to mpph264enc0,
mpph264enc0 can't handle caps video/x-raw, format=(string)nv12,
width=(int)1920, height=(int)1080, framerate=(fraction)30/1

Bruno

On Mon, Nov 18, 2019 at 12:09 PM Carl Eugen Hoyos  wrote:
>
>
>
> > Am 15.11.2019 um 18:29 schrieb Verachten Bruno :
> >
> > So far, I have tried ffmpeg  -f v4l2 -pix_fmt nv12 -s 1920x1080 -r 30
> > -i /dev/video0 -c:v rawvideo -f yuv - >/dev/null
>
> The name of the rawvideo format is not “yuv” (as the console output told you) 
> but “rawvideo”.
> You may also want to use the pix_fmt option.
>
> Carl Eugen
> ___
> 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".

[FFmpeg-user] Piping raw video from ffmpeg

2019-11-15 Thread Verachten Bruno
Hi List,

as stated in my previous message, the rkmpp h264 encoder has not yet
been finalized, so I'm stuck for the moment.
http://ffmpeg.org/pipermail/ffmpeg-user/2019-November/045991.html

gstreamer has the hardware encoding part, so I thought of piping the
output of ffmpeg (grabing an HDMI-IN pseudo-camera) to gstreamer for
h.264 encoding, and then back to ffmpeg to stream to YouTube.

Unfortunately, I have not been able to create the first part of the
pipe. What I'd like to do is get the video in raw format, to avoid
unnecessary CPU use and compression, and then give it to gstreamer to
encode.

So far, I have tried ffmpeg  -f v4l2 -pix_fmt nv12 -s 1920x1080 -r 30
-i /dev/video0 -c:v rawvideo -f yuv - >/dev/null
and got
ffmpeg version N-95733-g73ee53f317 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Debian 9.2.1-19)
  configuration: --arch=arm --bindir=/home/linaro/bin
--disable-stripping --enable-libaom --enable-avisynth
--enable-avresample --enable-chromaprint --enable-frei0r --enable-gpl
--enable-ladspa --enable-libass --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libdc1394 --enable-libfdk-aac
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libiec61883
--enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt
--enable-libopus --enable-libpulse --enable-librubberband
--enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx
--enable-openal --enable-opengl --enable-sdl2 --enable-shared
--incdir=/usr/include/arm-linux-gnueabihf
--libdir=/usr/lib/arm-linux-gnueabihf --enable-nonfree --enable-rkmpp
--enable-version3 --enable-libdrm
--extra-cflags=-I/home/linaro/ffmpeg_build/include
--extra-ldflags=-L/home/linaro/ffmpeg_build/lib
--extra-libs='-lpthread -lm' --pkg-config-flags=--static
--prefix=/home/linaro/ffmpeg_build
  libavutil  56. 35.101 / 56. 35.101
  libavcodec 58. 62.100 / 58. 62.100
  libavformat58. 35.100 / 58. 35.100
  libavdevice58.  9.100 / 58.  9.100
  libavfilter 7. 66.100 /  7. 66.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
[video4linux2,v4l2 @ 0xab664e80] The driver does not permit changing
the time per frame
[video4linux2,v4l2 @ 0xab664e80] Time per frame unknown
[video4linux2,v4l2 @ 0xab664e80] Stream #0: not enough frames to
estimate rate; consider increasing probesize
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 1920x1080,
1000k tbr, 1000k tbn, 1000k tbc
[NULL @ 0xab6682b0] Requested output format 'yuv' is not a suitable
output format
pipe:: Invalid argument
as a result.

When I replace -f yuv by -f mpegts, it does work with two cores at
50%, which I would like to avoid.
What output format could I use to just copy the raw video?

Thanks a lot,
-- 
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".

[FFmpeg-user] Extracting information from ffmpeg logs when streaming

2019-12-05 Thread Verachten Bruno
Hi there,

I'd like to extract the number of frames pushed when streaming with ffmpeg
to a RTMP server.
For the time being, I can see the number of frames in the console, and I
read that the -report option could redirect that information to a file.
I could then parse the file, and extract the frame numbers.
Is there anything more straightforward?

Thanks.
-- 
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".

[FFmpeg-user] RTMP handshaking behind a proxy

2019-12-10 Thread Verachten Bruno
Hi there,

I unfortunately have to stream from behind a proxy. It works on one of my
machines thanks to redsocks. The RTMP handshake goes well, and I can stream
to twitch or youtube.
On another machine, with the same redsocks configuration, the handshake
never finishes, be it with youtube or twitch. The ffmpeg command is just a
copy of an already h.264 encoded stream from rtmp to rtmp.

My question is: is there a random port opened for the negotiation? Where
should I look for the blocking of the handshake?

Here is the command I have and the output:
ffmpeg -i "$SOURCE" -c:v copy -c:a copy -f flv "$YOUTUBE_URL/$KEY"
-loglevel debug
[...]
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'rtmp://
192.168.1.217:1935/live/stream15'.
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_of_myself' ... 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 rtmp://
192.168.1.217:1935/live/stream15.
Successfully parsed a group of options.
Opening an input file: rtmp://192.168.1.217:1935/live/stream15.
[NULL @ 0xc401d0] Opening 'rtmp://192.168.1.217:1935/live/stream15' for
reading
[rtmp @ 0xc40990] No default whitelist set
[tcp @ 0xc41010] No default whitelist set
[tcp @ 0xc41010] Original list of addresses:
[tcp @ 0xc41010] Address 192.168.1.217 port 1935
[tcp @ 0xc41010] Interleaved list of addresses:
[tcp @ 0xc41010] Address 192.168.1.217 port 1935
[tcp @ 0xc41010] Starting connection attempt to 192.168.1.217 port 1935
[tcp @ 0xc41010] Successfully connected to 192.168.1.217 port 1935
[rtmp @ 0xc40990] Handshaking...
[rtmp @ 0xc40990] Type answer 3
[rtmp @ 0xc40990] Server version 13.14.10.13
[rtmp @ 0xc40990] Proto = rtmp, path = /live/stream15, app = live, fname =
stream15
[rtmp @ 0xc40990] Window acknowledgement size = 500
[rtmp @ 0xc40990] Max sent, unacked = 500
[rtmp @ 0xc40990] New incoming chunk size = 20480
[rtmp @ 0xc40990] Creating stream...
[rtmp @ 0xc40990] Sending play command for 'stream15'
[flv @ 0xc401d0] Format flv probed with size=2048 and score=100
[flv @ 0xc401d0] Before avformat_find_stream_info() pos: 13 bytes
read:32868 seeks:0 nb_streams:0
[flv @ 0xc401d0] Unknown type |RtmpSampleAccess
[NULL @ 0xc432a0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[NULL @ 0xc432a0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[NULL @ 0xc432a0] unknown SEI type 229
[h264 @ 0xc432a0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xc432a0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xc432a0] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xc432a0] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xc432a0] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xc432a0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xc432a0] unknown SEI type 229
[h264 @ 0xc432a0] Format yuv420p chosen by get_format().
[h264 @ 0xc432a0] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xc432a0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
Last message repeated 5 times
[flv @ 0xc401d0] All info found
[flv @ 0xc401d0] rfps: 29.75 0.015408
[flv @ 0xc401d0] rfps: 29.83 0.010802
[flv @ 0xc401d0] rfps: 29.916667 0.008256
[flv @ 0xc401d0] rfps: 30.00 0.007768
Last message repeated 1 times
[flv @ 0xc401d0] rfps: 29.970030 0.007707
Last message repeated 1 times
[flv @ 0xc401d0] Setting avg frame rate based on r frame rate
[flv @ 0xc401d0] After avformat_find_stream_info() pos: 66491 bytes
read:66491 seeks:0 frames:105
Input #0, flv, from 'rtmp://192.168.1.217:1935/live/stream15':
  Duration: N/A, start: 9159.905000, bitrate: N/A
Stream #0:0, 41, 1/1000: Video: h264 (High), 1 reference frame,
yuv420p(progressive, left), 1920x1080 (1920x1088), 0/1, 29.97 fps, 29.97
tbr, 1k tbn
Stream #0:1, 64, 1/1000: Audio: aac (LC), 48000 Hz, stereo, fltp
Successfully opened the file.
Parsing a group of options: output url rtmp://
live-cdg.twitch.tv/app/live_of_myself.
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_of_myself.
[rtmp @ 0xc528c0] No default whitelist set
[tcp @ 0xcacff0] No default whitelist set
[tcp @ 0xcacff0] Original list of addresses:
[tcp @ 0xcacff0] Address 52.223.195.16 port 1935
[tcp @ 0xcacff0] Address 52.223.195.119 port 1935
[tcp @ 0xcacff0] Address 52.223.195.169 port 1935
[tcp @ 0xcacff0] Address 52.223.195.205 port 

[FFmpeg-user] Producing several quality video streams from one 1080p stream.

2019-11-20 Thread Verachten Bruno
Hi there,

First of all, sorry for being vague, I don't have ffmpeg command line
options yet, I'm just trying to know if I'm totally mistaken, or if my
idea could be implemented quite safely/easily.

I'm currently thinking of getting rid of YouTube for streaming within
the company I work for (because YT consumes so much bandwidth, and you
have not guarantee whatsoever about the quality, and even not talking
about IP and so on).
I could install big (but kind of old aka free) generic X86_64 servers
in the server room, and using Kaltura on them, or even buy a fine
piece of hardware that would do everything (it would take months to
get the agreement), but I'd like to setup a POC first and foremost.
I know ffserver has been abandoned, so it's out of the picture.

I have lots of tiny and dirt cheap Linux ARM machines that can H.264 encode.
I have machines producing content (which could be RAW, or H.264).
So I thought of having the content producers multicast thanks to
ffmpeg, and the small machines grabbing it, reducing the
bitrate/quality, and then broadcasting to whatever machine could
handle content delivery to the final user. I'm not so sure that's
smart, as most of the video delivery software may want to do the
downgrading by themselves.
The goal of the POC would be to do most of the work on the edge of the
network with ffmpeg (i.e. directly in the conference rooms) so that
the server software could be hosted on the simplest, smallest and
cheapest server with the simplest software possible to multicast.

I suppose there are smarter ways with ffmpeg to get from a 1080p to
lesser quality streams than just multicasting, encoding/downgrading,
broadcasting to a server, and then multicasting.

If you managed to read me until there, would you have any idea or
recommandation?

Thanks.
-- 
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] Add soft subtitles to YouTube Stream Now?

2019-11-20 Thread Verachten Bruno
That's a very interesting subject (to me at least).
I would like to embed automatic (or human generated, depending on the
budget) subtitles to help hearing-impaired people grab most of the
talk in our conference.
I am producing H.264 and sending it (for the time being) to YouTube,
so your request is not far from my needs.
I will follow this subject with great attention.
Thanks.

On Wed, Nov 20, 2019 at 5:20 PM Michael Shaffer  wrote:
>
> I noticed your Youtube streams only last a day or so. I have a Python
> script I made that keeps the ffmpeg process sending to Youtube. I have 5 IP
> cameras going to youtube and they have been going about 9 months without
> the stream ending. Anyways, if you want I could show you how the script
> works. You would just have to change the stream keys and the bitrate that
> each camera uses, so it knows when to restart the stream.
>
> Michael
>
> On Wed, Nov 20, 2019 at 12:17 AM Steven Kan  wrote:
>
> > First time poster, so please be kind if I ask anything stupid!
> >
> > I have a live BeeCam feed on YouTube:
> >
> > https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live <
> > https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live>
> >
> > using YouTube’s “Stream Now” feature, which is distinct from a streaming
> > “event” because I don’t have to schedule it. Whenever I’m pushing video to
> > YouTube, the channel goes live.
> >
> > The stream is supplied by a Raspberry Pi running as an ffmpeg “relay
> > server,” e.g. it’s not doing any transcoding; it’s just repacking an RTSP
> > stream from an off-the-shelf camera:
> >
> > ./ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "rtsp://
> > anonymous:password@192.168.1.11:554" -f concat -safe 0 -i playlist.txt
> > -vcodec copy -acodec copy -t 01:47:02 -f flv "rtmp://
> > a.rtmp.youtube.com/live2/my-youtube-streaming-key”
> >
> > The -t and playlist.txt are because my camera lacks and audio feed, and YT
> > requires an audio stream, so I have a collection of royalty-free mp3s in
> > the playlist, and I’m wrapping this command in a loop.
> >
> > When I run this on my RPi 2, CPU utilization for ffmpeg is 10%, which
> > is what I want, because I will have up to 3 instances of ffmpeg pushing 3
> > camera streams to 3 YT channels during honey bee swarm season in Spring.
> >
> > What I want to do is add some captions to the video as soft subtitles,
> > e.g. my location, the present temperature, and the weather forecast. I
> > don’t have enough CPU on the Pi to burn these into the video stream.
> >
> > Is this possible in ffmpeg and with YouTube’s “stream now” feature?
> >
> > I can get ffmpeg to put a soft subtitle into a local .mkv file:
> >
> > ./ffmpeg -i video.mp4" -i SubtitleTest.srt -acodec copy -scodec copy
> > out.mkv
> >
> > but I changing the output to .m4v, mp4, or .flv results in errors such as:
> >
> > Subtitle codec 'ass' for stream 2 is not compatible with FLV
> >
> > and pushing mkv to YouTube via:
> >
> > ./ffmpeg -i video.mp4" -acodec copy -f mkv "rtmp://
> > a.rtmp.youtube.com/live2/my-youtube-streaming-key”
> >
> > returns:
> >
> > Requested output format 'mkv' is not a suitable output format
> > rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key  > a.rtmp.youtube.com/live2/my-youtube-streaming-key>
> >
> > Am I doing this fundamentally wrong? Or is this just not possible? If it’s
> > possible I will continue reading documentation until I get it working!!!
> >
> > Thanks!
> >
> > ___
> > 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".
> ___
> 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] Extracting information from ffmpeg logs when streaming

2019-12-20 Thread Verachten Bruno
Hi there,

thanks to SO, I have found an approach that gives me more or less what I
was looking for.

mkfifo ffmpeg.logfmpeg -y -f lavfi -i
testsrc=duration=10:size=1920x1080:rate=25 -progress pipe:3 null.mkv
3> ffmpeg.logcat ffmpeg.log |awk
'/^frame/{split($1,frame,"=")}/^fps/{split($1,fps,"=")}/^speed=.+x$/{split($1,speed,"=");printf
"%s|%s|%s\n", frame[2],fps[2],speed[2]}'

And I get:
35|0.0|
47|42.5|
69|42.5|0.394x
91|42.4|0.709x
113|42.6|0.904x
135|42.8|1.04x
157|42.8|1.14x
179|42.8|
201|42.8|1.26x
223|42.8|
245|42.8|1.34x
267|42.8|1.37x
289|42.8|
303|41.7|1.38x
325|41.8|
347|41.9|1.42x
369|41.9|1.44x
391|42.0|1.45x
413|42.0|1.47x
435|42.1|1.48x
457|42.1|1.49x
479|42.2|
501|42.2|1.51x
523|42.3|1.52x
545|42.3|1.53x
559|41.7|1.51x
581|41.8|1.52x
603|41.8|1.52x


Thanks.

Bruno Verachten



On Thu, Dec 5, 2019 at 9:36 PM Verachten Bruno  wrote:

> Hi there,
>
> I'd like to extract the number of frames pushed when streaming with ffmpeg
> to a RTMP server.
> For the time being, I can see the number of frames in the console, and I
> read that the -report option could redirect that information to a file.
> I could then parse the file, and extract the frame numbers.
> Is there anything more straightforward?
>
> Thanks.
> --
> Bruno Verachten
>


-- 
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-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] Compiling on an aarch64 machine

2020-07-09 Thread Verachten Bruno
> Could this behaviour be considered as a bug? If so, I can file it.

> What would you like to report where?
>
The fact that FFMpeg does not compile without this trick of exporting an
empty CFLAGS variable on aarch64 there: https://trac.ffmpeg.org/ .
If you consider this is not a bug, that's perfect for me, but in my point
of view, that should be written somewhere... If not in FFMpeg
documentation, I'll write it down in a blog post.

Thanks.
-- 
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] Compiling on an aarch64 machine

2020-07-08 Thread Verachten Bruno
On Tue, Jul 7, 2020 at 10:49 PM Carl Eugen Hoyos  wrote:

> Am Di., 7. Juli 2020 um 21:34 Uhr schrieb Verachten Bruno <
> gount...@gmail.com>:
>
> > CFLAGS='-mfpu=neon'
>
> This is apparently not ignored (I thought it should be) and you are
> therefore responsible not to set these variables.

Thanks a lot. Unfortunately, These variables are not set on my machine...
or am I mistaken?
set|grep -i CFLAGS returns nothing, as set|grep -i fpu .

Best regards,

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] Compiling on an aarch64 machine

2020-07-08 Thread Verachten Bruno
> > > CFLAGS='-mfpu=neon'

> > > This is apparently not ignored (I thought it should be) and you are
> > > therefore responsible not to set these variables.
> > Thanks a lot. Unfortunately, These variables are not set on my machine...
> > or am I mistaken?
> I tested that if I don't export CFLAGS, they do not show up in config.log,
> if I export a value, I can reproduce your issue (or I can set a value that
> does not break compilation).
>
> I also confirmed that git grep mfpu did not show anything suspicious.
>
> In general, builds that use CFLAGS are not supported.

I exported an empty CFLAGS variable, and configure succeeded. The same
happened for x264.
The compilation is not finished yet, but all looks fine to me.

Could this behaviour be considered as a bug? If so, I can file it.
If not, thanks a lot for your help.
___
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".

[FFmpeg-user] Compiling on an aarch64 machine

2020-07-07 Thread Verachten Bruno
Hi,

I had already compiled ffmpeg on a 32bits OS for my aarch64 machine without
too much trouble, but now that I have a 64bits OS, I'd like to compile
ffmpeg too.
The issue I have is that gcc is started with bad options (I'm not sure of
that, that's what I think I understood):
mktemp -u XX
ZgAQ9I
test_ld cc
test_cc
BEGIN /tmp/ffconf.efsAigGe/test.c
1   int main(void){ return 0; }
END /tmp/ffconf.efsAigGe/test.c
gcc -mfpu=neon -c -o /tmp/ffconf.efsAigGe/test.o /tmp/ffconf.efsAigGe/test.c
gcc: error: unrecognized command line option '-mfpu=neon'
C compiler test failed.
poddingue@orangepi4-armbian:~/ffmpeg_sources/FFMpeg-orig$  ./configure
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this
will help
solve the problem.
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

My gcc version is :
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/8/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=aarch64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --disable-libphobos
--enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror
--enable-checking=release --build=aarch64-linux-gnu
--host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)

My machine is running Debian 10 buster with Kernel: aarch64 Linux
5.4.49-rockchip64.

Is there anything I could do with configure so that it uses the right
options?

Thanks.


-- 
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".

[FFmpeg-user] How to terminate cleanly a recording on Windows

2020-06-19 Thread Verachten Bruno
Hi there,

I'm trying to record lots of small wav files to give to PocketSphinx for
adaptation.
My command looks like this:
ffmpeg.exe -f dshow -i audio="Microphone sur casque (2- Plant" -acodec
pcm_s16le -ac 1 -ar 16000 1.wav

I haven't tried this particular command under Linux, but usually hitting
"q" ends the recording properly.
On Windows, "q" seems to do nothing, and CTRL+C ends the process, but not
at the right time. Most of the time, I miss the end of the recording. My
recordings are just a few seconds long.

Would there be any clever way to end properly the recording on Windows?
ffmpeg version git-2020-06-08-d29aaf1 Copyright (c) 2000-2020 the FFmpeg
developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
--enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads
--enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth --enable-libopenmpt --enable-amf
  libavutil  56. 50.100 / 56. 50.100
  libavcodec 58. 90.100 / 58. 90.100
  libavformat58. 44.100 / 58. 44.100
  libavdevice58.  9.103 / 58.  9.103
  libavfilter 7. 84.100 /  7. 84.100
  libswscale  5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Microphone sur casque (2- Plant':
  Duration: N/A, start: 99694.804000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
File '1.wav' already exists. Overwrite? [y/N] Y
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '1.wav':
  Metadata:
ISFT: Lavf58.44.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono,
s16, 256 kb/s
Metadata:
  encoder : Lavc58.90.100 pcm_s16le
size= 512kB time=00:00:16.49 bitrate= 254.3kbits/s speed= 1.1x

Thanks.

-- 
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 handshaking behind a proxy

2020-06-25 Thread Verachten Bruno
I have given this command another try on another machine today, and read a
bit more about the handshaking process.
It does not seem to open any other port, just exchanging specific packets
on the 1935 port...
So something is fishy on my redsocks configuration I suppose...
Here is part of the strace command:

socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 5
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.194")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(51463),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.146")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(45181),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.205")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(49529),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.119")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(33848),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.25")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(59504),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.28")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(45114),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.211")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(42766),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.169")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(43587),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.236")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(33059),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.9")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(40109),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.95")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(46689),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
connect(5, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"},
16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.16")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(4),
sin_addr=inet_addr("192.168.0.217")}, [28->16]) = 0
close(5)= 0
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 5
fcntl(5, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK)= 0
connect(5, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("52.223.195.194")}, 16) = -1 EINPROGRESS (Operation now
in progress)
poll([{fd=5, events=POLLOUT}], 1, 100)  = 1 ([{fd=5, revents=POLLOUT}])
getsockopt(5, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
write(2, "\33[0;39m[rtmp @ 0x1f512c0] \33[0m", 30[rtmp @ 0x1f512c0] ) = 30
write(2, "\33[0;32mHandshaking...\n\33[0m", 26Handshaking...
) = 26
poll([{fd=5, events=POLLOUT}], 1, 100)  = 1 ([{fd=5, revents=POLLOUT}])
sendto(5,
"\3\0\0\0\0\t\0|\2\367xU\36\316\253\216\0366/\7\305\206\212p\262f\324\2
\345\10a"..., 1537

[FFmpeg-user] RTMP and proxy

2020-06-29 Thread 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
  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: 1
Last message repeated 5 times
[h264 @ 0x40d24c0] 

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
> &g

Re: [FFmpeg-user] How to terminate cleanly a recording on Windows

2020-06-22 Thread Verachten Bruno
The audio device does not have the same name under cmd.exe, but the "q" key
worked.
C:\Utilisateurs\fr20445>ffmpeg.exe -f dshow -i audio="Réseau de microphones
(Rea
ltek " -acodec pcm_s16le -ac 1 -ar 16000 1.wav
ffmpeg version N-50911-g9efcfbe Copyright (c) 2000-2013 the FFmpeg
developers
  built on Mar 13 2013 21:26:48 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb
--enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil  52. 19.100 / 52. 19.100
  libavcodec 55.  0.100 / 55.  0.100
  libavformat55.  0.100 / 55.  0.100
  libavdevice54.  4.100 / 54.  4.100
  libavfilter 3. 45.103 /  3. 45.103
  libswscale  2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc52.  2.100 / 52.  2.100
[dshow @ 020bab80] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=R├®seau de microphones (Realtek ':
  Duration: N/A, start: 53125.388000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Output #0, wav, to '1.wav':
  Metadata:
ISFT: Lavf55.0.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono,
s16,
256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
size= 234kB time=00:00:07.51 bitrate= 255.6kbits/s
video:0kB audio:234kB subtitle:0 global headers:0kB muxing overhead
0.08%

Thanks a bunch.

Bruno

On Mon, Jun 22, 2020 at 10:28 AM Verachten Bruno  wrote:

> Thanks for trying Matteo,
>
> I'm using Cygwin on Windows 7.
> I will give a try at cmd.exe.
>
> On Sat, Jun 20, 2020 at 11:28 AM Matteo Contrini 
> wrote:
>
>> On Fri, 19 Jun 2020, at 12:05 PM, Verachten Bruno wrote:
>> > I haven't tried this particular command under Linux, but usually hitting
>> > "q" ends the recording properly.
>> > On Windows, "q" seems to do nothing, and CTRL+C ends the process, but
>> not
>> > at the right time. Most of the time, I miss the end of the recording. My
>> > recordings are just a few seconds long.
>>
>> I've just tried your command on Windows 10 version 2004 with Windows
>> Terminal 1.0.1401.0 and I have no problems. Pressing 'q' ends the recording
>> correctly.
>>
>> Which terminal/console are you using?
>>
>> --
>> Matteo
>> ___
>> 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
>


-- 
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] How to terminate cleanly a recording on Windows

2020-06-22 Thread Verachten Bruno
Thanks for trying Matteo,

I'm using Cygwin on Windows 7.
I will give a try at cmd.exe.

On Sat, Jun 20, 2020 at 11:28 AM Matteo Contrini  wrote:

> On Fri, 19 Jun 2020, at 12:05 PM, Verachten Bruno wrote:
> > I haven't tried this particular command under Linux, but usually hitting
> > "q" ends the recording properly.
> > On Windows, "q" seems to do nothing, and CTRL+C ends the process, but not
> > at the right time. Most of the time, I miss the end of the recording. My
> > recordings are just a few seconds long.
>
> I've just tried your command on Windows 10 version 2004 with Windows
> Terminal 1.0.1401.0 and I have no problems. Pressing 'q' ends the recording
> correctly.
>
> Which terminal/console are you using?
>
> --
> Matteo
> ___
> 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".