MPEG4 Player by Gericom: Difference between revisions

From GameBrew
(Created page with "{{Infobox DS Homebrews |title=MPEG4 Player |image=Mpeg4playerger.png |description=Video player for the NDS, a spinoff project from YoutubeDS. |author=Gericom |lastupdated=2019...")
 
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox DS Homebrews
{{Infobox DS Homebrews
|title=MPEG4 Player
|title=MPEG4 Player by Gericom
|image=Mpeg4playerger.png
|image=Mpeg4playerger.png
|description=Video player for the NDS, a spinoff project from YoutubeDS.
|description=Video player for the NDS, a spinoff project from YoutubeDS.
|author=Gericom
|author=Gericom
|lastupdated=2019/07/22
|lastupdated=2019/11/28
|type=Media players
|type=Media players
|version=2019
|version=2019
Line 17: Line 17:
==User guide==
==User guide==
===How to convert video===
===How to convert video===
Use a recent version of [https://ffmpeg.org ffmpeg]. The player plays 176x144 stretched to widescreen with a little filtering and 256x144. Instead of the normal YUV color space, YCoCg is used because it is faster to convert to rgb. Ignore any warnings you get about it. On a PC the colors will look wrong, but it's fine in the player.
Use a recent version of [https://ffmpeg.org ffmpeg]. The player plays 176x144 stretched to widescreen with a little filtering and 256x144.  
 
Instead of the normal YUV color space, YCoCg is used because it is faster to convert to rgb (ignore any warnings you get about it; on a PC the colors will look wrong, but it's fine in the player).


Recommend settings for DS:
Recommend settings for DS:
  ffmpeg -i %1 -f mp4 -s 176x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 350000 -acodec aac -ar 22050 -b:a 64000 -ac 1 -slices 1 -g 50 %2
  <span style="white-space: pre-wrap">ffmpeg -i %1 -f mp4 -s 176x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 350000 -acodec aac -ar 22050 -b:a 64000 -ac 1 -slices 1 -g 50 %2</span>


Recommend settings for DSi:
Recommend settings for DSi:
ffmpeg -i %1 -f mp4 -s 256x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 500000 -acodec aac -ar 32000 -b:a 128000 -ac 1 -slices 1 -g 50 %2
  <span style="white-space: pre-wrap">ffmpeg -i %1 -f mp4 -s 256x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 500000 -acodec aac -ar 32000 -b:a 128000 -ac 1 -slices 1 -g 50 %2 </span>


* Filename - In both cases replace %1 with your input video (e.g. input.mp4) and %2 with your output video (e.g. output.mp4).  
In both cases replace %1 with your input video (e.g. input.mp4) and %2 with your output video (e.g. output.mp4).  
 
===Parameters/Settings===
* Bitrates - Higher bitrates and such may work, depending on the video.  
* Bitrates - Higher bitrates and such may work, depending on the video.  
* Framerates - Supported framerates are 23.976 fps and 29.97 fps, although on ds 23.976 will likely give the best results.  
* Framerates - Supported framerates are 23.976 fps and 29.97 fps, although on ds 23.976 will likely give the best results.  
Line 32: Line 36:
** If your input video doesn't have the right rate, add fps=24000/1001, before colorspace in the commands above.  
** If your input video doesn't have the right rate, add fps=24000/1001, before colorspace in the commands above.  


Note that with long videos audio issues may appear after playing for a while. This is related to the precision of the audio timers on arm7. You will have to adjust the video rate so that it matches the amount of increase/decrease in audio rate to fix that (something smaller than 1%, won't be noticable).
Note that with long videos audio issues may appear after playing for a while. This is related to the precision of the audio timers on arm7.  
 
===Additional notes===
See also the discussion thread for some helpful notes [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-5#post-9352252 by mive]; how to split video into 5 minute segments [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-6#post-9520852 by jonjonmia] and [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-3#post-9268893 mive].


Alternatively you can use [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-5#post-9493330 MPEG4DS Assistant], a user-friendly converter made by JustScratchCoder (note that you still need to have ffmpeg installed).
You will have to adjust the video rate so that it matches the amount of increase/decrease in audio rate to fix that (something smaller than 1%, won't be noticable).


See also [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/post-9007621 a mod version] made by Pk11.
===Additional===
* [https://wiki.ds-homebrew.com/ds-index/videoplayers Video players guide] from DS-Homebrew Wiki.
* Some helpful notes by [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-5#post-9352252 mive] and [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/post-8726823 Pk11]; how to split video into 5 minute segments by [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-6#post-9520852 jonjonmia] and [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-3#post-9268893 mive].
* Alternatively you can use [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/page-5#post-9493330 MPEG4DS Assistant], a user-friendly converter made by JustScratchCoder (note that you still need to have ffmpeg installed).
* See also [https://gbatemp.net/threads/mpeg4-player-for-ds-and-dsi.544095/post-9007621 a mod version] made by Pk11.


==Controls==
==Controls==
Line 45: Line 50:


==Compatibility==
==Compatibility==
Works particular well on DSi.
Works particularly well on DSi.


==Credits==
==Credits==

Latest revision as of 15:30, 4 April 2023

MPEG4 Player by Gericom
Mpeg4playerger.png
General
AuthorGericom
TypeMedia players
Version2019
Last Updated2019/11/28
Links
Download
Website
Source

MPEG4 Player is a video player for DS and DSi created by Gericom. It is a based on YoutubeDS and was modified into a useable video player.

Currently it plays mpeg4 video and aac audio in a mp4 container.

User guide

How to convert video

Use a recent version of ffmpeg. The player plays 176x144 stretched to widescreen with a little filtering and 256x144.

Instead of the normal YUV color space, YCoCg is used because it is faster to convert to rgb (ignore any warnings you get about it; on a PC the colors will look wrong, but it's fine in the player).

Recommend settings for DS:

ffmpeg -i %1 -f mp4 -s 176x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 350000 -acodec aac -ar 22050 -b:a 64000 -ac 1 -slices 1 -g 50 %2

Recommend settings for DSi:

 ffmpeg -i %1 -f mp4 -s 256x144 -vf ""colorspace=space=ycgco:primaries=bt709:trc=bt709:range=pc:iprimaries=bt709:iall=bt709"" -dst_range 1 -color_range 2 -vcodec mpeg4 -profile:v 0 -level 8 -b:v 500000 -acodec aac -ar 32000 -b:a 128000 -ac 1 -slices 1 -g 50 %2 

In both cases replace %1 with your input video (e.g. input.mp4) and %2 with your output video (e.g. output.mp4).

Parameters/Settings

  • Bitrates - Higher bitrates and such may work, depending on the video.
  • Framerates - Supported framerates are 23.976 fps and 29.97 fps, although on ds 23.976 will likely give the best results.
    • Other framerates are not properly supported, as currently the rate is not completely correctly read from the mp4 container.
    • It also seems that the bitstream changes a bit with some rates, which make the decoding fail.
    • If your input video doesn't have the right rate, add fps=24000/1001, before colorspace in the commands above.

Note that with long videos audio issues may appear after playing for a while. This is related to the precision of the audio timers on arm7.

You will have to adjust the video rate so that it matches the amount of increase/decrease in audio rate to fix that (something smaller than 1%, won't be noticable).

Additional

Controls

B (while playing a video) - Return to the file browser

Compatibility

Works particularly well on DSi.

Credits

Special thanks to @Pk11 for helping with testing and adding the file browser.

External links

Advertising: