FFmpeg convert 3D Video for Nintendo 3DS

There’s already manuals, but either they aren’t splitting, or splitting and «forgetting» about 2nd Video, or they producing files which Nintendo 3DS not seeing.

I’m proposing here short info about how to make 3D Video for Nintendo 3DS :)

1. First of all, you get somewhere 3d-video file, open it, and look, if it top/bottom or left/right. Anaglyph variants are not supposed to be splitted, so dump them.

2. Supposing you got «super-video-3d.mkv», and it’s top-bottom variant. First step — convert it to required size:

ffmpeg -y -i «super-video-3d.mkv» -s 400×480 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:0 -acodec pcm_s16le -ac 2 «new_l.avi»
ffmpeg -y -i «super-video-3d.mkv» -s 400×480 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:240 -an «new_r.avi»

If you have side-by-side video, then you need to run these commands:

ffmpeg -y -i «super-video-3d.mkv» -s 800×240 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:0 -acodec pcm_s16le -ac 2 «new_l.avi»
ffmpeg -y -i «super-video-3d.mkv» -s 800×240 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:400:0 -an «new_r.avi»

If you need mirror left-right videos, simply exchange «new_l.avi» and «new_r.avi».

Explaining parameters. -i specified input file; -s specified rescale size;  -r 20 meant that video must be 20 FPS (3DS doesn’t support more than that)

-vcodec mjpeg -qscale 1 specifies that video stream will be recoded with best quality. You can change quality here (1=best, 31=worst).

-vf  crop specified part of screen that need to be cuted (to get needed frame). Audio converted to PCM format (which is pretty big), but it’s better to have it, than to have some weird problems with audio (For example, if you recode video, and copy aac audio, you pretty sure will have broken file). And also make 2 channels with -ac 2 (If there 5.1 or more)

3. After we got two files  «new_l.avi» and «new_r.avi», we need to find out how many parts we need: simply divide length of movie by 10 minutes. For example, you need 10 parts.

4. Splitting + converting is as simple as cuting, here’s command example:

ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 00:00:00 -t 00:09:59.90 «HTD_0001.AVI»
ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 00:10:00 -t 00:09:59.90 «HTD_0002.AVI»

ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 01:30:00 -t 00:09:59.90 «HTD_0010.AVI»

5. In this example, I’ve got encoded How To Train Your Dragon 3D for mine Nintendo 3DS. Totally cool picture, maybe not so cool in dark places (strong banding), but looks great with scenes with tiny details, and/or with fresh colors.

Cheers!

P.S. I updated this post, to cover side-to-side video as well.