[Yair Ben] “For example, consider having a 1000px wide stream, and you want to output only from pixels 1 to 200, then 400 to 600, and 800 to 1000 as a solid single stream (600px wide).”
OK. The best thing for this is to use the avfiltering pipeline. I did some work and got this to give your result (one way out of several):
$ ffmpeg -i 1000wide.mpg -sameq -vf
“movie=1000wide.mpg,setpts=PTS-STARTPTS,crop=200:in_h:400:0[T1];
movie=1000wide.mpg,setpts=PTS-STARTPTS,crop=200:in_h:800:0[T2];
[in]setpts=PTS-STARTPTS,crop=200:in_h:0:0,pad=600:in_h:0:0,
[T1]overlay=200:0,[T2]overlay=400:0[out]”
output.mpg
Basically,
1. create an duplicate input and crop to the centre 200 pixels
2. create a second duplicate input and crop to the right 200 pixels
3. Take the input, crop to the left 200 pixels, pad 400 pixels of black to the right, overlay the two duplicates.
[Yair Ben] “We have a 360 panoramic camera video stream input, and we need to crop the stream and output the cropped live-stream.”
Not sure how this will perform for a live stream…..;-) (probably have issues with the PTS settings above and might be slower than realtime which will also cause headaches)
Let me know.
Michael