youngz
youngz

Reputation: 179

FFMPEG Split Side by Side video in two

I have .m2ts video which include a 3d video, with, as consequence, the left and right components. Is there a smart way to split the video in two stimulus (with for example ffmpeg)?

The actual solution is to convert the video in mp4 and then crop it in two. However, I suppose that it is not the smarter solution.

Thanks

Upvotes: 2

Views: 3620

Answers (1)

llogan
llogan

Reputation: 133693

Split video into 2 streams; both into 1 output file

Use the crop filter:

ffmpeg -i input.m2ts -filter_complex "[0]crop=iw/2:ih:0:0[left];[0]crop=iw/2:ih:ow:0[right]" -map "[left]" -map "[right]" -map 0:a output.mp4

Split video into 2 separate output files

Use the crop filter:

ffmpeg -i input.m2ts -filter_complex "[0]crop=iw/2:ih:0:0[left];[0]crop=iw/2:ih:ow:0[right]" -map "[left]" -map 0:a left.mp4 -map "[right]" -map 0:a right.mp4

Convert between stereoscopic formats

Such as above-below, side-by-side, alternating, interleaved, anaglyph, etc.

Use the stereo3d filter and also see FFmpeg Wiki: Stereoscopic.

Upvotes: 3

Related Questions