linux – Sending and receiving ffmpeg video stream through USB to TTL converter
I need to transfer video signal through USB to TTL converter from one VM and receive it on other USB to TTL converter then display the received stream on second VM (the bitrate on converters are enough to stream my videos).
I can stream or play the “ffmpeg’ed” video on host VM fine, the problems start in receiving end.
I stream the video using:
ffmpeg -i file.mp4 -f matroska - > /dev/ttyUSB0
On receiving end, I tried playing:
ffmpeg -I /dev/ttyUSB0 -f mpegts – | ffplay –
or similar combinations like
cat /dev/ttyUSB0 | ffplay -
And saving to file:
ffmpeg -i /dev/ttyUSB0 -b 900k -vcodec copy -r 60 -y ReceivedVideo.mp4
All of which has returned me with errors in the neighborhood of:
/dev/ttyUSB0: Invalid data found when processing input
Or:
[h264 @ 0x0558b6e462300] decode_slice_header error
[h264 @ 0x0558b6e462300] no frame!
[NULL @ 0x0558b6e466900] UNABLE TO FIND CODEC PARAMETERS FOR STREAM 0 (Video: h264, none): unspecified size
I’m new to Linux OS and ffmpeg too, some help would be greatly appreciated.
Some technical info:
- host VM: Debian OS on WSL12
- receiving VM: Debian OS on VirtualBox
- USB to TTL: Prolific Pl2303, baudrate 4Mbits the
/dev/ttyUSB0haschmod -R 777permissions
Read more here: Source link
