-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|704|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Blogs Home -> Blogs


 
spinal
Created : 07 December 2011
Edited : 20 December 2011
System : Mac

Convert any 3d video to 3DS format

Watch movies on your 3DS!

OK, having updated your 3DS no doubt you'll want to watch videos on it in 3D. So, here's how

The 3DS video format is a simple avi with two mjpeg video streams and a single ima adpcm audio stream, with a resolution of 480x240. You can convert to it with the following instructions...


1. Download or rip your 3D video (youtube has millions of them by now)

2. Download ffmpeg.

3. run the ffmpeg with the following options (assuming that your video is called "video.avi")

If your 3D video is top-bottom format -


If your 3D video is side-by-side format -


After a short time, you should have "left.avi" and "right.avi". It is now safe to move continue...

note - if the filesize is too large, you can adjust the quality by changing the "-qscale 1" to a different number, 1 - best, 31 = worst.

4. run ffmpeg with the following options to create the final movie file...


You can change "VID_0001.AVI" to a different filename if you like, but it must be LLL_NNNN.AVI to show up on the 3DS.

Once that's done, copy it to the folder on your SD card that all of your photos are stored in and view it in the photo viewer.

*update Some people wanted a 2D version also, so here it is, just a single step for the 2D version


I have added a nice GUI converter to the whole process, making everything just that little bit easier for everyone



download 3DSMovie

 

Comments


Wednesday, 07 December 2011, 08:58
Jayenkai
Feckin' Nintendo. Today's been a very unproductive day, as I sit around, pissing about with the camera.
DAMN YOU NINTENDO!!!!
Wednesday, 07 December 2011, 09:02
spinal
As far as I know, this is the first place with this info. Keep an eye on your hit counter Jay, it (hopefully) might get interesting
Wednesday, 07 December 2011, 14:17
elisherer
It works better for some videos without the -aspect 2:1 for the left and right videos (side-by-side).
becuase youtube shrinks the width of the side-by-side videos...
Thursday, 08 December 2011, 10:43
MarbleMad
Nice One.. little observation. should some of the 400s not be 480s?:


ffmpeg -y -i "video.avi" -s 480x480 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 16 -vf crop=480:240:0:0 -acodec libmp3lame -ar 44100 -ab 96k -ac 2 "left.avi"

ffmpeg -y -i "video.avi" -s 480x480 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 16 -vf crop=480:240:0:240 -an "right.avi"


ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 "HNI_0900.AVI"

yeh?

Still not getting t to work.. I'm getting bit rates of 128 where i should be getting 64kbps and the ds is rejecting the file.
Thursday, 08 December 2011, 13:45
spinal
native top screen resolution = 800x240 = (2x400)x240. Smaller resolution also plays fine
Thursday, 08 December 2011, 14:38
MarbleMad
i see.
the vid i exported from the 3ds is (2x480)x240
Friday, 09 December 2011, 00:19
brainphreak
Thanks for the instructions! I have tried this on my own and cannot get a 10 minute clip to work. I took a video in 3d with another camera and have that as the source. I converted a large 40minute video using both quality 1 and quality 15, to make a left and right of two different qualities. I thought maybe there was a file size limitation or otherwise 10 minutes wouldnt be the full limit. I found that my clips that were 9:59 did not work... So I tried a 9 minute clip... didnt work.. tried one at 5 minutes, and worked great! Tried 7 minutes.. no luck... 6 minutes Worked great! so I see there seems to be a limit... this is when I tried another quality to reduce the file size. Even with the file size reduced it seems limited to 6 minutes per clip. Maybe Im missing something, but here is the results:


q1

6:00 - 280MB - PASSED
6:15 - 285MB - FAILED
6:30 - 298MB - FAILED


q15

7:00 - 111MB - FAILED
6:30 - 109MB - FAILED
6:00 - 100MB - PASS


