Is there a way one can compress captured video input before saving to file? I have raspberry pi that I am using to record youtube videos. 1-2 min video takes over a Gb of space. I cant compress the recorded file because the pi does not have enough space to record the initial video. Is there a way using ffmpeg I can compress my webcam video directly after its captured before saving the file versus waiting until I am done recording then compressing the saved file?
ffmpeg \ -f v4l2 \ -thread_queue_size 5000 -framerate 25 -video_size 640x480 -i /dev/video0 -y -c:v libx264 ~/Desktop/ffmpegTesting/money.mp4 \ -thread_queue_size 5000 -f alsa -ac 1 -ar 44100 -i hw:1,0 -t 30 -c:v copy -c:a ~/Desktop/ffmpegTesting/money.mp4 \