2

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

youngz
  • 179
  • 2
  • 16
  • Does this answer your question? [Commands to cut videos in half horizontally or vertically, and rejoin them later](https://stackoverflow.com/questions/52582215/commands-to-cut-videos-in-half-horizontally-or-vertically-and-rejoin-them-later) – 404pio Feb 10 '21 at 09:22
  • It is the same solution that I have adopted. However the m2ts videos should contains 2 separate videos of (in my case) full hd resolution – youngz Feb 10 '21 at 09:48
  • AFAIK ffmpeg support decoding and encoding M2TS format – 404pio Feb 10 '21 at 10:40

1 Answers1

3

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.

llogan
  • 121,796
  • 28
  • 232
  • 243
  • Split video into 2 separate output files is surprisingly slow, around 1/3 of realtime. Is that expected? Does it transcode the data? Is that necessary? – d-b May 10 '23 at 21:58