Just after updating my raspian to VLC media player 3.0.12 Vetinari (revision 1.0.6-1618-g917488b78) my .mp4 (h.264) files recorded from a Logitech C920 with cvlc on linux command line I get corrupted files after around 30 seconds of recording time.
This never happened before. When i only record a few seconds the files can be played normally. If I record a longer amount of time they get corrupted. This happens on all my Raspbery Pi 4s. So this must be a VLC bug!!
I start my Cam record(s) with the following command :
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=1 --set-ctrl=focus_auto=0 --set-ctrl=exposure_auto=3
cvlc --no-audio v4l2:///dev/video0:chroma=h264:width=1920:height=1080:fps=30 --sout '#standard{access=file,dst="/capture/'$(date +"%Y-%m-%dT%H-%M-%S")'-USBCAM.mp4"}' &
And I stop the Cam with:
killall -SIGTERM vlc
This worked flawlessly the last 2-3 years! When I record a longer time (eg. 2-3 hours) the vlc process is still alive for about 2-4 minutes AFTER killall -SIGTERM vlc and the .mp4 files are all working. Looks like if the process is still writing some additional data after being killed by the killall command. But thats fine for me.
NOW after the VLC update the vlc process stops immediately after killall -SIGTERM vlc (even when i record a longer time) and the files are corrupted and NOT PLAYABLE. Tested on different Raspian Pi4s with diifferent Logitech C920s! The .mp4 records are only playable if I record a very short amount of time.
Please fix this asap! If you need additional testing to get this bug fixed just contact me.