Homebrew Homebrew app [Release] Video player for 3DS

  • Thread starter Thread starter Core_2_Extreme
  • Start date Start date
  • Views Views 195,463
  • Replies Replies 504
  • Likes Likes 66
Does this mean that 800x240 videos play in 800px mode even if the 3D slider is off? (sorry if this is a dumb question)
you must have the 3d slider off when playing horihd videos (though it can be turned on if you have the display mode set to 800px manually instead of using auto)
No matter 3d slider is ON or OFF, you can still play 800px videos, but you just see lower quality images as screen resolution will be 400x240.
To get better image quality,
  • Turn 3d slider OFF when you watch non-3D videos (resolution doesn't matter).
  • Turn 3d slider ON when you watch 3D videos.

I think the player can't play 3D videos encoded side by side, I must be dual channel (1 video track left eye, 2 video track right eye)
Yes, currently, side by side 3D videos are not supported.
 
Is it possible for FLAC support to be added? I noticed some other HB apps like https://github.com/deltabeard/ctrmus have implemented it, so I'm wondering if it's possible here. Thanks for all your work on this!

---

Also I figured I'd share some of my encoding settings for New 2/3DS if anyone wishes to try them. Ideally 800x225 would be all that I need but since yuv420 makes some colors lower rez I end up supersampling to mitigate it. I did try yuv444p via software decode but even at 800x225 ultrafast it barely kept up at 1mbps.
  • HD-like (24Hz and lower ideally)
    • x264 Ultra Fast, yuv420p, 12-16mbps, 1600x450 lanczos
  • Middleground (30Hz)
    • x264 Ultra Fast, yuv420p, 8-12mbps, 1280x360 lanczos
  • Performance (60Hz)
    • x264 Ultra Fast, yuv420p, 8mbps, 1024x288 lanczos
 
Last edited by DragonW,
  • Like
Reactions: Core_2_Extreme
Your settings are frankly nonsensical. The 3DS has an 800x240 screen, so you should never encode at a resolution higher than that. All video sources already use 4:2:0 chroma subsampling, so converting to 4:4:4 is also nonsense.
 
  • Like
Reactions: Core_2_Extreme
Your settings are frankly nonsensical. The 3DS has an 800x240 screen, so you should never encode at a resolution higher than that. All video sources already use 4:2:0 chroma subsampling, so converting to 4:4:4 is also nonsense.

I am not an expert on video encoding by any means, yet to my understanding a 1920x1080 video with 4:2:0 chroma contains 960x540 color data. When you re-encode such a video to yuv420p 800x226, that color data is compressed to just 400x113 despite there being enough color data in the original file to saturate 800x226 w/ full color 4:4:4 - leading to what is to my eye highly compressed jpg looking videos even when allocating like 12mbps (which should be complete overkill for 800x226).

To confirm this, I did some testing of my own with the software decoder. I personally can notice a difference between 4:2:0 and 4:4:4 at 800x226 - in fact it was nearly indistinguishable from 1600x450 4:2:0 for me in full screen mode. I do agree with you that anything over 800x225 for 16:9 should hold indistinguishable benefit if downscaled with a high quality downsampler like Lanczos, but the 4:2:0 setting just crushes the color more than 800x225 can actually provide (when your source video has enough color data to do so). To that end, a way of mitigating this color issue that has worked for me is encoding at a higher resolution. It's not ideal since you do give up some performance and stability (especially at 450p), but it generally works pretty well for me and looks noticeably better than 800x226 4:2:0.
 
Last edited by DragonW,
  • Like
Reactions: Core_2_Extreme
I am not an expert on video encoding by any means, yet to my understanding a 1920x1080 video with 4:2:0 chroma contains 960x540 color data. When you re-encode such a video to yuv420p 800x226, that color data is compressed to just 400x113 despite there being enough color data in the original file to saturate 800x226 w/ full color 4:4:4 - leading to what is to my eye highly compressed jpg looking videos even when allocating like 12mbps (which should be complete overkill for 800x226).
This is true; however, I don't think it's the cause of your problems. It's very hard to see any difference with chroma subsampling, unless you're using synthetic images, e.g. with perfectly straight parallel lines one pixel apart. Chroma subsampling is extremely useful for live-action images, which is why it's always used by default. Your problems are more likely caused by a) using the ultrafast preset, which disables nearly every encoding option and will likely cause unnecesary artifacts, and b) using a constant bitrate. You should use CRF mode and let the encoder decide what bitrate is appropriate. Try the veryfast preset at RF 18 and see if you get better results, then compare 4:2:0 with 4:4:4. I highly doubt you'll be able to see any difference.
 
  • Like
Reactions: Core_2_Extreme
This is true; however, I don't think it's the cause of your problems. It's very hard to see any difference with chroma subsampling, unless you're using synthetic images, e.g. with perfectly straight parallel lines one pixel apart. Chroma subsampling is extremely useful for live-action images, which is why it's always used by default. Your problems are more likely caused by a) using the ultrafast preset, which disables nearly every encoding option and will likely cause unnecesary artifacts, and b) using a constant bitrate. You should use CRF mode and let the encoder decide what bitrate is appropriate. Try the veryfast preset at RF 18 and see if you get better results, then compare 4:2:0 with 4:4:4. I highly doubt you'll be able to see any difference.
Tried this out and this change helps a lot. Videos no longer look as bad as they did in my previous encodings @226p, tyyyyy.

I did try out 4:4:4 226p / 4:2:0 450p after for comparison's sake, and I do still notice some colors are a bit lower rez but it's not nearly as bad as it was and really isn't a huge huge deal considering performance is so much faster / stable @226p.

1024x288 mitigates this a bit and performance is the same for me @60Hz so I might use that just for that little bit extra color data. Either way, thanks a bunch for the suggestion :).
 
  • Like
