Latest Uploads
BlockDropper

melmantheman

Rufus Objection!

spinal

EmuMenu

spinal

Retro Trackball

spinal

screen100.png

spinal

WIP : Neon ... Adventures

Jayenkai

Back to spinal's Blog ( Created 07 December 2011 | Last Edited 20 December 2011)
Development Diary : 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

Latest Comments

Posted : 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!!!!

Posted : 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

Posted : 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...

Posted : 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.

Posted : Thursday, 08 December 2011, 13:45
spinal


native top screen resolution = 800x240 = (2x400)x240. Smaller resolution also plays fine

Posted : Thursday, 08 December 2011, 14:38
MarbleMad


i see.
the vid i exported from the 3ds is (2x480)x240

Posted : 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!
http://www.mediafire.com/?cuw0fcauoq1o5fd

Posted : 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!

Posted : Friday, 09 December 2011, 02:07
spinal


Like a tutorial, or just any old youtube clip?

Posted : 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.

Posted : 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?

Posted : 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.

Posted : 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.

Posted : 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

Posted : Saturday, 10 December 2011, 18:35
brainphreak


Comment Goes Here!this gui does the same thing here

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

Still has a problem with files over 6 minutes though.

Posted : 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.

http://mediafire.com/?v0abix9gbc7lk

Posted : 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!!

Posted : 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

Posted : 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.

Posted : 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

Posted : 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.

Posted : 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

Posted : 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.

Posted : 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...

Posted : 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)...

Latest Posts
How much should I charge for this?.
steve_ancell Wed 06:12
Wipeout Quantum
steve_ancell Wed 02:42
PMC (HTML5) games vs iOS
Afr0 Tue 15:19
Cars... grr
dna Tue 11:34
Learning App Game Kit
steve_ancell Tue 05:52
That "oh, FFS..." moment..
Jayenkai Sun 13:48
*meow*
steve_ancell Sat 12:39
AGKrs unite!
steve_ancell Sat 12:36
Resolutions 2012!
Afr0 Sat 07:08
3DS Mii's & friend codes...
kaitlynsolveson Tue 13:11
More

Latest Items
Dev-Diary : Convert any 3d video to 3DS format
spinal Sun 07:18
Link : Science-project for the holidays
steve_ancell Thu 07:45
Link : Spacial Locality of Reference
HoboBen Fri 03:13
Link : Recast, Navigation-mesh Construction Toolset for Games
Jayenkai Mon 15:30
Blog : uhhhhhhh
melmantheman Thu 14:48
Bah : Need to Make more levels!!!!!
melmantheman Mon 17:50
Blog : I love making Nintendo 3DS videos!
steveawesome Mon 08:55
Blog : Softpedia found .due. ...
shroom_monk Wed 12:27
Link : Doom 3
Afr0 Sun 20:18
Blog : more drawing
JL235 Sun 04:07
Dev-Diary : The N'th Frontier
melmantheman Fri 14:08
Blog : EmuMenu
spinal Wed 02:21
Blog : QR Code!!!
spinal Sun 16:11
Link : Analysing a BSOD windows minidump
JL235 Wed 15:01
Showcase : HexTiles
melmantheman Sun 18:05
More

Who's Online
Jayenkai
Thu, at 04:34
spinal
Thu, at 03:53
steve_ancell
Thu, at 01:32
shroom_monk
Wed, at 23:52
softpedia1
Wed, at 23:32
JL235
Wed, at 22:09
dna
Wed, at 20:42
Tikihead
Wed, at 20:30
therevillsgames
Wed, at 20:08
Afr0
Wed, at 19:37
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.