here is a video that worked at 6 minutes, this is some footage of the band "Animals As Leaders" live, I shot it with the w3 3d fuji cam then converted using the instructions above. I wanted to break it up into 10 minute segmenta so I would have the entire show, but liooks like it would need to be 6 minute segments May as well go for full quality!
https://www.mediafire.com/?cuw0fcauoq1o5fd
Friday, 09 December 2011, 01:06
Jayenkai
Someone's going to have to make a 10 minute video, to see what's going on!!
.. not me!
Friday, 09 December 2011, 02:07
spinal
Like a tutorial, or just any old youtube clip?
Friday, 09 December 2011, 02:52
Jayenkai
I meant recording a 3D video on the 3DS, to be sure that nothing changes in the codec, once it hits that 6 minute mark.
Friday, 09 December 2011, 11:13
fred
So let me get this straight. With this I can aquire any 3D video from the internet and play it on the 3DS? What about the 10 minute limitation? Or does it only apply with the recording function?
Saturday, 10 December 2011, 00:08
kode54
Why does the first step transcode the input audio to 96kbps MP3? Shouldn't that at least attempt to use -acodec copy first? Then transcode directly to IMA ADPCM in the final mix step.
Saturday, 10 December 2011, 02:52
brainphreak
I did a little testing today and recorded a video over 7 minutes. I then used VLC to see the video properties and compared them to the video I created using the steps above. I found that the only difference is the audio and the file name. I tried changing file name and no luck of course... So it must be related to the audio. I see the properties of the video is


480x240
MJPEG
20 frame rate
Audio - IMA WAV ADPCM
mono
16000HZ - sample rate
Bits Per Sample 16

I tried changing the 96k and 44100 in ffmpeg, but it gives me an error so I was unable to encode at that lesser bit rate. I think if we can figure out how to convert the video to mono and 16kHZ 16BPS then 10 minutes will be possible. Anyone wanna give it a go? I read that the error I got was due to my version of ffmpeg and dont have time to troubleshoot that now. So if you want, try it and let me know what you find. use:


ffmpeg -y -i "video.avi" -s 800x240 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:0 -acodec libmp3lame -ar 16000 -ab 16k -ac 1 "left.avi"

ffmpeg -y -i "video.avi" -s 800x240 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 1 -vf crop=400:240:400:0 -an "right.avi"


to create the left and right with 16bit audio and reduced to mono. This should match the videos taken with the 3DS. Then combine the left and right as you did before but this time in mono and be sure it does not exceed 10 minutes with:

ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ac 1 -ss 00:00:00 -t 00:09:59 -vcodec copy -map 0:0 -map 0:1 -map 1:0 "VID_0001.AVI"

This will give you a 9:59 clip in the correct format, but not sure it plays yet at 9:59... Only been able to get a 6 minute clip to work. I have only tried full stereo clips though so far. Ill try mono 16bit asap.

To continue and cut up the rest of your long clip or movie into 10 minute segments just use

ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ac 1 -ss 00:09:59 -t 00:09:59 -vcodec copy -map 0:0 -map 0:1 -map 1:0 "VID_0002.AVI"

then

ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ac 1 -ss 00:19:58 -t 00:09:59 -vcodec copy -map 0:0 -map 0:1 -map 1:0 "VID_0003.AVI"

etc.
Saturday, 10 December 2011, 03:24
brainphreak
Update: got that command line to work, but no luck. Still doesnt recognize it, and the bitrate is 128k just as MarbleMad mentioned, but I dont think this is the problem since the clip that is 6 minutes that works fine is 128kbit so it may effect long playing videos, btu you can still play 6:00 and under videos at 128kbps

im still not sure how to make it into 16bps and 16khz, my command line only changed the hz
Saturday, 10 December 2011, 18:35
brainphreak
Comment Goes Here!this gui does the same thing here

https://dl.qj.net/nintendo-3ds/applications-on-pc/3ds-video-v01-022-beta.html

