I am looking for a way to convert a 3d movie to a 2d movie.
I found a reference on this forum. http://www.ffmpeg-archive.org/How-to-re-encode-3d-video-to-2d-video-td4676271.html
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It only takes a minute to sign up.
Sign up to join this communityI am looking for a way to convert a 3d movie to a 2d movie.
I found a reference on this forum. http://www.ffmpeg-archive.org/How-to-re-encode-3d-video-to-2d-video-td4676271.html
While you might be able to achieve this by manually using ffmpeg's crop filter, the stereo3d filter is designed specifically for this purpose. You didn't specify the exact 3d format you have. There are several possibilities as documented at the the stereo3d link above. Assuming that input.mkv
is the relatively common sbsl (side-by-side left eye on left),
ffmpeg -i input.mkv -vf stereo3d=sbsl:ml -metadata:s:v:0 stereo_mode="mono" output.mkv
will result in a 2d (left eye only) output.mkv
. I believe the reason -metadata:s:v:0 stereo_mode="mono"
is required to remove the stereo tag is because the metadata isn't piped through the filter system, and ffmpeg otherwise tries to duplicate the metadata of the original. If you don't do this, some players may think your 2d result is still 3d and do weird things.
If you find that the result has the wrong aspect ratio, you can experiment with using stereo3d=sbsl2:ml
instead which treats the input as half width side-by-side. If all else fails, you can set the correct aspect with -aspect 16:9
(or whatever you know the correct aspect ratio to be).
stereo3d=<input-format>:<output-format>
. As per the linked documentation, ml
means to output "mono output (left eye only)".
-metadata:s:v:0 stereo_mode="mono"
with ffmpeg 2.8.14. It appears that the documentation may have changed since you wrote this answer. Simply removing the aforementioned switches allowed ffmpeg to continue without error. Note that you can avoid re-encoding the audio stream by utilizing the -c:a copy
switch.
Jul 25, 2018 at 18:08
I found a reference on this forum. http://www.ffmpeg-archive.org/How-to-re-encode-3d-video-to-2d-video-td4676271.html
ffmpeg -i './a3dmovie.mp4' -vf "crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2" -y ./a2dmovie.mp4
The important part is the -vf "crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2"
It essentially halves the output and rescales as appropriate for the 3d video.
I found this is also useful to test and check the output
ffplay -i ./some3dmovie.mp4 -vf "crop=w=iw/2:h=ih:x=0:y=0,scale=w=2*iw:h=ih,setdar=2"
You can move the index to the front of the file as follows
-movflags faststart
As an adaption of kevmitch's answer, I went with
ffmpeg -i "foo.mkv" -vf stereo3d=sbs2l:ml -c:a copy "bar.mp4"
Notable difference: It's using sbs2l
(instead of sbsl2) and just copies audio streams (works for me). Further reading to stereo3d