[FFmpeg-user] Sometimes, ffplay fails showing raw video received over LAN

Thomas Seilund tps.ffmpeg at netmaster.dk
Wed May 12 08:49:16 EEST 2021


On 5/11/21 3:47 PM, Thomas Seilund via ffmpeg-user wrote:
>
> On 5/11/21 3:02 PM, Moritz Barsnick wrote:
>> Hi Thomas,
>>
>> On Tue, May 11, 2021 at 14:40:40 +0200, FFmpeg user discussions wrote:
>>> 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
>> [...]
>>> Every now and then video looks bad. I.e.. color is bad or there is 
>>> unwanted
>>> pattern on the video.
>> Have you tried wrapping the video in nut or matroska containers?
>>
>> Moritz
> Thanks Moritz
>
>
> I can wrap video in nut or matroska on the sending side, ie.
>
>
> raspividyuv -t 0 -n -v -hf --exposure sports -fps 5 -w 352 -h 240 -p 
> 800,50,352,240 -o - | ffmpeg -f rawvideo -video_size 352x240 -r 5 -i 
> pipe:0 -c:v rawvideo -f nut 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, nut, 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, 81920 tbn
>     Metadata:
>       encoder         : Lavc58.129.100 rawvideo
> ^Cmmal: Aborting program.0 size=    4951kB time=00:00:07.80 
> bitrate=5200.2kbits/s speed=1.03x
>
> frame=   43 fps=5.1 q=-0.0 Lsize=    5323kB time=00:00:08.40 
> bitrate=5191.1kbits/s speed=   1x
>
>
> On the receiving side I dont know what to do!
>
>
> I tried:
>
> ffplay -fflags nobuffer -f nut -video_size 352x240 -i 
> udp://192.168.1.29:7000
> ffplay version N-97024-gc8140fe732 Copyright (c) 2003-2020 the FFmpeg 
> developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-libfreetype --enable-libx264 --enable-gpl 
> --enable-libvorbis --enable-libvpx --enable-libmp3lame --enable-libzmq 
> --enable-libpulse --enable-openssl --enable-nonfree
>   libavutil      56. 42.101 / 56. 42.101
>   libavcodec     58. 76.100 / 58. 76.100
>   libavformat    58. 42.100 / 58. 42.100
>   libavdevice    58.  9.103 / 58.  9.103
>   libavfilter     7. 77.100 /  7. 77.100
>   libswscale      5.  6.101 /  5.  6.101
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> ^Ctps at t420:~$ ^C000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
>
> ffplay does not start!
>
>
> Then I tried to tell ffplay that rawvideo is expected but this fails:
>
> ffplay -fflags nobuffer -f nut -video_size 352x240 -codec:v:0 rawvideo 
> -i udp://192.168.1.29:7000
> ffplay version N-97024-gc8140fe732 Copyright (c) 2003-2020 the FFmpeg 
> developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-libfreetype --enable-libx264 --enable-gpl 
> --enable-libvorbis --enable-libvpx --enable-libmp3lame --enable-libzmq 
> --enable-libpulse --enable-openssl --enable-nonfree
>   libavutil      56. 42.101 / 56. 42.101
>   libavcodec     58. 76.100 / 58. 76.100
>   libavformat    58. 42.100 / 58. 42.100
>   libavdevice    58.  9.103 / 58.  9.103
>   libavfilter     7. 77.100 /  7. 77.100
>   libswscale      5.  6.101 /  5.  6.101
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
>
> Still, ffplay does not start
>
>
> Thomas S
>
If I use TCP and not UDP then video comes up fine on receiving side.

Thanks

>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list