Still has a problem with files over 6 minutes though.
Saturday, 10 December 2011, 21:14
brainphreak
Ok I am a bit confused as to the cause, but apparently my source video was vausing the 6 minute limit... I tried now with a couple other videos as source and no problem with 9:59... I tried the old source, and although conversions works fine, and I can watch the results on pc... the ds will not see them.

So you may run into problematic files/sources... but it DOES work at 9:59 even at quality of 1...

So here are some videos I converted. Video of a stop motion frank zappa drawing I made, and the others are from a concert by 'the Residents' filmed in 3d.

https://mediafire.com/?v0abix9gbc7lk
Saturday, 10 December 2011, 23:04
Jayenkai
Just a small intersection before things go awry.
Socoder won't be the "Let's all post our converted copyright stolen 3D videos" showcase.
Public Domain and Own shot is one thing, but if you're converting "proper" stuff, I get out the ban hammer!!
Sunday, 11 December 2011, 18:20
steveawesome
I've been shooting SBS (side by side) stereo video for my site for the last year and I'm indebted to you guys for breaking out with the first real thread on this topic. I'm busy doing this via batch file using the command lines in the comment thread (the GUI was producing weird results and, without knowing what the command line it was using to kick off, I wasn't able to troubleshoot properly).

FYI, most of my work isn't exactly G-Rated, but I will only be sharing samples of work that are 100% family friendly (provided your family is cool with HBO).

Steve
Sunday, 25 December 2011, 16:22
GulesArgentAzure
Tested this out, works beautifully for the basics, but I seem to be having some really severe audio desynchronization issues with longer videos (Video outpacing the audio by a good bit). Perhaps it's fixable in the configuration or something? I used the default settings for pretty much everything.
Monday, 26 December 2011, 00:55
spinal
It might be something to do with the audio being transcoded twice. I'll have to find a way around that
Wednesday, 28 December 2011, 03:12
takopus
I've spent half of the last night trying to figure how to merge several 3DS-made AVIs into one (i had a lot of short ones and wanted to have them just together). This post was very helpful, thank you!
Just in case someone interested, i've figured a way to do it, and without transcoding.

1. AVIs must be demuxed into right and left video streams and audio stream. Do it with ffmpeg.

2. Both left and right video streams can be merged into one (two) by mencoder, and audio strem with SoX. You can't just leave audio stream in one of video AVIs: mencoder merging it without problems, but 3DS can't play it after all.

3. Finally, whole left and right video streams and audio stream muxing back together, once again with ffmpeg.

If someone interested, i can post params on running each of these steps. Also i made a nice little batch for all of it, you can get it here with all tools included. Just place any 3DS-made AVI files into video_parts folder, run the batch and you will get a RES_0000.AVI file in the same folder where batch is.
Hope somebody will find it helpful too.
Saturday, 31 December 2011, 11:49
thewaltonboy
Ok hello everyone

Is anyone else trying to do this on a Mac? Im getting left and right avi fine but when I try and do the final stage:

ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 "VID_0001.AVI"

Im getting the error message:

Input #0, avi, from 'left.avi':
Metadata:
encoder : Lavf52.93.0
Duration: 00:00:26.33, start: 0.000000, bitrate: 1477 kb/s
Stream #0.0: Video: mjpeg, yuvj420p, 400x240, PAR 3:5 DAR 1:1, 20 tbr, 20 tbn, 20 tbc
Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 96 kb/s
Input #1, avi, from 'right.avi':
Metadata:
encoder : Lavf52.93.0
Duration: 00:00:26.05, start: 0.000000, bitrate: 1383 kb/s
Stream #1.0: Video: mjpeg, yuvj420p, 400x240, PAR 3:5 DAR 1:1, 20 tbr, 20 tbn, 20 tbc
Number of stream maps must match number of output streams


