Homebrew Homebrew app [Release] Video player for 3DS

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,407
Trophies
2
Website
www.flashkarten.tk
XP
3,500
Country
Gambia, The
1) the black borders might be inthe source file already. the movies i downloaded in 3D (ratchet & clank, detective pikachu, etc) are actually 804p, but are letterboxed into 1080. i put quick guide how to crop them into the guide
2) you can split it in the ffmpeg with ffmpeg -ss HH:MM:SS -to HH:MM:SS -i input output
do it before the conversion to the .avi because since the ffmpeg conversion removes the second track
3) lower the bitrate and replace the 4m in the final command with 3m or 2.5m depending on lenght of the movie (this will lower the quality tho)

--------------------- MERGED ---------------------------

about the stretching, you can keep it in the full 3840x1080 resolution. because the final command stretches it anyway into the format it needs
stretching the horizontal resolution into half is meaningless
1) no I think that they came from rerendering the video file. I wanted to split the file in half but the output was 16:9 - but both sides in "original aspect ratio", so the program probably added black borders. I got the video files from a 3D BD.
2) I will try 3)
 
  • Like
Reactions: Core_2_Extreme

AleronIves

Well-Known Member
Member
Joined
Nov 17, 2016
Messages
460
Trophies
0
Age
36
Location
California
XP
2,249
Country
United States
Regarding O3DS support, has anyone tried H.263 playback? XviD requires far fewer CPU resources to decode than H.264, so maybe you could get full speed 240p playback that way, instead of using 144p H.264?
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
939
Country
Czech Republic
Regarding O3DS support, has anyone tried H.263 playback? XviD requires far fewer CPU resources to decode than H.264, so maybe you could get full speed 240p playback that way, instead of using 144p H.264?

well in the example, there is old 3ds 144p 30fps
if you lowered the framerate to like 20fps, it could teoretically run at 240p ?
tho i dont have old 3ds to try it
or just use .avi instead of mp4 which runs fine at higher resolutions
 
  • Like
Reactions: Core_2_Extreme

AleronIves

Well-Known Member
Member
Joined
Nov 17, 2016
Messages
460
Trophies
0
Age
36
Location
California
XP
2,249
Country
United States
No. It has the same 800x240 upper screen as all 3DS models. I tried playing an 848x480 @ 24 FPS H.264 video, and it stuttered significantly in both hardware and software modes.

Currently, the ideal resolution is 400x240, since that will fit the upper screen's aspect ratio 1:1 in "normal" playback mode. If Core_2_Extreme can get 800 px mode to work, we could potentially use 800x240, but it might be hard to get full speed playback at that resolution.
 
  • Like
Reactions: Core_2_Extreme

P34ch

Active Member
Newcomer
Joined
Apr 11, 2019
Messages
30
Trophies
0
Age
48
XP
88
Country
United Kingdom
I use an old video converter called Wondershare Video to Walkman converter. Vids made with this work at 480p with no glitches or frames missed. They look amazing played at 800x resolution. Quite surprising considering even at 240p videos made with Handbrake aren’t perfect.
I’m not sure if you can still buy Wondershare as I got it about 10 years ago for my Walkman. Hopefully it’s still available, and at least proves 480p will work well with this video player.
 
  • Like
Reactions: Core_2_Extreme

Core_2_Extreme

Well-Known Member
OP
Member
Joined
Feb 11, 2019
Messages
153
Trophies
0
Age
22
XP
1,163
Country
Japan
Regarding O3DS support, has anyone tried H.263 playback? XviD requires far fewer CPU resources to decode than H.264, so maybe you could get full speed 240p playback that way, instead of using 144p H.264?
I don't test using H.263 but I tested mpeg2video (aka H.262) and it runs around 20~30fps(depending on scene) on o3ds.

Can New 2DS hold 480p quality?
If you use h.264 codec and use hardware decoding, yes.
but if you use hardware decoding you need to apply some workarounds to avoid lower framerate :
・Encode your video using baseline profile
・Use lower preset ultrafast, faster etc... instead of slow, slower etc...
・Encode your video using CPU(libx264) not GPU(nvenc, intel qsv, amf)

e.g.

ffmpeg -i [input file] -acodec copy -vcodec libx264 -s 854x480 -profile baseline -preset ultrafast [output file]



Currently, the ideal resolution is 400x240, since that will fit the upper screen's aspect ratio 1:1 in "normal" playback mode. If Core_2_Extreme can get 800 px mode to work, we could potentially use 800x240, but it might be hard to get full speed playback at that resolution.

800px mode is implemented and enabled by default expect o2ds.
it seems that c3d and c2d(drawing library) stretched 800*240 as 800*480 internally.
I mean here is that drawing library consider top screen as 800*480 not 800*240 if 800px mode is enabled.

@Core_2_Extreme Wait, in your original command, Is input 0 right And input 1 Left or více versa ?

Input0 is for left eye, input 1 is for right eye.
 
Last edited by Core_2_Extreme,
  • Like
Reactions: AleronIves

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
939
Country
Czech Republic
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]
 
Last edited by T0biasCZe,

Deleted member 568503

Well-Known Member
Newcomer
Joined
Sep 10, 2021
Messages
53
Trophies
0
XP
99
Country
Malaysia
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=852: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 -s 426x240 -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 -s 426x240 -b:v 3M -ac 2 movie2.avi

Hardware accelerated version:
Code:
ffmpeg -i INPUT -vf scale=852: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 -s 426x240 -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 -s 426x240 -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=852: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 -s 426x240 -b:v 3M -ac 2 movie.avi
hardware accelerated version:
Code:
ffmpeg -i INPUT -vf scale=852: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 -s 426x240 -b:v 3M -ac 2 movie.avi

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]
This is for hardware decoding right?
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
939
Country
Czech Republic
only the commands marked as "hardware accelerated versions" are accelerated by GPU
the rest are not accelerated (they are for people that have amd gpu or dont have dedicated gpu at all)
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
939
Country
Czech Republic
it only hardware encodes. it doesnt hardware decode it. decode is still done by CPU (some of the filters and scalling that needs to be used dont work with hardware decoding for some reason)
but its still many times faster than with pure CPU (with pure CPU i was getting 1-4x speeds, with the GPU encode 8x-16x speeds). and decoding is much easier power wise than encoding anyway, so it doesnt matter so much
 
Last edited by T0biasCZe,
  • Like
Reactions: Core_2_Extreme

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/CaOkTKfxu44?si=gaexp0MTD_Yi-udH