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

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Jan 19 08:42:09 EET 2021


Am Mo., 18. Jan. 2021 um 23:34 Uhr schrieb Steven Kan <steven at kan.org>:
>
> > On Jan 18, 2021, at 12:50 PM, Michael Koch <astroelectronic at 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.080000, 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.100000, 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


More information about the ffmpeg-user mailing list