Homebrew Homebrew app [Release] Video player for 3DS

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
739
Trophies
0
Age
33
XP
1,264
Country
Argentina
care to explain further what you do in each step? what do you mean by "actual conversion"? isn't that what you were doing before (in the left/right video code)? the input on SBS video for the first code is supposed to be a video of widthx2 of the desired output? or two separate videos?
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
220
Trophies
0
Age
18
XP
945
Country
Czech Republic
in 3D movies from the internet, or what you rip yourself, the left and right eye video tracks are encoded by 2 side by side pictures, or top and bottom picture. in the first one, we extract the left eye image and right eye videos into separate files
in the "actual conversion", we take the left eye file and right eye file and put it into 1 file with 2 separate video tracks that the homebrw plays
 

Core_2_Extreme

Well-Known Member
OP
Member
Joined
Feb 11, 2019
Messages
153
Trophies
0
Age
22
XP
1,163
Country
Japan
though, is it normal that the audio is little choppy ? even when in stereo ?
What framerate are you using?

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
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.
side by side video:
open command prompt in the same directory as your media file, and copy the command, and change INPUT with name of you input file, so for example Pokemon.Detective.Pikachu3D.mkv
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 right.mkv -i left.mkv -map 0:v:0 -map 0:a:0 -map 1:v:0 -vcodec mjpeg -s 426x240 -b:v 4M -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][/spoiler]
Thank you for your great guide.
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,415
Trophies
2
Website
www.flashkarten.tk
XP
3,535
Country
Gambia, The
There werent the colour tags,So i just made it little darker
I couldnt make it full Black because then it wouldnt ve visible in dark mode
You could probably also copy the text and paste it as unformatted text.
I've got a small problem. My video files are in full side by side (3840x1080 instead of 1920x1080). They have too large borders after the conversion.
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
220
Trophies
0
Age
18
XP
945
Country
Czech Republic
if after converting to AVI, dont care about it. the video still has the old metadata and vlc media player etc stretches it back and displays it incorrectly
the homebrew displays it correctly
 
  • Like
Reactions: Core_2_Extreme

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,415
Trophies
2
Website
www.flashkarten.tk
XP
3,535
Country
Gambia, The
After the Split into two files are after you convert it into the .avi ?
It might actually be a problem with my processing of that file...
full length movies have a size of around 5GB and don't fit on the SD after conversion. I split the file in 2 parts with a video editor but the output was 1080p but with black borders. I think that I will have to stretch the video files to half sbs if I go that route... but my video program simply doesn't care about the stretch option ._.
Or I will have to find another program to split the file. VLC sadly doesn't have an option for that.
 
  • Like
Reactions: Core_2_Extreme

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
220
Trophies
0
Age
18
XP
945
Country
Czech Republic
full length movies have a size of around 5GB and don't fit on the SD after conversion. I split the file in 2 parts with a video editor but the output was 1080p but with black borders. I think that I will have to stretch the video files to half sbs if I go that route... but my video program simply doesn't care about the stretch option ._.
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
 
  • Like
Reactions: Core_2_Extreme

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: But you said pine apple...