Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-09 Thread andrei ka
On Tue, Nov 9, 2021 at 12:07 AM Steven Kan  wrote:

> Hmm. I hadn’t considered that. What I’m actually doing is combining two
> 1920  x 1080 streams into a 3840 x 1080 stream. Would an NVidia 1030 be
> able to do that, twice?
>
>
ppl are right, 1030 cant encode (i couldn't imagine that !), only decoding,
and afaik 1050 & 1650 low profile are dual slots, so, i may not fit into
hpe (sure, one can alose tinker with riser cards & cables to make these
cards external :-))  today these cards  usually have enough cpu for doing
your 4 1080p@25/30 fps (with reduced complexity presets), you'd need enough
ram to hold 8M nv12 pixels... but these are not cheap even 2nd hand,
chances are big a combo of 1650 & hpe would be more expensive than some
different box. +, you've solved your load pb anyway with your mac :-)



> Back on my Mac mini, I’m still learning how to manage services in macOS
> vs. Raspbian, but I have the stream running right now:
>
> https://www.youtube.com/channel/UCcIZVSZfzrxS6ynL8DQeC-Q/live
>
> My largest display is only 1920 x 1200. Can anyone with a 4K display tell
> me if YT is presenting this as a 3840-wide stream?
>
> Thanks!
>
> p.s. re: my previous misgivings about a reduction to “only 30% CPU’ was
> totally misguided. That’s 30% of one core, and the Mini has 8 cores, so the
> system is very lightly loaded. GUI-level Activity Monitor shows Idle at
> ~92%. I should be able to run many instances of ffmpeg on here, if I can
> get them all running properly.
>
>
___
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] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-08 Thread Steven Kan
Hmm. I hadn’t considered that. What I’m actually doing is combining two 1920  x 
1080 streams into a 3840 x 1080 stream. Would an NVidia 1030 be able to do 
that, twice?

Back on my Mac mini, I’m still learning how to manage services in macOS vs. 
Raspbian, but I have the stream running right now:

https://www.youtube.com/channel/UCcIZVSZfzrxS6ynL8DQeC-Q/live

My largest display is only 1920 x 1200. Can anyone with a 4K display tell me if 
YT is presenting this as a 3840-wide stream?

Thanks!

p.s. re: my previous misgivings about a reduction to “only 30% CPU’ was totally 
misguided. That’s 30% of one core, and the Mini has 8 cores, so the system is 
very lightly loaded. GUI-level Activity Monitor shows Idle at ~92%. I should be 
able to run many instances of ffmpeg on here, if I can get them all running 
properly. 

> On Nov 8, 2021, at 9:43 AM, andrei ka  wrote:
> 
> you could simply plug a recent low profile nvidia (e.g. 1030) into pcie
> slot of your hpe micro and nvenc would do 2 fhd h264 encodes like a charm
> 
> 
> On Sun, Nov 7, 2021 at 11:40 PM Steven Kan  wrote:
> 
>>> On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos 
>> wrote:
>>> 
>>> Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan :
 
