[FFmpeg-user] RTSP to Twitch
Moritz Barsnick
barsnick at gmx.net
Wed Mar 10 15:58:15 EET 2021
Hi Sébastien,
On Wed, Mar 10, 2021 at 12:55:25 +0100, Sébastien Bonaimé wrote:
> included x264 codec are : libx264 libx264rgb h264_omx h264_v4l2m2m h264_vaapi
> ffmpeg -probesize 10M -rtsp_transport tcp -thread_queue_size 1000k \
> -i $url \
> -vsync 0 -enc_time_base -1 \
> -bufsize 1024k -preset "$QUAL" \
> -b:v $CBR -minrate $CBR -maxrate $CBR -keyint_min 24 -g 24 \
> -crf 10 -c:v libx264 \
> -f flv $twitch_url
>
> With camera in CBR mode, I can't reach 25 FPS but only 14. And the
> stream to twitch does not last more than ew seconds. What can I do to
> improve the command ?
- Do you really need to reencode for twitch? Does it need CBR?
Otherwise, you could just use the "copy" codec.
- AFAIU, you cannot combine "-b:v" and "-crf". I believe (fro mlooking
at your logs) that the latter is being ignored.
- CRF 10 is really really low. What are you trying to achieve? Is the
default of CRF 27 not good enough? CRF 10 is bound to take a lot of
additional compute power (if not ignored).
- You listed other available encoders. Have you tried any of them? (I
have no experience with HW accel on RaspPi, others may pitch in.)
> FFmpeg version is
> ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg developers
You should try to get hold of a newer version of ffmpeg. You may have
to compile yourself though. A newer version probably won't help with
the speed of libx264, but the support for the other HWAccels may have
improved.
Cheers,
Moritz
More information about the ffmpeg-user
mailing list