My goal was to get a stream with audio and video running on both the Raspberry Pi 3 and Pi 4!
For one hour, this isn't a problem, but after that hour, the Pi 4 starts playing the audio too early!
I've already experimented a lot with various commands!
Rubberband, the latest FPS filter for 7.1, ffmpeg, etc.
I've reduced it to one command that runs for 24 hours on the Pi 3 but not on the Pi 4. It's always the same: the audio starts playing too early sooner or later, and the latency increases.
This simple command runs for 24 hours on the Pi 3; I haven't tested it for longer.
I've tried using a different command.
nice -n -11 rpicam-vid --low-latency 1 -b 1000000 --denoise cdn_off --codec libav --libav-format flv --profile=high --hdr=off --libav-video-codec h264_v4l2m2m \
--level 4.2 --framerate 24 --width 1536 --height 864 \
--audio-codec libfdk_aac --audio-channels 1 --libav-audio 1 --audio-source pulse --intra 0 \
-t 0 --flush 0 -n --inline -o - | ffmpeg -hide_banner -fflags nobuffer+discardcorrupt+genpts -flags low_delay \
-hwaccel drm -hwaccel_output_format drm_prime -i - -codec copy -copyts -map 0:0 -map 0:1 \
-f rtsp -rtsp_transport udp
Why doesn't the same command work on the Pi 4?
And what can I do?
For one hour, this isn't a problem, but after that hour, the Pi 4 starts playing the audio too early!
I've already experimented a lot with various commands!
Rubberband, the latest FPS filter for 7.1, ffmpeg, etc.
I've reduced it to one command that runs for 24 hours on the Pi 3 but not on the Pi 4. It's always the same: the audio starts playing too early sooner or later, and the latency increases.
This simple command runs for 24 hours on the Pi 3; I haven't tested it for longer.
I've tried using a different command.
nice -n -11 rpicam-vid --low-latency 1 -b 1000000 --denoise cdn_off --codec libav --libav-format flv --profile=high --hdr=off --libav-video-codec h264_v4l2m2m \
--level 4.2 --framerate 24 --width 1536 --height 864 \
--audio-codec libfdk_aac --audio-channels 1 --libav-audio 1 --audio-source pulse --intra 0 \
-t 0 --flush 0 -n --inline -o - | ffmpeg -hide_banner -fflags nobuffer+discardcorrupt+genpts -flags low_delay \
-hwaccel drm -hwaccel_output_format drm_prime -i - -codec copy -copyts -map 0:0 -map 0:1 \
-f rtsp -rtsp_transport udp
Why doesn't the same command work on the Pi 4?
And what can I do?
Statistics: Posted by mediauser — Sun Jan 11, 2026 10:18 am — Replies 18 — Views 183