> On Jan 18, 2021, at 12:50 PM, Michael Koch <
>> astroelectro...@t-online.de> wrote:
>>> 
>> C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024
>> -i rtsp://anonymous:password@192.168.1.47:554 -i rtsp://
>> anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t
>> 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
>> 
>> [snip
 
>> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
>> Metadata:
>>  title   : Media Server
>> Duration: N/A, start: 0.08, bitrate: N/A
>>  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
>> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
>> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
>> Metadata:
>>  title   : Media Server
>> Duration: N/A, start: 0.10, bitrate: N/A
>>  Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080,
>> 100 tbr, 90k tbn, 180k tbc
> 
> I see that the two streams have different pixel formats yuvj420p and
>> yuv420p. You could try to bring them to the same pixel format before using
>> hstack.
> [0]format=yuv420p[a];[a][1]hstack
> 
> It's only a wild guess, I'm not sure.
 
 Do I put this into the filter_complex argument, e.g. -filter_complex
>> "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
 
 That still results in the "Conversion failed!” error.
>>> 
>>> There is a "scale" missing behind format iirc but for performance
>> reasons you
>>> want to overwrite the pix_fmt instead, not sure if this is possible.
>> 
>> Some progress, here. I’m now attempting this on an M1-powered Mac mini:
>> 
>> ./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i rtsp://
>> anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i rtsp://
>> anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec
>> copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv "rtmp://
>> a.rtmp.youtube.com/live2/> 
>> which results in:
>> 
>> ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
>>  built with Apple clang version 12.0.0 (clang-1200.0.32.27)
>>  configuration: --prefix=/Volumes/tempdisk/sw
>> --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang
>> --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus
>> --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx
>> --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora
>> --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab
>> --enable-libzimg --enable-libsvtav1 --enable-version3
>> --pkg-config-flags=--static --disable-ffplay --enable-postproc
>> --enable-nonfree --enable-neon --enable-runtime-cpudetect
>> --disable-indev=qtkit --disable-indev=x11grab_xcb
>>  libavutil  56. 70.100 / 56. 70.100
>>  libavcodec 58.134.100 / 58.134.100
>>  libavformat58. 76.100 / 58. 76.100
>>  libavdevice58. 13.100 / 58. 13.100
>>  libavfilter 7.110.100 /  7.110.100
>>  libswscale  5.  9.100 /  5.  9.100
>>  libswresample   3.  9.100 /  3.  9.100
>>  libpostproc55.  9.100 / 55.  9.100
>> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
>>  Metadata:
>>title   : Media Server
>>  Duration: N/A, start: 0.08, bitrate: N/A
>>  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
>> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
>> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
>>  Metadata:
>>title   : Media Server
>>  Duration: N/A, start: 0.06, bitrate: N/A
>>  Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
>> tbr, 90k tbn, 180k tbc
>>  Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
>> 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-08 Thread Fabrizio Negro
I own a GTX1060 and I have to make an mp4. In addition Davinci Resolve with
this card exports to NVenc in a sublime way.

Il Lun 8 Nov 2021, 20:07 Dennis Mungai  ha scritto:

> On Mon, 8 Nov 2021 at 20:44, andrei ka  wrote:
>
> > you could simply plug a recent low profile nvidia (e.g. 1030) into pcie
> > slot of your hpe micro and nvenc would do 2 fhd h264 encodes like a charm
> > 
> >
> > On Sun, Nov 7, 2021 at 11:40 PM Steven Kan  wrote:
> >
> > > > On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos 
> > > wrote:
> > > >
> > > > Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan <
> ste...@kan.org
> > >:
> > > >>
> > > >>> On Jan 18, 2021, at 12:50 PM, Michael Koch <
> > > astroelectro...@t-online.de> wrote:
> > > >
> > >  C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size
> > 1024
> > > -i rtsp://anonymous:password@192.168.1.47:554 -i rtsp://
> > > anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t
> > > 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
> > > 
> > >  [snip
> > > >>
> > >  Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554
> ':
> > >  Metadata:
> > >    title   : Media Server
> > >  Duration: N/A, start: 0.08, bitrate: N/A
> > >    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709,
> progressive),
> > > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> > >  Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554
> ':
> > >  Metadata:
> > >    title   : Media Server
> > >  Duration: N/A, start: 0.10, bitrate: N/A
> > >    Stream #1:0: Video: h264 (Main), yuv420p(progressive),
> 1920x1080,
> > > 100 tbr, 90k tbn, 180k tbc
> > > >>>
> > > >>> I see that the two streams have different pixel formats yuvj420p
> and
> > > yuv420p. You could try to bring them to the same pixel format before
> > using
> > > hstack.
> > > >>> [0]format=yuv420p[a];[a][1]hstack
> > > >>>
> > > >>> It's only a wild guess, I'm not sure.
> > > >>
> > > >> Do I put this into the filter_complex argument, e.g. -filter_complex
> > > "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
> > > >>
> > > >> That still results in the "Conversion failed!” error.
> > > >
> > > > There is a "scale" missing behind format iirc but for performance
> > > reasons you
> > > > want to overwrite the pix_fmt instead, not sure if this is possible.
> > >
> > > Some progress, here. I’m now attempting this on an M1-powered Mac mini:
> > >
> > > ./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i rtsp://
> > > anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i rtsp://
> > > anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec
> > > copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv "rtmp://
> > > a.rtmp.youtube.com/live2/ > >
> > > which results in:
> > >
> > > ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
> > >   built with Apple clang version 12.0.0 (clang-1200.0.32.27)
> > >   configuration: --prefix=/Volumes/tempdisk/sw
> > > --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang
> > > --enable-gpl --enable-videotoolbox --enable-libopenjpeg
> --enable-libopus
> > > --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx
> > > --enable-libwebp --enable-libass --enable-libfreetype
> --enable-libtheora
> > > --enable-libvorbis --enable-libsnappy --enable-libaom
> --enable-libvidstab
> > > --enable-libzimg --enable-libsvtav1 --enable-version3
> > > --pkg-config-flags=--static --disable-ffplay --enable-postproc
> > > --enable-nonfree --enable-neon --enable-runtime-cpudetect
> > > --disable-indev=qtkit --disable-indev=x11grab_xcb
> > >   libavutil  56. 70.100 / 56. 70.100
> > >   libavcodec 58.134.100 / 58.134.100
> > >   libavformat58. 76.100 / 58. 76.100
> > >   libavdevice58. 13.100 / 58. 13.100
> > >   libavfilter 7.110.100 /  7.110.100
> > >   libswscale  5.  9.100 /  5.  9.100
> > >   libswresample   3.  9.100 /  3.  9.100
> > >   libpostproc55.  9.100 / 55.  9.100
> > > Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> > >   Metadata:
> > > title   : Media Server
> > >   Duration: N/A, start: 0.08, bitrate: N/A
> > >   Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> > > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> > > Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> > >   Metadata:
> > > title   : Media Server
> > >   Duration: N/A, start: 0.06, bitrate: N/A
> > >   Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
> > > tbr, 90k tbn, 180k tbc
> > >   Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
> > > Stream mapping:
> > >   Stream #0:0 (h264) -> hstack:input0
> > >   Stream #1:0 (h264) -> hstack:input1
> > >   hstack -> Stream #0:0 (h264_videotoolbox)
> > >   Stream #1:1 -> #0:1 (copy)
> > > Press [q] to stop, [?] for help
> > > [rtsp @ 0x14a00ca00] max delay reached. need to consume 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-08 Thread Dennis Mungai
On Mon, 8 Nov 2021 at 20:44, andrei ka  wrote:

> you could simply plug a recent low profile nvidia (e.g. 1030) into pcie
> slot of your hpe micro and nvenc would do 2 fhd h264 encodes like a charm
> 
>
> On Sun, Nov 7, 2021 at 11:40 PM Steven Kan  wrote:
>
> > > On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos 
> > wrote:
> > >
> > > Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan  >:
> > >>
> > >>> On Jan 18, 2021, at 12:50 PM, Michael Koch <
> > astroelectro...@t-online.de> wrote:
> > >
> >  C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size
> 1024
> > -i rtsp://anonymous:password@192.168.1.47:554 -i rtsp://
> > anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t
> > 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
> > 
> >  [snip
> > >>
> >  Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> >  Metadata:
> >    title   : Media Server
> >  Duration: N/A, start: 0.08, bitrate: N/A
> >    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> >  Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> >  Metadata:
> >    title   : Media Server
> >  Duration: N/A, start: 0.10, bitrate: N/A
> >    Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080,
> > 100 tbr, 90k tbn, 180k tbc
> > >>>
> > >>> I see that the two streams have different pixel formats yuvj420p and
> > yuv420p. You could try to bring them to the same pixel format before
> using
> > hstack.
> > >>> [0]format=yuv420p[a];[a][1]hstack
> > >>>
> > >>> It's only a wild guess, I'm not sure.
> > >>
> > >> Do I put this into the filter_complex argument, e.g. -filter_complex
> > "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
> > >>
> > >> That still results in the "Conversion failed!” error.
> > >
> > > There is a "scale" missing behind format iirc but for performance
> > reasons you
> > > want to overwrite the pix_fmt instead, not sure if this is possible.
> >
> > Some progress, here. I’m now attempting this on an M1-powered Mac mini:
> >
> > ./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i rtsp://
> > anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i rtsp://
> > anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec
> > copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv "rtmp://
> > a.rtmp.youtube.com/live2/ >
> > which results in:
> >
> > ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
> >   built with Apple clang version 12.0.0 (clang-1200.0.32.27)
> >   configuration: --prefix=/Volumes/tempdisk/sw
> > --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang
> > --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus
> > --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx
> > --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora
> > --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab
> > --enable-libzimg --enable-libsvtav1 --enable-version3
> > --pkg-config-flags=--static --disable-ffplay --enable-postproc
> > --enable-nonfree --enable-neon --enable-runtime-cpudetect
> > --disable-indev=qtkit --disable-indev=x11grab_xcb
> >   libavutil  56. 70.100 / 56. 70.100
> >   libavcodec 58.134.100 / 58.134.100
> >   libavformat58. 76.100 / 58. 76.100
> >   libavdevice58. 13.100 / 58. 13.100
> >   libavfilter 7.110.100 /  7.110.100
> >   libswscale  5.  9.100 /  5.  9.100
> >   libswresample   3.  9.100 /  3.  9.100
> >   libpostproc55.  9.100 / 55.  9.100
> > Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> >   Metadata:
> > title   : Media Server
> >   Duration: N/A, start: 0.08, bitrate: N/A
> >   Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> > 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> > Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> >   Metadata:
> > title   : Media Server
> >   Duration: N/A, start: 0.06, bitrate: N/A
> >   Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
> > tbr, 90k tbn, 180k tbc
> >   Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
> > Stream mapping:
> >   Stream #0:0 (h264) -> hstack:input0
> >   Stream #1:0 (h264) -> hstack:input1
> >   hstack -> Stream #0:0 (h264_videotoolbox)
> >   Stream #1:1 -> #0:1 (copy)
> > Press [q] to stop, [?] for help
> > [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> > [rtsp @ 0x14a00ca00] RTP: missed 146 packets
> > [rtsp @ 0x139013a00] Thread message queue blocking; consider raising the
> > thread_queue_size option (current value: 8)
> > [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> > [rtsp @ 0x14a00ca00] RTP: missed 80 packets
> > Output #0, flv, to 'rtmp://
> > a.rtmp.youtube.com/live2/q9rg-sqaq-f0mg-yj1c-e42f':
> >   Metadata:
> > title   : 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-08 Thread andrei ka
you could simply plug a recent low profile nvidia (e.g. 1030) into pcie
slot of your hpe micro and nvenc would do 2 fhd h264 encodes like a charm


On Sun, Nov 7, 2021 at 11:40 PM Steven Kan  wrote:

> > On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos 
> wrote:
> >
> > Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan :
> >>
> >>> On Jan 18, 2021, at 12:50 PM, Michael Koch <
> astroelectro...@t-online.de> wrote:
> >
>  C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024
> -i rtsp://anonymous:password@192.168.1.47:554 -i rtsp://
> anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t
> 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
> 
>  [snip
> >>
>  Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
>  Metadata:
>    title   : Media Server
>  Duration: N/A, start: 0.08, bitrate: N/A
>    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
>  Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
>  Metadata:
>    title   : Media Server
>  Duration: N/A, start: 0.10, bitrate: N/A
>    Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080,
> 100 tbr, 90k tbn, 180k tbc
> >>>
> >>> I see that the two streams have different pixel formats yuvj420p and
> yuv420p. You could try to bring them to the same pixel format before using
> hstack.
> >>> [0]format=yuv420p[a];[a][1]hstack
> >>>
> >>> It's only a wild guess, I'm not sure.
> >>
> >> Do I put this into the filter_complex argument, e.g. -filter_complex
> "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
> >>
> >> That still results in the "Conversion failed!” error.
> >
> > There is a "scale" missing behind format iirc but for performance
> reasons you
> > want to overwrite the pix_fmt instead, not sure if this is possible.
>
> Some progress, here. I’m now attempting this on an M1-powered Mac mini:
>
> ./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i rtsp://
> anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i rtsp://
> anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec
> copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv "rtmp://
> a.rtmp.youtube.com/live2/
> which results in:
>
> ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
>   built with Apple clang version 12.0.0 (clang-1200.0.32.27)
>   configuration: --prefix=/Volumes/tempdisk/sw
> --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang
> --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus
> --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx
> --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora
> --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab
> --enable-libzimg --enable-libsvtav1 --enable-version3
> --pkg-config-flags=--static --disable-ffplay --enable-postproc
> --enable-nonfree --enable-neon --enable-runtime-cpudetect
> --disable-indev=qtkit --disable-indev=x11grab_xcb
>   libavutil  56. 70.100 / 56. 70.100
>   libavcodec 58.134.100 / 58.134.100
>   libavformat58. 76.100 / 58. 76.100
>   libavdevice58. 13.100 / 58. 13.100
>   libavfilter 7.110.100 /  7.110.100
>   libswscale  5.  9.100 /  5.  9.100
>   libswresample   3.  9.100 /  3.  9.100
>   libpostproc55.  9.100 / 55.  9.100
> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
>   Metadata:
> title   : Media Server
>   Duration: N/A, start: 0.08, bitrate: N/A
>   Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
>   Metadata:
> title   : Media Server
>   Duration: N/A, start: 0.06, bitrate: N/A
>   Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
> tbr, 90k tbn, 180k tbc
>   Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
> Stream mapping:
>   Stream #0:0 (h264) -> hstack:input0
>   Stream #1:0 (h264) -> hstack:input1
>   hstack -> Stream #0:0 (h264_videotoolbox)
>   Stream #1:1 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> [rtsp @ 0x14a00ca00] RTP: missed 146 packets
> [rtsp @ 0x139013a00] Thread message queue blocking; consider raising the
> thread_queue_size option (current value: 8)
> [rtsp @ 0x14a00ca00] max delay reached. need to consume packet
> [rtsp @ 0x14a00ca00] RTP: missed 80 packets
> Output #0, flv, to 'rtmp://
> a.rtmp.youtube.com/live2/q9rg-sqaq-f0mg-yj1c-e42f':
>   Metadata:
> title   : Media Server
> encoder : Lavf58.76.100
>   Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), nv12(progressive),
> 3840x1080, q=2-31, 200 kb/s, 1k tbn (default)
> Metadata:
>   encoder : Lavc58.134.100 h264_videotoolbox
>   Stream #0:1: Audio: 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-11-07 Thread Steven Kan
> On Jan 18, 2021, at 10:42 PM, Carl Eugen Hoyos  wrote:
> 
> Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan :
>> 
>>> On Jan 18, 2021, at 12:50 PM, Michael Koch  
>>> wrote:
> 
 C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
 rtsp://anonymous:password@192.168.1.47:554 -i 
 rtsp://anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy 
 -t 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
 
 [snip
>> 
 Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
 Metadata:
   title   : Media Server
 Duration: N/A, start: 0.08, bitrate: N/A
   Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 
 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
 Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
 Metadata:
   title   : Media Server
 Duration: N/A, start: 0.10, bitrate: N/A
   Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100 
 tbr, 90k tbn, 180k tbc
>>> 
>>> I see that the two streams have different pixel formats yuvj420p and 
>>> yuv420p. You could try to bring them to the same pixel format before using 
>>> hstack.
>>> [0]format=yuv420p[a];[a][1]hstack
>>> 
>>> It's only a wild guess, I'm not sure.
>> 
>> Do I put this into the filter_complex argument, e.g. -filter_complex 
>> "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
>> 
>> That still results in the "Conversion failed!” error.
> 
> There is a "scale" missing behind format iirc but for performance reasons you
> want to overwrite the pix_fmt instead, not sure if this is possible.

Some progress, here. I’m now attempting this on an M1-powered Mac mini:

./ffmpeg -thread_queue_size 1024 -hwaccel videotoolbox -i 
rtsp://anonymous:password@192.168.1.47:554 -hwaccel videotoolbox -i 
rtsp://anonymous:password@192.168.1.50:554 -vcodec h264_videotoolbox -acodec 
copy -t 01:00:00 -filter_complex hstack=inputs=2 -f flv 
"rtmp://a.rtmp.youtube.com/live2/ hstack:input0
  Stream #1:0 (h264) -> hstack:input1
  hstack -> Stream #0:0 (h264_videotoolbox)
  Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[rtsp @ 0x14a00ca00] max delay reached. need to consume packet
[rtsp @ 0x14a00ca00] RTP: missed 146 packets
[rtsp @ 0x139013a00] Thread message queue blocking; consider raising the 
thread_queue_size option (current value: 8)
[rtsp @ 0x14a00ca00] max delay reached. need to consume packet
[rtsp @ 0x14a00ca00] RTP: missed 80 packets
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/q9rg-sqaq-f0mg-yj1c-e42f':
  Metadata:
title   : Media Server
encoder : Lavf58.76.100
  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), nv12(progressive), 
3840x1080, q=2-31, 200 kb/s, 1k tbn (default)
Metadata:
  encoder : Lavc58.134.100 h264_videotoolbox
  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 8000 Hz, mono, fltp
[h264_videotoolbox @ 0x14b01b800] Color range not set for nv12. Using MPEG 
range.
[rtsp @ 0x139013a00] max delay reached. need to consume 
packettrate=6235.2kbits/s dup=0 drop=1 speed=0.794x
[rtsp @ 0x139013a00] RTP: missed 29 packets
[rtsp @ 0x139013a00] max delay reached. need to consume packet
[rtsp @ 0x139013a00] RTP: missed 78 packets
[rtsp @ 0x139013a00] max delay reached. need to consume packet
[rtsp @ 0x139013a00] RTP: missed 132 packets
[rtsp @ 0x139013a00] max delay reached. need to consume packet
[rtsp @ 0x139013a00] RTP: missed 49 packets
[rtsp @ 0x139013a00] max delay reached. need to consume packet
[rtsp @ 0x139013a00] RTP: missed 12 packets
[h264 @ 0x139074600] hardware accelerator failed to decode picture
[h264 @ 0x139074c00] hardware accelerator failed to decode picture
[h264 @ 0x139075200] hardware accelerator failed to decode picture
[h264 @ 0x139070a00] hardware accelerator failed to decode picture
[h264 @ 0x139072800] hardware accelerator failed to decode picture
[h264 @ 0x139072e00] hardware accelerator failed to decode picture
[h264 @ 0x139073400] hardware accelerator failed to decode picture
[h264 @ 0x139073a00] hardware accelerator failed to decode picture
Error while decoding stream #1:0: Unknown error occurred
[h264 @ 0x139074000] hardware accelerator failed to decode picture
Error while decoding stream #1:0: Unknown error occurred

After a few seconds those errors go away, and then the status line just reads:

frame=20249 fps= 55 q=-0.0 size=   67873kB time=00:06:12.99 
bitrate=1490.7kbits/s dup=0 drop=2 speed=   1x

I don’t know why the errors occur, nor why they resolve themselves, but 
eventually it works. ¯\_(ツ)_/¯

top shows ffmpeg consuming about ~30% of the CPU, which is more than I had 
hoped for, but far better than I’d seen on my previous i5- and AMD-powered 
boxes. 

So I should be able to stream 4 cameras to 2 YT channels without completely 
cooking my mini.

I tried using hevc_videotoolbox, but I get the error, "Video codec hevc not 
compatible with flv"

I am 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-01-18 Thread Carl Eugen Hoyos
Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan :
>
> > On Jan 18, 2021, at 12:50 PM, Michael Koch  
> > wrote:

> >> C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
> >> rtsp://anonymous:password@192.168.1.47:554 -i 
> >> rtsp://anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy 
> >> -t 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
> >>
> >> [snip
>
> >> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> >>  Metadata:
> >>title   : Media Server
> >>  Duration: N/A, start: 0.08, bitrate: N/A
> >>Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 
> >> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> >> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> >>  Metadata:
> >>title   : Media Server
> >>  Duration: N/A, start: 0.10, bitrate: N/A
> >>Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100 
> >> tbr, 90k tbn, 180k tbc
> >
> > I see that the two streams have different pixel formats yuvj420p and 
> > yuv420p. You could try to bring them to the same pixel format before using 
> > hstack.
> > [0]format=yuv420p[a];[a][1]hstack
> >
> > It's only a wild guess, I'm not sure.
>
> Do I put this into the filter_complex argument, e.g. -filter_complex 
> "[0]format=yuv420p[a];[a][1] hstack=inputs=2”
>
> That still results in the "Conversion failed!” error.

There is a "scale" missing behind format iirc but for performance reasons you
want to overwrite the pix_fmt instead, not sure if this is possible.

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

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-01-18 Thread Steven Kan

> On Jan 18, 2021, at 12:50 PM, Michael Koch  
> wrote:
> 
> Am 18.01.2021 um 21:20 schrieb Steven Kan:
>>> On Jan 18, 2021, at 10:58 AM, Michael Koch  
>>> wrote:
>>> 
>>> Am 18.01.2021 um 19:18 schrieb Steven Kan:
 But now I want to do a “2-Up” live stream of two different cameras, 
 side-by-side. Here’s an archive from last night (waiting for a mating pair 
 of Barn Owls to move in):
 
 https://www.youtube.com/watch?v=GDN2MjPwn0Q=youtu.be 
 
 
 The cameras are each outputting 1920 x 1080 @ 25 fps.
 
 Now that I’m actually encoding, I need a lot more CPU/GPU. I’m running 
 this in Win10 Pro/64 on an HP Microserver with an AMD Opteron X3418 
 Quad-Core, and the CPU runs at about ~65-80% while the integrated GPU runs 
 at about ~55%.
 
 C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
 rtsp://anonymous:password@192.168.1.47:554 
  -i 
 rtsp://anonymous:password@192.168.1.50:554 
  -vcodec h264_amf -acodec copy 
 -t 01:47:02 -filter_complex "nullsrc=size=3840x1080 [base]; [0:v] 
 setpts=PTS-STARTPTS, scale=1920x1080 [upperleft]; [1:v] 
 setpts=PTS-STARTPTS, scale=1920x1080 [upperright]; [base][upperleft] 
 overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=1920" 
 -f flv "rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key 
 ”
>>> Wouldn't it be easier to use something like
>>> [upperleft][upperright] hstack
>> It might be. I didn’t know hstack existed :D. When I googled ‘ffmpeg 2-up” 
>> the nullsrc/overlay examples were the first ones I found :D
>> 
>> I tried hstack, and I’m not getting at all the results I expect. On my 
>> Windows machine I get "Conversion failed!” error, whereas the same command 
>> with '-filter_complex “nullsrc . . . .’ does not fail:
>> 
>> C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
>> rtsp://anonymous:password@192.168.1.47:554 -i 
>> rtsp://anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t 
>> 01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv
>> 
>> [snip

>> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
>>  Metadata:
>>title   : Media Server
>>  Duration: N/A, start: 0.08, bitrate: N/A
>>Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 
>> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
>> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
>>  Metadata:
>>title   : Media Server
>>  Duration: N/A, start: 0.10, bitrate: N/A
>>Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100 
>> tbr, 90k tbn, 180k tbc
> 
> I see that the two streams have different pixel formats yuvj420p and yuv420p. 
> You could try to bring them to the same pixel format before using hstack.
> [0]format=yuv420p[a];[a][1]hstack
> 
> It's only a wild guess, I'm not sure.

Do I put this into the filter_complex argument, e.g. -filter_complex 
"[0]format=yuv420p[a];[a][1] hstack=inputs=2” 

That still results in the "Conversion failed!” error.

Curiouser and curiouser. 

If I change -vcodec h264_amf to -vcodec libx264 with hstack, then i don’t get a 
“Conversion failed!” error. But the CPU goes to 100% and the speed never 
exceeds 0.5x, so it’s not a useful solution. But it does show that the -vcodec 
argument might be a part of the problem.

But -vcodec h264_amf worked just fine with the  -filter_complex “nullsrc=. . . 
. method, and it fails with hstack.


___
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] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-01-18 Thread Steven Kan
> On Jan 18, 2021, at 10:58 AM, Michael Koch  
> wrote:
> 
> Am 18.01.2021 um 19:18 schrieb Steven Kan:
>> But now I want to do a “2-Up” live stream of two different cameras, 
>> side-by-side. Here’s an archive from last night (waiting for a mating pair 
>> of Barn Owls to move in):
>> 
>> https://www.youtube.com/watch?v=GDN2MjPwn0Q=youtu.be 
>> 
>> 
>> The cameras are each outputting 1920 x 1080 @ 25 fps.
>> 
>> Now that I’m actually encoding, I need a lot more CPU/GPU. I’m running this 
>> in Win10 Pro/64 on an HP Microserver with an AMD Opteron X3418 Quad-Core, 
>> and the CPU runs at about ~65-80% while the integrated GPU runs at about 
>> ~55%.
>> 
>> C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
>> rtsp://anonymous:password@192.168.1.47:554 
>>  -i 
>> rtsp://anonymous:password@192.168.1.50:554 
>>  -vcodec h264_amf -acodec copy 
>> -t 01:47:02 -filter_complex "nullsrc=size=3840x1080 [base]; [0:v] 
>> setpts=PTS-STARTPTS, scale=1920x1080 [upperleft]; [1:v] setpts=PTS-STARTPTS, 
>> scale=1920x1080 [upperright]; [base][upperleft] overlay=shortest=1 [tmp1]; 
>> [tmp1][upperright] overlay=shortest=1:x=1920" -f flv 
>> "rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key 
>> ”
> 
> Wouldn't it be easier to use something like
> [upperleft][upperright] hstack

It might be. I didn’t know hstack existed :D. When I googled ‘ffmpeg 2-up” the 
nullsrc/overlay examples were the first ones I found :D 

I tried hstack, and I’m not getting at all the results I expect. On my Windows 
machine I get "Conversion failed!” error, whereas the same command with 
'-filter_complex “nullsrc . . . .’ does not fail:

C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
rtsp://anonymous:password@192.168.1.47:554 -i 
rtsp://anonymous:password@192.168.1.50:554 -vcodec h264_amf -acodec copy -t 
01:47:02 -filter_complex hstack=inputs=2 -f flv out.flv   

ffmpeg version 2020-12-09-git-e5119a-essentials_build-www.gyan.dev 
Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static 
--disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv 
--enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib 
--enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid 
--enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass 
--enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf 
--enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid 
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va 
--enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt 
--enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora 
--enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb 
--enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil  56. 62.100 / 56. 62.100
  libavcodec 58.115.102 / 58.115.102
  libavformat58. 65.100 / 58. 65.100
  libavdevice58. 11.103 / 58. 11.103
  libavfilter 7. 92.100 /  7. 92.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
  Metadata:
title   : Media Server
  Duration: N/A, start: 0.08, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 
1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
  Metadata:
title   : Media Server
  Duration: N/A, start: 0.10, bitrate: N/A
Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100 tbr, 
90k tbn, 180k tbc
Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
Stream mapping:
  Stream #0:0 (h264) -> hstack:input0
  Stream #1:0 (h264) -> hstack:input1
  hstack -> Stream #0:0 (h264_amf)
  Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[rtsp @ 02a54cba0fc0] Thread message queue blocking; consider raising the 
thread_queue_size option (current value: 8)
[rtsp @ 02a54cb2dd80] max delay reached. need to consume packet
[rtsp @ 02a54cb2dd80] RTP: missed 135 packets
[swscaler @ 02a550941000] deprecated pixel format used, make sure you did 
set range correctly
[swscaler @ 02a54ef7d380] deprecated pixel format used, make sure you did 
set range correctly
[h264_amf @ 02a54d76dc80] encoder->Init() failed with error 36
Error initializing output stream 0:0 -- Error while opening encoder for output 
stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-01-18 Thread Paul B Mahol
Try using more optimized filters like, hstack/vstack. nullsrc and two
overlays when there is no alpha is pointless.

On Mon, Jan 18, 2021 at 7:49 PM Steven Kan  wrote:

> I’ve been using fffmpeg as a “relay station” for a few years to pull RTSP
> streams from several IP cameras and push them to YouTube, such as my 24/7
> BeeCam:
>
> https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live <
> https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live>
>
> Command is of the form:
>
> ./ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "rtsp://
> anonymous:password@192.168.1.50:554  anonymous:password@192.168.1.50:554>" -vcodec copy -acodec copy -t
> 01:00:00 -f flv "rtmp://a.rtmp.youtube.com/live2/
> ”
>
> Because I’m deliberately just relaying the packets and _not_ doing any
> transcoding, the CPU utilization is remarkably low, and independent of
> camera resolution. I can run 3 instances of ffmpeg on Raspbian/Raspberry Pi
> 3B+ and each uses only about 10% of the CPU, despite each pushing a 5 MP
> camera stream.
>
> This works very well; no problems here!
>
> But now I want to do a “2-Up” live stream of two different cameras,
> side-by-side. Here’s an archive from last night (waiting for a mating pair
> of Barn Owls to move in):
>
> https://www.youtube.com/watch?v=GDN2MjPwn0Q=youtu.be <
> https://www.youtube.com/watch?v=GDN2MjPwn0Q=youtu.be>
>
> The cameras are each outputting 1920 x 1080 @ 25 fps.
>
> Now that I’m actually encoding, I need a lot more CPU/GPU. I’m running
> this in Win10 Pro/64 on an HP Microserver with an AMD Opteron X3418
> Quad-Core, and the CPU runs at about ~65-80% while the integrated GPU runs
> at about ~55%.
>
> C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i
> rtsp://anonymous:password@192.168.1.47:554  anonymous:password@192.168.1.47:554> -i rtsp://
> anonymous:password@192.168.1.50:554  anonymous:password@192.168.1.50:554> -vcodec h264_amf -acodec copy -t
> 01:47:02 -filter_complex "nullsrc=size=3840x1080 [base]; [0:v]
> setpts=PTS-STARTPTS, scale=1920x1080 [upperleft]; [1:v]
> setpts=PTS-STARTPTS, scale=1920x1080 [upperright]; [base][upperleft]
> overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=1920" -f
> flv "rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key  a.rtmp.youtube.com/live2/my-youtube-streaming-key>”
>
> ffmpeg version 2020-12-09-git-e5119a-essentials_build-www.gyan.dev <
> http://www.gyan.dev/> Copyright (c) 2000-2020 the FFmpeg developers
>   built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-w32threads --disable-autodetect --enable-fontconfig
> --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma
> --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq
> --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg
> --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi
> --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
> --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
> --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx
> --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb
> --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc
> --enable-libgsm --enable-libopencore-amrnb --enable-libopus
> --enable-libspeex --enable-libvorbis --enable-librubberband
>   libavutil  56. 62.100 / 56. 62.100
>   libavcodec 58.115.102 / 58.115.102
>   libavformat58. 65.100 / 58. 65.100
>   libavdevice58. 11.103 / 58. 11.103
>   libavfilter 7. 92.100 /  7. 92.100
>   libswscale  5.  8.100 /  5.  8.100
>   libswresample   3.  8.100 /  3.  8.100
>   libpostproc55.  8.100 / 55.  8.100
> Input #0, rtsp, from 'rtsp://anonymous:password@192.168.1.47:554':
> 
>   Metadata:
> title   : Media Server
>   Duration: N/A, start: 0.08, bitrate: N/A
> Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
> Input #1, rtsp, from 'rtsp://anonymous:password@192.168.1.50:554':
> 
>   Metadata:
> title   : Media Server
>   Duration: N/A, start: 0.10, bitrate: N/A
> Stream #1:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 100
> tbr, 90k tbn, 180k tbc
> Stream #1:1: Audio: aac (LC), 8000 Hz, mono, fltp
> Stream mapping:
>   Stream #0:0 (h264) -> setpts
>   Stream #1:0 (h264) -> setpts
>   overlay -> Stream #0:0 (h264_amf)
>   Stream #1:1 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> [rtsp @ 0199e58e14c0] Thread message queue blocking; consider raising
> the thread_queue_size option (current value: 8)
> [rtsp @ 0199e586d9c0] max delay reached. need to consume packet
> [rtsp @ 0199e586d9c0] RTP: missed 157 packets
> [swscaler @ 0199e5cc5b80] deprecated pixel format used, make sure you
> did set range correctly
> 

Re: [FFmpeg-user] HW Acceleration 101? 2-Up Streaming from RTSP-->ffmpeg-->YouTube

2021-01-18 Thread Michael Koch

Am 18.01.2021 um 19:18 schrieb Steven Kan:

But now I want to do a “2-Up” live stream of two different cameras, 
side-by-side. Here’s an archive from last night (waiting for a mating pair of 
Barn Owls to move in):

https://www.youtube.com/watch?v=GDN2MjPwn0Q=youtu.be 


The cameras are each outputting 1920 x 1080 @ 25 fps.

Now that I’m actually encoding, I need a lot more CPU/GPU. I’m running this in 
Win10 Pro/64 on an HP Microserver with an AMD Opteron X3418 Quad-Core, and the 
CPU runs at about ~65-80% while the integrated GPU runs at about ~55%.

C:\Program Files\ffmpeg\bin> .\ffmpeg.exe -re -thread_queue_size 1024 -i 
rtsp://anonymous:password@192.168.1.47:554  -i 
rtsp://anonymous:password@192.168.1.50:554  -vcodec h264_amf 
-acodec copy -t 01:47:02 -filter_complex "nullsrc=size=3840x1080 [base]; [0:v] setpts=PTS-STARTPTS, 
scale=1920x1080 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=1920x1080 [upperright]; [base][upperleft] 
overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=1920" -f flv 
"rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key 
”


Wouldn't it be easier to use something like
[upperleft][upperright] hstack

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