Encoding video for WiiMC

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
I made simple commands for converting videos to format that WiiMC can play at full speed without, lagging, so i decided i will share it with everyone else.
First download ffmpeg and open cmd in the same dictionary as your files. Select command depending on your Wii TV Output mode, and if you wanna stretch the video to fill screen or keep the aspect ratio unchanged. Replace "input" with name of your video file.
Then, after ffmpeg gives you the output file, copy it to your sd card/usb drive and open it with WiiMC

4:3 TV out 576i
If you have 4:3 video or you wanna stretch widescreen video to 4:3, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 4:3 -vf scale=720:576:flags=neighbor -c:v libxvid -b:v 2500k -r 25 OUTPUT.mp4
If you have widescreen video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -r 25 OUTPUT.mp4

4:3 TV out 480i/480p
If you have 4:3 video or you wanna stretch widescreen video to 4:3, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 4:3 -vf scale=640:480:flags=neighbor -c:v libxvid -b:v 2500k -r 30 OUTPUT.mp4
If you have widescreen video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=640:-2:flags=neighbor -c:v libxvid -b:v 2500k -r 30 OUTPUT.mp4

16:9 TV out 576i
If you have 16:9 video, or you wanna stretch other aspect ratio video to 16:9, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 16:9 -vf scale=720:576:flags=neighbor -c:v libxvid -b:v 2500k -r 25 OUTPUT.mp4
If you have non 16:9 video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -r 25 OUTPUT.mp4

16:9 TV out 480i/480p
If you have 16:9 video, or you wanna stretch other aspect ratio video to 16:9, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 16:9 -vf scale=720:480:flags=neighbor -c:v libxvid -b:v 2500k -r 30 OUTPUT.mp4
If you have non 16:9 video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -r 30 OUTPUT.mp4

also, if you like ugly blurred image for some reason, remove the ":flags=neighbor" from the command


Note: these commands have 5x lower encode speed than the commands above.
4:3 TV out 576i
If you have 4:3 video or you wanna stretch widescreen video to 4:3, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 4:3 -vf scale=720:576:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 25 -mbd rd -ssim_acc 0 OUTPUT.mp4
If you have widescreen video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 25 -mbd rd -ssim_acc 0 OUTPUT.mp4

4:3 TV out 480i/480p
If you have 4:3 video or you wanna stretch widescreen video to 4:3, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 4:3 -vf scale=640:480:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 30 -mbd rd -ssim_acc 0 OUTPUT.mp4
If you have widescreen video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=640:-2:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 30 -mbd rd -ssim_acc 0 OUTPUT.mp4

16:9 TV out 576i
If you have 16:9 video, or you wanna stretch other aspect ratio video to 16:9, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 16:9 -vf scale=720:576:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 25 -mbd rd -ssim_acc 0 OUTPUT.mp4
If you have non 16:9 video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 25 -mbd rd -ssim_acc 0 OUTPUT.mp4

16:9 TV out 480i/480p
If you have 16:9 video, or you wanna stretch other aspect ratio video to 16:9, use this command
Code:
ffmpeg -i INPUT.mp4 -aspect 16:9 -vf scale=720:480:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 30 -mbd rd -ssim_acc 0 OUTPUT.mp4
If you have non 16:9 video and you wanna keep the aspect ratio, use this command:
Code:
ffmpeg -i INPUT.mp4 -vf scale=720:-2:flags=neighbor -c:v libxvid -b:v 2500k -ac 2 -c:a mp3 -b:a 128k -r 30 -mbd rd -ssim_acc 0 OUTPUT.mp4
 
Last edited by T0biasCZe,

peter8

Well-Known Member
Member
Joined
Oct 15, 2021
Messages
596
Trophies
0
Age
43
XP
1,235
Country
Germany
XviD works a lot better for me than the mp4 container. And I use a bitrate of 1100 CBR and the quality is good enough for this small resolution. mp4 make trouble, especially when the runtime is to long. A bitrate of 2500k is usefull for 720p, but the Wii is not a HD console. You can not encode native 4:3 videos into 16:9 without cropping.

640:576 is wrong and 640:480 is wrong

PAL = 720x576
NTSC = 720x480 29,97fps
 

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
XviD works a lot better for me than the mp4 container.
It is Xvid. Container doesnt matter, the codec/format does