Reactions: Core_2_Extreme
i was wondering how i can get videos to play smoothly on the video player i downloaded them in 360p but it's lagging pretty bad is there any solid and simple method to get smooth video playback
i am on the original 3ds
thanks
 
  • Like
Reactions: Core_2_Extreme
i was wondering how i can get videos to play smoothly on the video player i downloaded them in 360p but it's lagging pretty bad is there any solid and simple method to get smooth video playback
i am on the original 3ds
thanks
For Old 3DS I used MPEG2 as the Video codec and MP2 for the Audio
Also try not to go above the 400x240 resolution and things should hopefully play fine.
 
what could i change to make the video play better? it pauses a lot to process the video on OG 3DS with the video I'm converting?
NEW GUI CONVERTOR

3D conversion guide V2
i fully automated the command so you only need to change the INPUT and it will do everything else for you

if you have nvidia maxwell gpus or newer (+- GTX 960 and newer) you can use hardware acceleration version of commands to speed up the converting a lot.
replace the INPUT at the beggining with your movie file name. dont change ANYTHING else.
it will spit you out movie1.avi and movie2.avi
For videos and films longer than 1 hour and 30 minutes, use these commands:
Code:
ffmpeg -i INPUT -vf scale=800:240:flags=neighbor scaled.mkv && ffmpeg -i scaled.mkv -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 && mkdir 1 && mkdir 2 && ffmpeg -to 1:30:00 -i right.mkv -c:v copy -c:a copy .\1\right.mkv && ffmpeg -to 1:30:00 -i left.mkv -c:v copy -c:a copy .\1\left.mkv && ffmpeg -ss 1:30:00 -to 3:00:00 -i right.mkv -c:v copy -c:a copy .\2\right.mkv && ffmpeg -ss 1:30:00 -to 3:00:00 -i left.mkv -c:v copy -c:a copy .\2\left.mkv && ffmpeg -i .\1\left.mkv -i .\1\right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie1.avi && ffmpeg -i .\2\left.mkv -i .\2\right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie2.avi

