[FFmpeg-user] Sometimes, ffplay fails showing raw video received over LAN
Thomas Seilund
tps.ffmpeg at netmaster.dk
Tue May 11 15:40:40 EEST 2021
Dear All
I grab video on a Raspberry Pi, host 1, and sends raw video to another
host, host 2, on the same LAN:
Host 1:
export FPS=5; export W=352; export H=240; \
raspividyuv -t 0 -n -v -hf --exposure sports -fps ${FPS} -w ${W} -h ${H}
-p 800,50,${W},${H} -o - | \
ffmpeg -f rawvideo -video_size ${W}x${H} -r ${FPS} -i pipe:0 -f rawvideo
udp://192.168.1.29:7000
. . . .
Input #0, rawvideo, from 'pipe:0':
Duration: N/A, start: 0.000000, bitrate: 5068 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 352x240,
5068 kb/s, 5 tbr, 5 tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Output #0, rawvideo, to 'udp://192.168.1.29:7000':
Metadata:
encoder : Lavf58.71.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449),
yuv420p(progressive), 352x240, q=2-31, 5068 kb/s, 5 fps, 5 tbn
Metadata:
encoder : Lavc58.129.100 rawvideo
^Cmmal: Aborting program.0 size= 45292kB time=00:01:13.20
bitrate=5068.8kbits/s speed=1.01x
frame= 368 fps=5.0 q=-0.0 Lsize= 45540kB time=00:01:13.60
bitrate=5068.8kbits/s speed=1.01x
Host 2:
ffplay -fflags nobuffer -f rawvideo -video_size 352x240 -i
udp://192.168.1.28:7000
. . . .
Input #0, rawvideo, from 'pipe:0':
Duration: N/A, start: 0.000000, bitrate: 5068 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 352x240,
5068 kb/s, 5 tbr, 5 tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Output #0, rawvideo, to 'udp://192.168.1.29:7000':
Metadata:
encoder : Lavf58.71.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449),
yuv420p(progressive), 352x240, q=2-31, 5068 kb/s, 5 fps, 5 tbn
Metadata:
encoder : Lavc58.129.100 rawvideo
^Cmmal: Aborting program.0 size= 9281kB time=00:00:15.00
bitrate=5068.8kbits/s speed=1.03x
frame= 78 fps=5.1 q=-0.0 Lsize= 9652kB time=00:00:15.60
bitrate=5068.8kbits/s speed=1.01x
When I start ffplay on host 2 then most of the time video is perfect.
Every now and then video looks bad. I.e.. color is bad or there is
unwanted pattern on the video.
I just restart ffplay and then video is perfect.
How come video sometimes is bad?
Thanks!
Thomas S
More information about the ffmpeg-user
mailing list