Homebrew Homebrew app [Release] Video player for 3DS

Core_2_Extreme

Well-Known Member
OP
Member
Joined
Feb 11, 2019
Messages
153
Trophies
0
Age
22
XP
1,163
Country
Japan
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.
 

DragonW

Member
Newcomer
Joined
Sep 1, 2020
Messages
18
Trophies
0
Age
23
XP
289
Country
United States
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

AleronIves

Well-Known Member
Member
Joined
Nov 17, 2016
Messages
460
Trophies
0
Age
36
Location
California
XP
2,246
Country
United States
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

DragonW

Member
Newcomer
Joined
Sep 1, 2020
Messages
18
Trophies
0
Age
23
XP
289
Country
United States
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

AleronIves

Well-Known Member
Member
Joined
Nov 17, 2016
Messages
460
Trophies
0
Age
36
Location
California
XP
2,246
Country
United States
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

DragonW

Member
Newcomer
Joined
Sep 1, 2020
Messages
18
Trophies
0
Age
23
XP
289
Country
United States
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

phantom29

New Member
Newbie
Joined
Oct 9, 2023
Messages
1
Trophies
0
Age
23
XP
13
Country
Canada
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
 

RetroGamer02

Well-Known Member
Member
Joined
Sep 15, 2021
Messages
111
Trophies
0
XP
746
Country
Canada
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.
 

Spinosaur1912

New Member
Newbie
Joined
Dec 23, 2023
Messages
1
Trophies
0
Age
22
XP
13
Country
United States
Would it be possible to add compatibility for .flac files? If so, it would make the video player double as a great homebrew music player. The other flac compatible music players are pretty underdeveloped atm.
 
  • Like
Reactions: jeffyTheHomebrewer

elezzar

Well-Known Member
Newcomer
Joined
Apr 6, 2023
Messages
45
Trophies
0
XP
203
Country
United States
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?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Probably because the game cover looks like it's meant for little kids