Hardware accelerated version:
Code:
ffmpeg -i INPUT -vf scale=800:240:flags=neighbor  -c:v h264_nvenc -maxrate 100M -b:v 12M -minrate 6M scaled.mkv && ffmpeg -i scaled.mkv -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 12M -minrate 6M left.mkv -map [right] -map 0:a -c:a copy r-c:v h264_nvenc -maxrate 100M -b:v 12M -minrate 6M ight.mkv && mkdir 1 && mkdir 2 && ffmpeg -to 1:30:00 -i right.mkv -c:v copy -c:a copy .\1\right.mkv && ffmpeg -to 1:30:00 -i left.mkv -c:v copy -c:a copy .\1\left.mkv && ffmpeg -ss 1:30:00 -i right.mkv -c:v copy -c:a copy .\2\right.mkv && ffmpeg -ss 1:30:00 -i left.mkv -c:v copy -c:a copy .\2\left.mkv && ffmpeg -i .\1\left.mkv -i .\1\right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie1.avi && ffmpeg -i .\2\left.mkv -i .\2\right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie2.avi

if you have video shorter than 1 hour and 30 minutes use these commands

Code:
ffmpeg -i INPUT -vf scale=800:240:flags=neighbor scaled.mkv && ffmpeg -i scaled.mkv -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 && ffmpeg -i left.mkv -i right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie.avi
hardware accelerated version:
Code:
ffmpeg -i INPUT -vf scale=800:240:flags=neighbor -c:v h264_nvenc -maxrate 100M -b:v 12M -minrate 6M scaled.mkv && ffmpeg -i scaled.mkv -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 12M -minrate 6M left.mkv -map [right] -map 0:a -c:a copy  -c:v h264_nvenc -maxrate 100M -b:v 12M -minrate 6M right.mkv && ffmpeg -i left.mkv -i right.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -b:v 3M -ac 2 movie.avi

And if you wonder why it needs to be split in two, why not just lower the bitrate...
If you put the 3hour movie into the 4GB, it would look like this...
6IyItSy.png

Ykmozmr.png

Nice JPEG ヾ(•ω•`)o
that why it needs to be split into two

if you have MacOS or Linux, you need to convert it manually
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
MQTmxOW.png

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
FULO8ns.png

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
[/SPOILER]
what could i change in ffmpeg commands to make it play smoother on OG 3DS models that have less processing power?
 
  • Like
Reactions: Core_2_Extreme
Hi,
By experimenting, I found one can do most of the hard work in Handbrake and just recombine the pieces with ffmpeg. That saves some lossy video reconversions and if the audio is AAC it can be passed thru unchanged.
 
  • Like
Reactions: Core_2_Extreme
change the codec after -c:v to mpeg2
alternatively use the GUI thats linked in the post you quoted and select MPEG2
View attachment 427931
Hello, I really appreciate the converter that you made, it did a great job, the only problem I'm having now is that the 3d videos I have been working on are a lil squished on the left and right side and the sound is out of sync, also certain videos pause and stop and it says "processing", otherwise the 3d looks fantastic, any tips you can give me would be appreciated. I'm hoping to get the videos to play as well as the .cia .moflex 3d videos on the clownsec site, those are truly amazing conversions.....
 
Last edited by C0n5tant1n3,
  • Like
Reactions: Core_2_Extreme
Thank you for your patience, the v1.6.0 is finally here!!!!!

Changes
VP9 and flac have been supported (#64).
DVDSub (VobSub) has been supported (#58).
AV desync management has been re-implemented.
New sound banner has been added for `.cia` (#82) (by UrbanVersis32).
Theora has been supported (#83) (by RetroGamer02).
German translation has been added (#85) (by 0n1cOn3).
High RAM build (only for `.cia`) has been added for release (see release page for detail).

Fixed bugs
Many minor bugs that may cause crash have been fixed.
Random crash on hardware decorder has been fixed (#69).
Auto-playing video after coming back from Nintendo's home menu and keyboard even it was previously paused has been fixed.
AV desync on more than 2ch audio has been fixed.

About high RAM cia
`..._high_ram.cia` can use more RAM than normal `.cia` and `.3dsx`, this can reduce chance of getting `out of (linear) memory` errors.
When you open/close it your 3DS will reboot so it may take a while to open/close the app, and you can't use the Internet browser while you are using it.


https://github.com/Core-2-Extreme/Video_player_for_3DS/releases/tag/v1.6.0
 
Last edited by Core_2_Extreme,

Site & Scene News

Popular threads in this forum