Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
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.
Joined: 8/3/2008
Posts: 254
Zinfidel wrote:
Guernsey wrote:
I have two questions: 1. How do you prevent BizHawk from splitting your video at 2G? And when it encounters different resolutions? 2. Can you use Lanzcos3 to do an extra resize of certain video dumps after resizing with Nearest Neighbor?
1. You use a dumping method that isn't AVI. Bizhawk will always split AVI files. ffmpeg can do ffv1 if you need a lossless codec. I've never used the other options so I don't know about them. 2. You need to clarify your question. You can resize a video using any filters you want as often as you like. What do you mean by an "extra" resize"? What do you mean by "certain" video dumps?
1. So you use another container to make the dumps? I guess I had been doing it wrong after all this time. 2. I meant how you could use you resizes filters. One where you use "Nearest Neighbor" and the other being "Lanzcos3". I also meant dumps from other emulators that use different video sizes such as Genesis, GameBoy, Nintendo, Saturn etc.
Guernsey Adams Pierre
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
Guernsey wrote:
1. So you use another container to make the dumps? I guess I had been doing it wrong after all this time. 2. I meant how you could use you resizes filters. One where you use "Nearest Neighbor" and the other being "Lanzcos3". I also meant dumps from other emulators that use different video sizes such as Genesis, GameBoy, Nintendo, Saturn etc.
Let me rephrase - you can avoid the split by using a dumping method other than VFW. In BizHawk, the AVI dumping option uses VFW, which always splits at 2 gigabytes. ffmpeg will happily dump to AVI containers as well, but it wont split because it's not using VFW. The result is the same: don't use the AVI dumping option in 'Hawk if you don't want splits. I think most people here use AviSynth for video encoding, which is just a scripting-based video processor that lets you do whatever you want to the video. I don't have experience with any other editing software but I would bet that any decent or popular editing software will allow you to apply as many filters as you want in any order that you want.
xRavenXP
He/Him
Joined: 4/15/2012
Posts: 116
Location: Brazil
Zinfidel wrote:
xRavenXP wrote:
Hello TasVideos friends, how are you? Next, there is an option in the script.avs called "trimframe" and the value I found has the number 654321. I went to make the HD encode of a movie with more than 1000,000 frames (one million frames) and the movie only gives that 654321. I use an old version of EncodingPackage that does not have this limit, but does not have this "trimframe" line. What number should I put in order for the "trimframe" to be unlimited? I await reply. Thank you very much.
Set it to 0.
Thanks man. Works perfectly!
I love games and love to record videos (longplays). Visit my Youtube channel https://www.youtube.com/user/xRavenXP
Joined: 8/3/2008
Posts: 254
Zinfidel wrote:
Guernsey wrote:
1. So you use another container to make the dumps? I guess I had been doing it wrong after all this time. 2. I meant how you could use you resizes filters. One where you use "Nearest Neighbor" and the other being "Lanzcos3". I also meant dumps from other emulators that use different video sizes such as Genesis, GameBoy, Nintendo, Saturn etc.
Let me rephrase - you can avoid the split by using a dumping method other than VFW. In BizHawk, the AVI dumping option uses VFW, which always splits at 2 gigabytes. ffmpeg will happily dump to AVI containers as well, but it wont split because it's not using VFW. The result is the same: don't use the AVI dumping option in 'Hawk if you don't want splits. I think most people here use AviSynth for video encoding, which is just a scripting-based video processor that lets you do whatever you want to the video. I don't have experience with any other editing software but I would bet that any decent or popular editing software will allow you to apply as many filters as you want in any order that you want.
I guess I will just use the MP4 or MKV container for BizHawk. Also why is AVI Splitting a thing in some emulators?
Guernsey Adams Pierre
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
Guernsey wrote:
Also why is AVI Splitting a thing in some emulators?
Probably because of the limits related to file size and VFW. There's also the matter of resolution changes in some games.
Current Projects: TAS: Wizards & Warriors III.
Joined: 8/3/2008
Posts: 254
I also have another Bizhawk question, I normally dump videos and use other video editing software to resize the videos to "HD". I saw an option to resize videos where you would normally go to use "FFMPEG Writer". Should you that option to resize the videos or should just use the option recommended on this site?
Guernsey Adams Pierre
Corvus
He/Him
Player (41)
Joined: 9/15/2018
Posts: 10
Location: United States
Is there a way to visualize sound output with Bizhawk? I want to sync up actions to the music during wait time but doing trial and error for that is a little annoying. I'm doing an NES game if that's relevant
Joined: 8/3/2008
Posts: 254
Should I use the resize feature where the "FFMPEG" writer is?
Guernsey Adams Pierre
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
Guernsey wrote:
I also have another Bizhawk question, I normally dump videos and use other video editing software to resize the videos to "HD". I saw an option to resize videos where you would normally go to use "FFMPEG Writer". Should you that option to resize the videos or should just use the option recommended on this site?
Guernsey wrote:
Should I use the resize feature where the "FFMPEG" writer is?
You are saying "should" which means you are looking for a value judgement of the resizing methods but without saying what your requirements are. Are you trying to replicate the video processing that the site uses for publications? Do you just want the upscaled content to look good? Do you want it to be fast? Correct? What? There is no perscribed way of upscaling your content in general. At best I can tell you to that using the built in resizing feature of Bizhawk, accessible at the config avi/wav dialog, is a very simple and easy way to get nearest neighbor (I don't actually know if this is the algorithm that is used) upscaling. If you do your upscaling in FFMPEG instead, you can select from a variety of upscaling methods and you are likely to benefit from multithreaded scaling as well, but you have to customize the command each time for different resolutions. The majority of encoders/publishers on this site use AviSynth to upscale videos but AviSynth uses the same algorithms that are available to FFMPEG. If you want to scale multiple times (for example, up with some algo then down with another) then you need to use video editing software that can do that. Again most encoders/publishers on this site use Avisynth to do that. For site publications, the default scripts we use currently point resize (nearest neighbor) 2D games up to the desired resolution, while it uses Lanczos scaling for 3D games up to the desired resolution. Scaling up to an integer multiple using point then down using Lanczos is only helpful on a case-by-case basis and you have to test your content to see if it makes a difference.
Corvus wrote:
Is there a way to visualize sound output with Bizhawk? I want to sync up actions to the music during wait time but doing trial and error for that is a little annoying. I'm doing an NES game if that's relevant
I don't think there is any built in feature to do that kind of thing. You're going to have to write either a lua script or a plug-in to do that. I've heard of people looking up the memory ranges for audio data for a console and monitoring those, and timing input with specific values that might correspond to a certain frequency or something, but I have no earthly idea how to accomplish that. You might have luck finding someone who can help you more with this in the #scripting channel in the site's Discord.
Joined: 8/3/2008
Posts: 254
Zinfidel wrote:
Guernsey wrote:
I also have another Bizhawk question, I normally dump videos and use other video editing software to resize the videos to "HD". I saw an option to resize videos where you would normally go to use "FFMPEG Writer". Should you that option to resize the videos or should just use the option recommended on this site?
Guernsey wrote:
Should I use the resize feature where the "FFMPEG" writer is?
You are saying "should" which means you are looking for a value judgement of the resizing methods but without saying what your requirements are. Are you trying to replicate the video processing that the site uses for publications? Do you just want the upscaled content to look good? Do you want it to be fast? Correct? What? There is no perscribed way of upscaling your content in general. At best I can tell you to that using the built in resizing feature of Bizhawk, accessible at the config avi/wav dialog, is a very simple and easy way to get nearest neighbor (I don't actually know if this is the algorithm that is used) upscaling. If you do your upscaling in FFMPEG instead, you can select from a variety of upscaling methods and you are likely to benefit from multithreaded scaling as well, but you have to customize the command each time for different resolutions. The majority of encoders/publishers on this site use AviSynth to upscale videos but AviSynth uses the same algorithms that are available to FFMPEG. If you want to scale multiple times (for example, up with some algo then down with another) then you need to use video editing software that can do that. Again most encoders/publishers on this site use Avisynth to do that. For site publications, the default scripts we use currently point resize (nearest neighbor) 2D games up to the desired resolution, while it uses Lanczos scaling for 3D games up to the desired resolution. Scaling up to an integer multiple using point then down using Lanczos is only helpful on a case-by-case basis and you have to test your content to see if it makes a difference.
I was planning on doing a playthrough of Sonic 3D Blast for the Sega Saturn. I wanted to do upscale as well as make it as accurate as possible. I was hoping to do it the same I did my Genesis videos. I guess there is no set way to upscale the videos? I thought there was. Edit: I wanted to make in "HD" by Youtube standards but I also want to make it good in general. I wanted to use the same method that I talked about in those old threads but I am also looking into other methods to make video making easier. I am stilling learning about BizHawk but I think I am starting to get it now. Edit 2: Do you only need to resize once with BizHawk A/V Writer in order to make your dumps "HD" by Youtube standards? Or should you just dump the video and edit the video on an editor?
Guernsey Adams Pierre
Joined: 8/3/2008
Posts: 254
I do not want to double post but I do need some help with this: I am very well aware of the resize feature of BizHawk but I usually like to edit on Virtualdub (although I am learning how to use HitFilm Express or DaVinci Resolve). I usually like to post individual levels of the games I play but the games on Sega Saturn are usually in 3D or well animated 2D. I really would like to know if I should keep the settings for this video while trying to make the video "HD"?
Guernsey Adams Pierre
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
When you are talking about YouTube "HD", I assume you mean you want the HD badge to show up. YouTube will do that if your video has the right resolution, which for HD means a vertical resolution of around 1080 and/or a horizontal resolution of around 1920. So you just need to upscale to resolutions in that range. There is no set way of upscaling video, as you said. Since you are looking for something prescriptive I'll just give you a straightforward way of doing it that is similar to the stuff publishers on this site do. - Just dump everything at native resolution in BizHawk, using a lossless codec like Lagarith. - For 2D source material, upscale using a nearest neighbor (point) algorithm. You can do this in AviSynth with PointResize or you can do it in ffmpeg using -vf scale=320:240 -sws_flags neighbor after you specify your video file in the command. You replace 320:240 with your desired resolution. - For 3D source material, upscale using the Lanczos algorithm. You can do this in AviSynth with Lanczos4Resize or you can do it in ffmpeg using -vf scale=320:240 -sws_flags lanczos after you specify your video file in the command. You replace 320:240 with your desired resolution. - For the YouTube HD badge, just multiply both parts of the resolution by some number and try to get the vertical resolution close to or slightly above 1080. So for 320x224 source resolution, which both Saturn and Genesis can output, just multiply by 5 to get 1600x1120. So altogether an ffmpeg command you might run could be ffmpeg -i mysourcevideo.avi -vf scale=1600:1120 -sws_flags neighbor -c:v libx264 -crf 10 -c:a aac -q:a 2 outputfile.mp4 These videos won't be aspect ratio corrected. Getting truly aspect-ratio correct video is more difficult to discuss than I care to do in this thread at the moment. If you want, just resize all of your videos to 1440x1080, which is a 4:3 display aspect ratio. For Genesis at least this will get you pretty close to the right pixel aspect ratio but may look bad since developers not accounting for aspect ratio correction is a common thing back in the day.
Joined: 8/3/2008
Posts: 254
How do you that FFMPEG or AVIsynth algorithm for multiple files?
Guernsey Adams Pierre
Joined: 8/3/2008
Posts: 254
Double Post: There is an option under "Configure AVI" where you can write your own FFMPEG command. What is a good example of an FFMPEG script on BizHawk?
Guernsey Adams Pierre
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
Guernsey wrote:
How do you that FFMPEG or AVIsynth algorithm for multiple files?
https://forum.videohelp.com/threads/356314-How-to-batch-convert-multiplex-any-files-with-ffmpeg
Guernsey wrote:
There is an option under "Configure AVI" where you can write your own FFMPEG command. What is a good example of an FFMPEG script on BizHawk?
For any of the commands that have been posted in this thread just remove the beginning ffmpeg -i input.avs part and replace the ending filename part (outputfile.mp4) with -f mp4 or -f matroska or with whatever container you want. edit: http://tasvideos.org/forum/viewtopic.php?t=22681
Joined: 8/3/2008
Posts: 254
I learned that FFMPEG will default to YUV 4:2:0 as opposed to the newer 4:4:4 but how do you change it so that FFMPEG will use 4:2:0? Edit: Should use x264vfw/x264 8 Bit-10 Bit for final encodes?
Guernsey Adams Pierre
Joined: 8/3/2008
Posts: 254
How do merge the split video files? I do not want it to remain split.
Guernsey Adams Pierre
Joined: 8/3/2008
Posts: 254
What is a good AVISynth/FFMPEG Command for Lanzcos resizing Sega Saturn footage?
Guernsey Adams Pierre
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
Guernsey wrote:
I learned that FFMPEG will default to YUV 4:2:0 as opposed to the newer 4:4:4 but how do you change it so that FFMPEG will use 4:2:0?
Add -pix_fmt yuv420p to your ffmpeg command somewhere after your video settings.
Guernsey wrote:
Edit: Should use x264vfw/x264 8 Bit-10 Bit for final encodes?
8-bit.
Guernsey wrote:
How do merge the split video files? I do not want it to remain split.
Use VirtualDub: https://www.makeuseof.com/tag/merge-multiple-video-files-with-virtualdub/
Guernsey wrote:
What is a good AVISynth/FFMPEG Command for Lanzcos resizing Sega Saturn footage?
This question is too broad. The Saturn has many resolutions and has a different pixel clock for low-res and hi-res mode. Borders will vary by emulator and mode. The best I can do is provide you with basic PAR correcting settings for any of the low-res resolutions, that wont' deal with borders in any way. Pixel clock: 7.16MHz means PAR of 6:7. ffmpeg -i saturn.avi -vf scale=iw*4:ih*4:flags=neighbor,scale=iw*4*6/7:ih*4:flags=lanczos,setsar=0 -c:v libx264 -crf 20 -c:a libvorbis -q:a 10 output.mkv This will scale footage 4x and correct for PAR. Change the 4s to something else if you want and use whatever codec settings you want.
Joined: 8/3/2008
Posts: 254
Zinfidel wrote:
Guernsey wrote:
What is a good AVISynth/FFMPEG Command for Lanzcos resizing Sega Saturn footage?
This question is too broad. The Saturn has many resolutions and has a different pixel clock for low-res and hi-res mode. Borders will vary by emulator and mode. The best I can do is provide you with basic PAR correcting settings for any of the low-res resolutions, that wont' deal with borders in any way. Pixel clock: 7.16MHz means PAR of 6:7. ffmpeg -i saturn.avi -vf scale=iw*4:ih*4:flags=neighbor,scale=iw*4*6/7:ih*4:flags=lanczos,setsar=0 -c:v libx264 -crf 20 -c:a libvorbis -q:a 10 output.mkv This will scale footage 4x and correct for PAR. Change the 4s to something else if you want and use whatever codec settings you want.
I guess I wanted to avoid artifacts and to make it as accurate to the original source from Bizhawk (or otherwise) as possible. There are a variety of 3D and 2D game son the console and I wanted to avoid it looking bad. Also that FFMPEG code nearly froze my computer. My computer isn't that powerful but it useful for other things at least. Edit: My build was terrible so I tried another one. Edit 2: Can anyone help find a better method to make my videos 720p or 1080p? The method that was suggested to me included a "Nearest Neighbor" resize where I do a "Same as Source" aspect ratio option with another resize filter with "Lanzcos3", "Compute Height from Ratio" and the "Y Value" being 100%. I had been looking other methods of upscaling my gaming videos and I am starting to think this method might be outdated and it may not be good for me in the long run. I also would like to cut and trim out some part of the videos I record from. Someone also suggested that I use a neural network as opposed to to those methods. Edit 3: My FFMPEG build might be up to snuff to execute that script. There might be something wrong with it
Guernsey Adams Pierre
nymx
He/Him
Editor, Judge, Expert player (2255)
Joined: 11/14/2014
Posts: 933
Location: South Pole, True Land Down Under
When encoding a movie, does the starting frame and ending frame get captured. I often wondered this, since you start on frame zero, which isn't anything...so it makes me wonder if the encoding stops when it reaches the end frame, with nothing captured. I've tried to confirm this with visual queues but I guess I don't have a good playback app to look at individual frames.
I recently discovered that if you haven't reached a level of frustration with TASing any game, then you haven't done your due diligence. ---- SOYZA: Are you playing a game? NYMX: I'm not playing a game, I'm TASing. SOYZA: Oh...so its not a game...Its for real? ---- Anybody got a Quantum computer I can borrow for 20 minutes? Nevermind...eien's 64 core machine will do. :) ---- BOTing will be the end of all games. --NYMX
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
nymx wrote:
When encoding a movie, does the starting frame and ending frame get captured. I often wondered this, since you start on frame zero, which isn't anything...so it makes me wonder if the encoding stops when it reaches the end frame, with nothing captured. I've tried to confirm this with visual queues but I guess I don't have a good playback app to look at individual frames.
The answer to this will be different for different emulators, so I'll just answer for BizHawk. BizHawk will record a frame when it gets rendered, and BizHawk starts movies before frame 0 has been rendered. So if you have BizHawk paused, restart a movie to its beginning, and start AVI capturing, you will capture frame 0. BizHawk will also capture the last frame in a movie so long as it gets rendered, which BizHawk will do even if you pause on last frame, since that last frame gets rendered then the emulator pauses. The only caveat here to consider is if you are paused on an arbitrary frame, and then turn on AVI capture. Since the frame you are paused on has already been rendered, it will not get captured in the AVI.
nymx
He/Him
Editor, Judge, Expert player (2255)
Joined: 11/14/2014
Posts: 933
Location: South Pole, True Land Down Under
Zinfidel wrote:
BizHawk will also capture the last frame in a movie so long as it gets rendered, which BizHawk will do even if you pause on last frame, since that last frame gets rendered then the emulator pauses.
I think this helps out quite a bit. Thank you.
I recently discovered that if you haven't reached a level of frustration with TASing any game, then you haven't done your due diligence. ---- SOYZA: Are you playing a game? NYMX: I'm not playing a game, I'm TASing. SOYZA: Oh...so its not a game...Its for real? ---- Anybody got a Quantum computer I can borrow for 20 minutes? Nevermind...eien's 64 core machine will do. :) ---- BOTing will be the end of all games. --NYMX
Joined: 8/3/2008
Posts: 254
Link to video I know not every game have these cutscenes but some of the methods that are used here take these account?
Can anyone help find a better method to make my videos 720p or 1080p? The method that was suggested to me included a "Nearest Neighbor" resize where I do a "Same as Source" aspect ratio option with another resize filter with "Lanzcos3", "Compute Height from Ratio" and the "Y Value" being 100%. I had been looking other methods of upscaling my gaming videos and I am starting to think this method might be outdated and it may not be good for me in the long run. I also would like to cut and trim out some part of the videos I record from. Someone also suggested that I use a neural network as opposed to to those methods.
What are some alternative methods that I can use to this? Or is this method fine for most games?
Guernsey Adams Pierre