How do I crop a stream for an image wall?
Posted: 08 Mar 2017 21:13
I'm streaming a 1080p webcam from a Raspberry Pi 1. The stream coming from the webcam is already h264 encoded , so the pi is basically just a means of spewing data from the webcam to the network. Since the original pi is so limited in processing power, I'd prefer that it doesn't try to do any preprocessing of the stream. (And if there's a better way of doing this, please let me know.)
The command I'm using on the pi:
The client side is VLC 2.2.4 running on Windows Server 2012r2. I have 2x2 monitor grid which (unfortunately) consists of 4:3 screens. I want to crop the incoming 16:9 stream to 4:3. The resulting video should then be split up into . I've been able to crop the video to 4:3, or display it on the image wall, but not both at the same time.
Here's what I've tried so far. The result for all commands is a 2x2 monitor grid, but uncropped.
This command results in an error, but I can't figure out what's wrong with it. VLC on Windows doesn't give meaningful error messages, so this is the result from VLC 2.2.4 on CentOS 7:
Any help would be appreciated.
The command I'm using on the pi:
Code: Select all
/usr/bin/cvlc v4l2:///dev/video0:chroma=h264 --sout '#standard{access=http,mux=ts,dst=0.0.0.0:8080/stream.mp4}'
Here's what I've tried so far. The result for all commands is a 2x2 monitor grid, but uncropped.
Code: Select all
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --video-splitter wall --wall-cols 2 --wall-rows 2 --wall-element-aspect 4:3 http://fatbot:8080/stream.mp4
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --video-splitter wall --wall-cols 2 --wall-rows 2 --crop 4:3 http://fatbot:8080/stream.mp4
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --video-splitter panoramix --panoramix-cols 2 --panoramix-rows 2 --no-panoramix-attenuate --crop 4:3 http://fatbot:8080/stream.mp4
Code: Select all
$ vlc --video-splitter wall --wall-cols 2 --wall-rows 2 --video-filter croppadd --cropadd-cropright 240 --cropadd-cropleft 240 http://fatbot:8080/stream.mp4
VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
vlc: unknown option or missing mandatory argument `--cropadd-cropright'
Try `vlc --help' for more information.