i thought I had a video and an audio stream (left.avi) and another video (right.avi) so dont see why the stream maps dont match?! Grrrr

And its driving me crazy. Im a total noob to ffmpeg, so if anyone helps me Ill be their best friend forever. Christmas has gone but I'll remember for next year...

x
Saturday, 31 December 2011, 13:02
spinal
try replacing -an (for the right.avi) with -acodec libmp3lame -ar 44100 -ab 96k -ac 2
it might not be reading the audio properly from the left.avi.
Saturday, 31 December 2011, 13:22
thewaltonboy
Thanks for the try Mr.Spinal but still no love, still getting the whole

Number of stream maps must match number of output streams rubbish...
Sunday, 01 January 2012, 07:18
spinal
If you can find any software that can convert to Fujifilm 3D avi format with the same (or lower) resolution as the 3DS, it should work (I haven't yet found anything satisfactory for windows)...
Monday, 16 January 2012, 09:13
yousie642
I'm trying to use the GUI, but when I click Convert, the process takes about 2 seconds and all it produces is a 14kb file. I've gotten the same result with 3 different 3D videos. Help, please.
Saturday, 25 February 2012, 01:46
dudus
Why not put it in one line:

Oh, I also zoomed in a little so that the depth in the 3D effect is greater on the tiny screen.
Monday, 27 February 2012, 08:55
spinal
Doesn't work, both streams are the same side of the video.
Tuesday, 28 February 2012, 04:56
dudus
I'm really sorry and also feeling pretty stupid.
Will continue to search a solution for the one-line-conversion
Tuesday, 28 February 2012, 11:44
spinal
Don't worry about it, it took me a couple of days to give up one a one line version.

the problem is, if you use two different videos, it crops correctly, but if you use the same video twice, it looks like the second setting overrules the first.
Thursday, 08 March 2012, 07:44
guest
So, my first video (done with the most recent GUI, because I have absolutely zero ffmpeg experience) worked fine. The second one, not so much. Just as yousie, the output was a 14k file. After trying it with every option possible, all to the same result, I basically gave up, but made several observations:
- The program starts demuxing left and right, but it gets to 10k for the left file, freezes up for a bit, and then goes onto the right file
- The right file doesn't even get a single kilobyte of data, then the converter dumps your converted file, gives you a signal "I'm done!" and you're left wondering what happened.

Most interestingly, I downloaded the beta-beta, and it appears to be working fine, for the same video. While I think it's a video-specific issue, I don't know why it's decided to work in this case...

But yeah...just use the older one and it appears to work. Perhaps someone with much more know-how can do a more thorough analysis of why this is happening.
Friday, 09 March 2012, 03:20
spinal
Perhaps ffmpeg doesn't like doing the croping and resizing with the specific format of the video. Perhaps converting it to a different format first might help?
Friday, 09 March 2012, 17:40
guest
Oooh...another problem. So, having converted two more videos, trying to play them on the 3DS, it returned an error saying the video format wasn't recognized. Going back onto my computer and analyzing the videos, first thing I noticed is that the working video shows a resolution, length, etc in its properties, while the two new files don't show anything in their details. What could be causing this? I will look into it more.
Saturday, 10 March 2012, 13:21
spinal
Have you tried using the command line version as a explained before the GUI?
It really is as simple as making a .bat file (plain text with .bat instead of .txt) and changing the name of video.avi to the name of the video you're converting.
Wednesday, 21 March 2012, 19:46
damorsoft
This is what worked for all..

You need H264StereoSource.dll or Pantarheon3D.avsi on the folder..


Run...ffmpeg -i test1.avi
ffmpeg version N-38622-g1eabd71 Copyright © 2000-2012 the FFmpeg developers
built on Mar 7 2012 00:18:03 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-lib
libavutil 51. 42.100 / 51. 42.100
libavcodec 54. 10.100 / 54. 10.100
libavformat 54. 2.100 / 54. 2.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 63.100 / 2. 63.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from 'test1.avi':
Duration: 00:01:28.99, start: 0.000000, bitrate: 50207 kb/s
===>Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tbc
Metadata:
title : FUJIFILM AVI STREAM 0200
===>Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s
===>Stream #0:2: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tbc
Metadata:
title : FUJIFILM AVI STREAM 0200

NOTE....input streams and extract the left.avi and right.avi

LEFT
c:\ffmpeg -y -i "test1.avi" -map 0:0 -vcodec mjpeg -q:v 1 -map 0:1 -acodec copy "left.avi"
RIGHT
c:\ffmpeg -y -i "test1.avi" -map 0:2 -vcodec mjpeg -q:v 1 "right.avi"

next join files into halfSBS

SBS.avs file

lv = DirectShowSource("left.avi")
rv = DirectShowSource("right.avi")
#Using ....Pantarheon3D.avsi version
#stacked = LeftRight3DReduced(lv, rv)
#Using ....the H264StereoSource.dll Version
stacked = StackHorizontal(HorizontalReduceBy2(lv), HorizontalReduceBy2(rv))
ConvertToYV12(stacked)


SBS.cmd file

c:\x264 --level 4.1 --bitrate 18300 --vbv-bufsize 30000 --vbv-maxrate 40000 --fps 24.000 --force-cfr --preset fast --frame-packing 3 -o 3dpat.mkv SBS.avs
Comment Goes Here!
Wednesday, 04 April 2012, 18:01
Miguel
When i try the 2d code, with a 5 minutes 7 second video, I get a 28 minutes 29 seconds video, What did I do wrong?

Here is the ffmpeg output:


[snip]

Where is my problem?
Thursday, 05 April 2012, 09:48
guest
Hey! Finally figured out ffmpeg, compiled a few codey bits and got the conversion working! Thanks for the advice!
Thursday, 07 June 2012, 14:20
foxhunt72
Cool it works, only thing is the movie is on the 3ds in a random sequence, so have anyone a good idee to get it sorted on file name (sequence number)
Sunday, 10 June 2012, 06:20
spinal
You could try copying the files one at a time, other than that I can't help I'm afraid. There hasn't been enough interest for anyone to figure out nintentos timestamp to make use of that.
Friday, 28 December 2012, 00:09
futaris
To fix "Number of stream maps must match number of output streams" :

ffmpeg -y -i "left.avi" -i "right.avi" -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy "VID_0001.AVI" -newvideo -map 0:0 -map 0:1 -map 1:0 -ss 00:00:00 -t 00:09:59.90

Can you stream with the 3DS? - videomerge3d is a gstreamer script for this:

https://sourceforge.net/projects/videomerge3d/files/
Friday, 11 January 2013, 23:00
saifssj6
i used the gui to convert a trailer for the 3ds..i have a 3dsxl btw..i ran it...the quality is fine and everything but the trailer stutters in places.....i tried to decrease the quality change framerates and everything..but the movie stutters...always..can anybody help me?
Saturday, 04 January 2014, 14:55
sonicrings4
I have a problem. I used this converter to convert an avi file of a 3D video where you can see both left and right frames on the 3DS. After the conversion was finished, I opened it on my computer and saw 2 separate windows open, one for each eye, instead of one window with 2 screens. However, I have tried naming it HNI_0003.AVI NIN_0004.AVI and 3DS_0005.AVI
I formatted an 8 GB SD card lying around and put those files along with the 3D one where it shows 2 frames in 1 window and a 2D version (they are all 10 minutes) but I can only see the 2D and 3D (2 frames 1 window) files in my 3DS camera. Can someone please help? I've been pulling my hair out for days trying to play a movie in 3D. Please email me at *removed email address* with any advise. Thanks!

EDIT: This software does not work. A very similar software, called 3DS Video, however, does work, so give 3DS Video v 1.32 a try!