Hi everyone,

I’m looking for some tips on how to record a Git2 h264 feed smoothly on a 
Raspberry Pi without being affected by it trying to stream over long distance 
Wi-Fi network.

The network we are on will occasionally be bad, but we would like the recording 
to be perfect regardless of intermittently bad streaming quality. I’ve tried 
using the tee pseudo mixer as well as a real tee in my experiments:


1) Baseline: record only

ffmpeg -f v4l2 -input_format h264 -video_size 640x480 -framerate 30 -i 
/dev/video0 -f flv -vcodec copy -r 30 -b:v 1M -tune zerolatency -preset 
ultrafast /home/pi/recordonly.h264

Result: A very smooth recording of whatever the Git2 hardware pre-encoded.


2a) Turn on streaming with tee pseudo muxer

ffmpeg -f v4l2 -input_format h264 -video_size 640x480 -framerate 30 -i 
/dev/video0 -f tee -map 0:v -vcodec copy -r 30 -b:v 1M -tune zerolatency 
-preset ultrafast "[f=flv]rtmp://x.x.x.x:1935/my_url|/home/pi/pseudotee.h264 
<rtmp://x.x.x.x:1935/my_url%7C/home/pi/pseudotee.h264>"

Result: pseudotee.h264 looks identically bad as the recording we made at the 
receiving point for the RTMP feed.


2b) Turn on streaming with pipes to use the system’s tee and 2 ffmpegs

ffmpeg -f v4l2 -input_format h264 -video_size 640x480 -framerate 30 -i 
/dev/video0 -f flv -vcodec copy -r 30 -b:v 1M -tune zerolatency -preset 
ultrafast pipe: | tee /home/pi/unixtee.h264 | ffmpeg -i pipe: 
rtmp://x.x.x.x:1935/my_url <rtmp://x.x.x.x:1935/my_url> 

Result: a _slightly_ better looking, but otherwise still bad recording is made.



Is there anyway for me to prioritise the creation of a good recording of the 
live stream over the actual stream?

Thanks
Jiin Joo

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to