A bitrate of 2500k is usefull for 720p
Sometimes there are still compression artifacts with 2500k. This Is the gold Middle that Its not too large, but it doesnt have lot of artifacts
640:576 is wrong and 640:480 is wrong

PAL = 720x576
NTSC = 720x480 29,97fps
640:576 and 640:480 is correct for 4:3 TVs

You can not encode native 4:3 videos into 16:9 without cropping.
You can with stretch
Thats why there are two options. Option for if you want to keep the 4:3 video in 4:3, and if you want to stretch the 4:3 video into 16:9
 

peter8

Well-Known Member
Member
Joined
Oct 15, 2021
Messages
596
Trophies
0
Age
43
XP
1,235
Country
Germany
sorry to say this, you are wrong.
from google and wiki ->

''PAL is a video mode with a 4:3 anamorphic resolution of 720x576 and a frame rate of 25 frames per second.''

And it has nothing to do with 4:3 or 16:9, its encoding stuff. I had never see 640:576 in PAL land. We in europe always has output of 720x576, TV or VHS or DVD. Even the Pirated warez groups never use a higher bitrate of 900kb for xvid or mkv in SD quality, make no sense. Artifacts can reduced from VBR 2pass mode.

EDIT

Its abnormal or untypical to put Xvid into mp4 container, noone do this, xvid is still best working in AVI container. You try experimental encoding stuff, but its useless when you use a bitrate of over 2000 for SD quality. How big are your files 3GB for 90 minutes ?
 
Last edited by peter8,

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
Even the Pirated warez groups never use a higher bitrate of 900kb for xvid
This is 25fps xvid encoded with 900kb/s bitrate
1636555727713.png

and this is the same video with 2500kb/s
1636555742532.png

big difference


''PAL is a video mode with a 4:3 anamorphic resolution of 720x576 and a frame rate of 25 frames per second.''
Ok, in case of Wii, its neither 720x576 or 640x576. its 670x576 because overscan
So with 640x576 video, it needs to scale it up on X axis, and with 720x576, it needs to scale it down on X axis. neither is optimal...
 
Last edited by T0biasCZe,

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,421
Trophies
2
XP
14,855
Country
Germany
I didn't even know the Wii was capable of decoding any MPEG-4 videos in real time. Always got stuttering, but I tried h.264

Wikipedia gives that xvid is different from h.264
https://en.wikipedia.org/wiki/Xvid
https://en.wikipedia.org/wiki/MPEG-4_Part_2

A new thing to try.

==============

About the resolution: I would keep it at 720*576 or 720*480 because that is what DVD-Video delivers (no matter what the Wii internally uses).

Other than smaller files, there is no reason to transcode DVD-Video/MPEG-2 data. WiiMC handles them flawlessly.
 
  • Like
Reactions: Alexander1970

peter8

Well-Known Member
Member
Joined
Oct 15, 2021
Messages
596
Trophies
0
Age
43
XP
1,235
Country
Germany
640x480 is also a good resolution that was used many years long into the scene, it works with NTSC and PAL or WEB-streams. The bitrate depends on the movie what you have. Fullscreen or Widescreen, an fast action film like sonic or the Sixth Sense where is no action.
You can try encode Widescreen movies in fullscreen with 720x576, but your bitrate will go into the black screen on the top and bottom, when you crop it than you can use all your bitrate into your movie with example 720x360. I encode my files that its working on all consoles like PS2 PS3 and Wii.
You miss out the information about the Audio codec, not all is working on the Wii.

Example ->

SD :

Terminator.Dark.Fate.2019.BDRip.x264-SPARKS
Size: 856MB
Video: MKV | 720×302 | 816 kb/s
Audio: English | AAC | 115 kb/s

720p :

Release Name: Terminator.Dark.Fate.2019.720p.BluRay.x264-SPARKS
Size: 5.46GB
Video: MKV | 1280×536 | 5466 kb/s
Audio: English | AC3 | 640 kb/s

1080p :

Terminator.Dark.Fate.2019.1080p.BluRay.x264-SPARKS
Size: 8.75GB
Video: MKV | 1920×808 | 9134 kb/s
Audio: English | AC3 | 640 kb/s

WEB Stream SD :

Terminator.Dark.Fate.2019.WEBRip.x264-ION10
Size: 1.22GB
Video: MP4 | 720×300 | 1100 kb/s
Audio: English | AAC | 256 kb/s

WEB 720p :

