FORUMS: list search recent posts

Transcoding live stream

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Yair Ben
Transcoding live stream
on Sep 27, 2011 at 11:17:33 pm

Hello,

We have a 360 panoramic camera video stream input, and we need to crop the stream and output the cropped live-stream.
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).

How can this be achieved ?


Yair.


Return to posts index

Michael Rampe
Re: Transcoding live stream
on Sep 29, 2011 at 1:55:54 am

[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


Return to posts index

Yair Ben
Re: Transcoding live stream
on Sep 29, 2011 at 11:23:39 pm

(admin: please ignore the previous post)

Thanks Michael,

But my input is a stream, not a video file.
I don't mind a small delay in the output stream, but its a constant streaming input/output.


Return to posts index


Michael Rampe
Re: Transcoding live stream
on Sep 30, 2011 at 2:12:29 am

[Yair Ben] "(admin: please ignore the previous post)"

Not sure what this means... You want me to ignore my own post? ;-)

[Yair Ben] "But my input is a stream, not a video file."

This is well documented.

Try to remove the startpts filters or investigate the split filter if the filter chain I suggested does not work for a live stream.

Michael


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]