Post subject: How to make a temporary encode in FFMPEG
xxezrabxxx
He/Him
Joined: 7/15/2017
Posts: 199
Location: Kentucky
This post will show you how to make a temporary encode using FFMPEG. (Note: In BizHawk, you can just use the upscaler built into it using File > AVI/WAV > Config and Record AVI > Select AVI Writer > Enable Resize Video > Insert Resolution) What you need: You will need FFMPEG (Download it here) You also need the Lagarith Lossless Codec (Download it here. Select the installer) (Note: This is somewhat optional, just recommended if you don't want to deal with large file sizes) What to do with them: Unzip the FFMPEG package somewhere in its folder. Install the Lagarith codec using the installer. --------------------------------------------------------------- Dumping video using the AVI dumper. We are going to use FCEUX as a example. (This may be different for other emulators, but you should get the general idea.) Step 1: Load your ROM and pause emulation (using the pause button) Then select and play your movie, but do not unpause Step 2: Begin dumping AVI To begin, go to File > AVI/Wav > Record AVI Name it movie.avi, and save it in the bin folder of FFMPEG Choose the Lagarith Codec we installed earlier (Optional, only if you don't wanna deal with extremely large files) Press OK. Step 3: Playing back the TAS Set your emulator speed to 400 or 800x speed This will not affect the video speed in the file. You can unpause the emulator and play back your TAS until the end Once we have reached the end, you can stop AVI recording by going to File > AVI/Wav > Stop AVI Step 4: Upscaling using FFMPEG We now have our video saved in the bin folder of FFMPEG Now, you will want to open up the command prompt Use Windows Key + R to open the Run program, type "cmd" into the textbox and press OK. The command prompt should now be open to use. Go back to your FFMPEG folder where you saved the video, and copy the address to the folder as text, by right clicking the address bar In the command prompt, do the command "cd *paste what you just copied*" and press enter Do this command to upscale your video, and insert the resolutions based on whether you want 720 or 1080. NOTE: Depending on what console you are using, it may have a different resolution needed, you need to know your consoles native resolution, then you can just open mspaint, click resize and disable preserve aspect ratio, resize it to your native resolution, then click OK, go back to resize, then modify the height to be 720 or 1080 while keeping preserve aspect ratio enabled, then you have your resolution, no need to touch the width, and use that in the command If you want 1080p, use: ffmpeg.exe -i movie.avi -vf scale=-1440:1080 -sws_flags neighbor -c:v libx264 -preset fast -profile:v high -crf 25 -coder 1 -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low -pix_fmt yuv420p movie.avi If you want 720p, use: ffmpeg.exe -i sourcefile.avi -vf scale=-960:720 -sws_flags neighbor -c:v libx264 -preset fast -profile:v high -crf 25 -coder 1 -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low -pix_fmt yuv420p encode.avi Just copy and paste those into the command prompt. Wait for them to finish encoding. Once it is done, upload it to YouTube and link it into your submission.
I like to comment on submissions and look around the site. You have probably seen me before (if you have been around for a while) either on the site, Discord, or any other social media. I recently took up making temporary encodes for new submissions. Also, I never forget to greet Tompa wherever I find him! "when resyncing stuff sucks it's called Resuccing" - EZGames69 “If an emulator stops being accepted to the site it should be called an emuLAMEr” - EZGames69 "oh no discord, everything I say will now be logged forever, sdfsdf, time to hide" - Masterjun "just had to give therapy to a taxi with daddy issues" - psx Current Projects: Mother 3 (75% complete)
Pokota
He/Him
Joined: 2/5/2014
Posts: 779
1) We have a thread about this already 2) If you're using ffmpeg anyway, you may as well dump the game video at 1x scale - skipping BizHawk's builtin resizer - and rescale directly in ffmpeg. Which you are doing in the bottom of the post. 3) For the scalar options, it's more useful to pass -1 for 1:1 resizing, or -2 for better compatibility with oddly-sized games. Passing larger numbers creates more distortion (what you have in your ffmpeg command would distort anything that's not 4:3 video)
Adventures in Lua When did I get a vest?
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Bizhawk has an ffmpeg dumper already.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
Yeah this seems like quite complicated compared to simply selecting the FFmpeg writer in Bizhawk, selecting [Custom], and then entering your commands, for example -vf scale=iw*4:ih*4 -crf 18 -sws_flags neighbor -pix_fmt yuv420p -b:a 384k -f mp4 for 4x scale and basically visually lossless.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
xxezrabxxx
He/Him
Joined: 7/15/2017
Posts: 199
Location: Kentucky
Well I know that, but not every emulator is BizHawk. I used FFMPEG directly to upscale FCEUX output.
I like to comment on submissions and look around the site. You have probably seen me before (if you have been around for a while) either on the site, Discord, or any other social media. I recently took up making temporary encodes for new submissions. Also, I never forget to greet Tompa wherever I find him! "when resyncing stuff sucks it's called Resuccing" - EZGames69 “If an emulator stops being accepted to the site it should be called an emuLAMEr” - EZGames69 "oh no discord, everything I say will now be logged forever, sdfsdf, time to hide" - Masterjun "just had to give therapy to a taxi with daddy issues" - psx Current Projects: Mother 3 (75% complete)
Post subject: What about a video?
MrTASer
He/Him
Player (231)
Joined: 7/3/2021
Posts: 147
Location: Udaipur, Rajasthan, India, God'sBeautifulWorld
xxezrabxxx wrote:
Well I know that, but not every emulator is BizHawk. I used FFMPEG directly to upscale FCEUX output.
Can I get some help by a video tutorial???
My TASing channel ; My MUSIC channel ; My SoundCloud ; My HomePage ; Music Composer ; Mr.TASer#5922 VCop 2 TAS completed, but in a completely different way ; And SMB - GAGOTO (WL) TAS COMPLETED TILL W-4 ; Some more...