Terminator.Dark.Fate.2019.720p.WEBRip.XviD.AC3-FGT
Size: 3.92GB
Video: AVI | 1280×530 | 3992 kb/s
Audio: English | AC3 | 384 kb/s


As you see, noone go up to 1100kb on SD quality, make no sense. SPARKS had used 816 kb and its a scene release.
 

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
an fast action film like sonic or the Sixth Sense where is no action.
Well i was converting squid game, and it also looked bad with 1000kb and 2000kb
it starts looking good at the +- 2500kb/s
You miss out the information about the Audio codec, not all is working on the Wii.
ffmpeg uses aac audio as default codec, which WiiMC supports. there is no need to specify it...

also, if you think 2500kb/s is high for 576p, i also made script co convert left/right stereoscopic 3D movies into format that New 3DS can play. It took 2500kb/s bitrate for one 400x240 track until it looked watchable. So 5000Kb/s for 240p video :)
 

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
Terminator.Dark.Fate.2019.720p.WEBRip.XviD.AC3-FGT
Size: 3.92GB
Video: AVI | 1280×530 | 3992 kb/s
1280x530 is 678 400 pixels. 720x576 is 414 720. Thats 1,6x more pixels than the Wii resolution. It is Xvid with 4000kb/s bitrate. 4000 divided by 1,6 is 2500. So the bitrate of the HD example is same as the bitrate of video that my command outputs.
 
Last edited by T0biasCZe,

peter8

Well-Known Member
Member
Joined
Oct 15, 2021
Messages
596
Trophies
0
Age
43
XP
1,235
Country
Germany
You can not compare 720p with 576p with your math. You are joking ?

Terminator.Dark.Fate.2019.WEBRip.x264-ION10
720×300 - 1100 kb/s
Terminator.Dark.Fate.2019.BDRip.x264-SPARKS
720×302 - 816 kb/s

That mean, all scene groups are checkmate in your opinion and this are ideot groups or what ? ;)
Maybe you do something wrong when it looks bad, but you are not listen. Do not come up with checkmate, my gosh.
 

T0biasCZe

Well-Known Member
OP
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
You can not compare 720p with 576p with your math. You are joking ?
nah
and still, you are taking already downloaded file and converting it to format that you just put on SD card or USB disk.
you are not limited by size like the rip groups that need to make it small so it doesnt take ages to download + to not fill the bandwidth
Why unnecesary limit the video quality ? Why have low quality video when you dont have small space limitations ? even with FAT32 disk, you could fit 4 hours in one file with this bitrate
 
Last edited by T0biasCZe,

peter8

Well-Known Member
Member
Joined
Oct 15, 2021
Messages
596
Trophies
0
Age
43
XP
1,235
Country
Germany
This stuff is Homebrew and the Wii console is from 2006. And you bring up an intense bitrate and combine xvid with mp4 container. This all still need testing. The Wii console can be very fast dead when you overheat it permanently. You must test your video files on the Wii console, not on your PC screen. In the Homebrew scene you first test standard codecs and later you can make experiments. Your knowledge is zero, otherwise you would know 2pass or VBR mode or other audio codecs.
You can do what ever you want, but please do not post wrong information to earn XP points and other members gets trouble with your codec informations. Had you ever try play Quake 1 on Wii with high MP3 or OGG bitrate files ? This is all limited.

EDIT : and there are more and better ways to bring up the best quality, without your intense bitrate.
 

Jayro

MediCat USB Dev
Developer
Joined
Jul 23, 2012
Messages
12,964
Trophies
4
Location
WA State
Website
ko-fi.com
XP
16,973
Country
United States
In my testing, 480p content can use H.264 encoding, while 720p content is usually H.263. Otherwise you'll drop frames and get laggy video. These were tested by me using the MP4 file container.
 

Jayro

MediCat USB Dev
Developer
Joined
Jul 23, 2012
Messages
12,964
Trophies
4
Location
WA State
Website
ko-fi.com
XP
16,973
Country
United States
Before i found about Xvid, i tried 576p and 480p H264 and it was extremelly lagy
Mine played fine. But my bitrate was also just over 2MB/s too, from USB. And Xvid files (AVI container) always played okay at first, and then slowly turned a cloudy pink color, before snapping back to normal. They would do this throughout the movie, and MP4 files never gave me this issue.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: @SylverReZ, Indeed lol