SPLITTING (skip if your movie is shorter than 1 hour and 30 minutes)
3DS uses Fat32 which has max 4GB file size. Avi needs at least 3Mb/s with the resolution that 3ds uses to look averagely good (6Mb/s with the 2 video tracks)
with that bitrate, it can fit only fit 1 hour and 30 minutes. but most movies are longer. so we need to split it. use these commands
Code:
ffmpeg -to 1:30:00 -i YOURMOVIE -vf scale=852:240:flags=neighbor -c:a copy part1.mkv
Code:
ffmpeg -ss 1:30:00 -i YOURMOVIE -vf scale=852:240:flags=neighbor -c:a copy part2.mkv
hardware accelerated version
Code:
ffmpeg -to 1:30:00 -i YOURMOVIE -vf scale=852:240:flags=neighbor -c:a copy -c:v h264_nvenc -minrate 5M -b:v 12M -maxrate 100M part1.mkv
Code:
ffmpeg -ss 1:30:00 -i YOURMOVIE -vf scale=852:240:flags=neighbor -c:a copy -c:v h264_nvenc -minrate 5M -b:v 12M -maxrate 100M part2.mkv
do the following commands to both parts of your movie
3d in video files is side by side in one video track. we first need to extract the 3D into two separate video track so we can convert it to the format that 3ds needs
select either the side by side command or top/bottom command based on your source video
side by side video:
open command prompt in the same directory as your media file, and copy the command, and change INPUT to your video files
Code:
ffmpeg -i INPUT -filter_complex "split[l][r];[l]stereo3d=sbsl:ml[left];[r]stereo3d=sbsl:mr[right]" -map [left] -map 0:a -c:a copy left.mkv -map [right] -map 0:a -c:a copy right.mkv
hardware accelerated version:
Code:
ffmpeg -i INPUT -filter_complex "split[l][r];[l]stereo3d=sbsl:ml[left];[r]stereo3d=sbsl:mr[right]" -map [left] -map 0:a -c:a copy -c:v h264_nvenc -maxrate 100m -b:v 18m -minrate 10m left.mkv -map [right] -map 0:a -c:a copy -c:v h264_nvenc -maxrate 100m -b:v 18m -minrate 10m right.mkv
top/bottom video
We need to convert the top bottom video to side by side video
Code:
ffmpeg -i INPUT -vf stereo3d=abl:sbsl -c:a copy output.mp4
hardware accelerated version:
Code:
ffmpeg -i INPUT -vf stereo3d=abl:sbsl -c:a copy -c:v h264_nvenc -b:v 20m -maxrate 100m -minrate 10m output.mp4
now you have side by side video. use the command in "side by side video" section to separate it
now we have the separate left eye video track and right eye video track
The actual conversion
in this step, we take the left eye video and right eye video and put it into 1 file with two video tracks that the 3DS consumes
Code:
ffmpeg -i left.mkv -i right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -s 426x240 -b:v 3M -ac 2 movie.avi
Copy the output file onto your SD card and play it
Cropping the leterboxing so its 16:10 and fill whole screen (OPTIONAL] (DONT DO THIS IF YOU ARE NOT WELL FAMILIAR WITH FFMPEG!)
the video will be stretched, but will fill the whole screen
first, export some frame from the left/right video. then open the frame with gimp (can be photoshop). select everything except the black borders
copy the information about the selection, and paste it into this command (replace out_x with the selection width, out_y with selection heigh, X and Y with the start position of the selection)(replace the LEFTRIGHTVIDEO with your source movie source):
Code:
ffmpeg -i LEFTRIGHTVIDEO -vf "crop=out_x:out_y:x:y:" crop.mp4
follow the code in left/right video to separate the files into left right files