Post subject: Settings for PSX YouTube recording
Joined: 7/21/2012
Posts: 18
Hi all, For starters, I've read through the main site's Encoding guidelines as well as perusing a few of the forums, for several days now - I've done my due diligence in terms of lurking first. Unfortunately, the majority of these guides is spent focused on technical aspects that are required for Official TASvideos movies, with no real "quickstart" guide for those of us who are new and don't anticipate submitting tons of Official TASvideos submissions. I'm looking for settings to make reasonable quality and (hopefully) small size YouTube uploads from PSXjin v2.0.2, though from what I understand, the codec settings should be similar across all emulators. I'll break my questions down into a few easy topics that hopefully have easy answers. I greatly appreciate the help anyone can provide. The codec: I have ffdshow video codec listed as an option in PSXjin. Underneath that codec, there are many suboptions, including a variety of Encoders and graphical settings: First off, is this a legitimate codec to use? I've seen and downloaded an x264 package for Windows, but I ran the executable inside it and still do not see it listed in PSXjin. It seems like ffdshow has x264 inside it anyway, doesn't it - so is that fine? The settings: Simply put, what settings are important (see image above, though there are some other tabs too...), and what values do I use? There have been vague references to bitrate in some of the guides, but I haven't ever seen any quickstart guide for new encoders like "use X bitrate, change this setting, turn this on, and ignore the rest until you're more experienced." To clarify, I am recording a PSX game (Final Fantasy Tactics) for YouTube only; I am not concerned with meeting technical specs for Official TASvideos submissions. By the way, in the above image, I can change the mode to "One pass - average bitrate" and set a bitrate instead of Quality, if that helps. The resolution: I saw on the Encoding guide/Hi-def page that for YouTube, it's recommended to go over 320x240 for PSX games. Is 640x480 good? What about 800x600? Again, I'm looking for decent quality but still a manageable filesize. The audio: In PSXjin, the audio records separately from the video. I don't see anywhere in PSXjin that I can configure the audio encoding (or make them record together). Should I try to find the configuration (and if so, what settings to change)? Or just let it run with default settings and fuse the audio and video together after recording? The filesize: If you're able to make recommendations for the above categories... what filesize should I expect for, say, a 5 minute video? I tried experimenting with various codecs and settings already, and I watched a few seconds of video quickly eat up a couple MB (and a decent size audio file, too), which means a 5-to-10-minute battle video could approach 1 GB, which seems unreasonable as far as YouTube uploads are concerned. Or hey, maybe it's not, and I'm just not familiar with the territory. But I've seen some 60+ minute emulation videos on YouTube, and I'd be scared to think people are uploading several GB per video on those. Again, thanks in advance for any help you can provide. I don't mind being provided links as well, but if the links are to the TAS main site's Encoding guide and to this forum's stickies, the bad news is that I've already browsed those and come up empty for these questions. Cheers, dw0914
Post subject: Re: Settings for PSX YouTube recording
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Welcome to TASVideos! Don't worry too much about the murky Encoder guidelines, they are a bit of a mess. Natt should really go and fix those, but he hasn't yet because he's lazy. Yes, the guides are geared primarily towards making publication quality encodes; that's their purpose. If your goal is to submit TASes, you can always just let my army of Gugas handle all of the work. But from what I'm reading, it seems like your goal is to just post reasonably quality YouTubers of stuff that you do? That's cool too, unfortunately it's not quite what the guides are for. FFDshow is an interesting train wreck multi-function VFW VCM. Most of its encoding features have been abandoned, so a build that even has x264 in it is quite aged at this point. So I would recommend against using it simply because it's old and is not going to be getting the benefits of changes in newer ffmpeg builds. PSXjin always captures audio separately. No way to change that. They will have to be combined together after the fact. AviSynth works well for this sort of thing. 480p generally makes pretty decent looking youtube uploads. A lot of that "original" stuff is mostly masturbation. You should try to upload to youtube at a pretty high bitrate, to reduce generational losses. Sorry about your bandwidth =/. If you're worried about uploads getting interrupted or resuming issues, you might consider Nach's Youtube Uploader If you're just looking for a PSXjin youtube upload workflow, how about something like this: 1. Initial recording in lossless (something like camstudio or lagarith) 2. Combine with audio, resize, etc, in AviSynth. 3. Encode one-pass in ffmpeg:
ffmpeg -i foo.avs -c:v libx264 -crf 10 -c:a libvorbis out.mkv
I know, I know, "AviSynth is a pain in the ass"... with multiple resolutions coming out of psxjin, as well as separate audio to attach, you need some sort of workflow. Making simple scripts isn't really that hard.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
You really need 720p for Youtube videos, even for low-res content, otherwise it will look worse than it could and might even load slower than HD videos. Personally I use VirtualDubMod with x264vfw to encode h264 video (constant rate factor = 20), lame for MP3 audio, and mkvtoolnix to combine both.
Joined: 7/21/2012
Posts: 18
Thank you both for the swift and helpful responses! natt, you're correct about my intentions. I've already uploaded a bunch of SNES videos from snes9x (again, just for fun, not TAS submissions), and while I can't remember what settings I used (ugh), I don't remember it being nearly as complicated as this. All I did there was use its built-in AVI recording with some simple codec - I wish I could remember what - and it came out in a nice, neat, reasonably sized AVI that I sent straight to YouTube. I do remember that it only plays with 240p resolution there... but there didn't seem to be any major compromise of SNES graphics. As such, I don't have any experience at all with any of the programs or codecs listed. Google should be a reasonable enough resource to find them (does that include CamStudio/Lagarith codecs?), but are they free to download and use? My hope also is that they're also easy to use, since I was hoping for a relatively hassle-free process*, something comparable to when I used to make SNES videos. [* I realize that's actually a lot to expect >.< but alas, my time after work is pretty occupied these days, and all my YouTube uploads are in the spirit of fun. An unfun, complicated process that requires buying/learning multiple programs would probably be a barrier to proceeding at this time.] To clarify, my bandwidth is actually alright, but 1 GB+ sounds like an unnecessarily large file (to me anyway). Is that actually par for the course for PSX / decent quality videos? I'm not at home right now, but when I get home I'll check the SNES videos I made. I remember them being around 80 MB or so for 3-5 minute videos. If my expectations are just wrong, and rather large sizes are normal (much bigger than my old SNES videos), then I might stick to some of the more default settings and just use AviSynth or mkvtoolnix (whichever's easier) to fuse the audio and video. Thanks again for the helpful replies :)
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
dw0914 wrote:
All I did there was use its built-in AVI recording with some simple codec - I wish I could remember what - and it came out in a nice, neat, reasonably sized AVI that I sent straight to YouTube.
I would guess it was one of: * Camstudio Codec (free) * Camtasia Codec (not free) * Dosbox Capture codec (free, but I don't know if it works with snes9x). Youtube can deal with all of those.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
dw0914 wrote:
All I did there was use its built-in AVI recording with some simple codec - I wish I could remember what - and it came out in a nice, neat, reasonably sized AVI that I sent straight to YouTube. I do remember that it only plays with 240p resolution there...
You sent the raw 60fps 256x224 capture, which has a couple of problems... - YT throws away frames until it's <=30fps, so your upload could've finished in about half the time solely with doing that before uploading - you may have wanted to have the TV aspect ratio (4:3) instead of the unstretched ratio (8:7) - the audio is raw PCM data which could've been compressed with a lossy codec at least down to 1/10th of its size - YT uses lower quality settings for <720p videos, including the audio iirc - not a major issue if you didn't mind it.
dw0914 wrote:
Google should be a reasonable enough resource to find them (does that include CamStudio/Lagarith codecs?), but are they free to download and use?
Yes. CamStudio download + codec download Lagarith These are lossless, fast codecs intended for recording and editing. They produce large files but are bit-perfect. Useful for encoding from the emulator. Every frame is encoded completely with no relation to previous frames. ZMBV codec (included with DOSBox) Also lossless, but spends more time finding similarities to previous frames. Also for editing, useful if HDD space is scarce. Note: Accepts only 16-bit and 32-bit input videos, so it can't be used with SNES9x. x264 (or x264vfw for VirtualDub) Lossy and small encodes; lots of experimentation required to get a feel for your preferred compromise between quality, size and speed. lame (or this site) Audio encoder. Use it from the command line, VirtualDub (after installing the ACM version), Foobar2000 etc. There are also other codecs you could use, e.g. AAC or OGG Vorbis.
dw0914 wrote:
[...] and just use AviSynth or mkvtoolnix (whichever's easier) to fuse the audio and video.
Avisynth only opens files and manipulates the uncompressed data; writing it is the responsibility of the host program and its codecs. MKVtoolnix needs the streams already saved into files.
Joined: 7/21/2012
Posts: 18
creaothceann wrote:
You sent the raw 60fps 256x224 capture, which has a couple of problems...
Actually I might have used some really basic codec rather than factory default settings, because the file sizes were quite small as far as I could tell (< 100 mb for 5 minute videos), but some of the problems you mentioned probably still applied. I was still okay with how they turned out, but I realize they weren't ideal! A few follow-ups since I'm not fully understanding the audio encoder and A/V fusion: - How do I set the audio encoder in PSXjin? I don't see this when I go to Record AVI. - Would Avisynth work just fine if PSXjin already outputs a separate audio and video file? - What resolution should I use? - What filesize should I expect? TASvideos' PSX movies page look like they're around 100 MB or less for videos under 10 minutes. That seems comparable to my previously made SNES videos but way smaller than anything I've cranked out of PSXjin in my trials so far. I realize those mp4's are not intended for HD YouTube publication, but still... I'd prefer something on the smaller end since I'm going to be recording a ton of these. I don't mind sacrificing super high quality since I'm going to be showcasing gaming feats more so than the game's graphics. - For video, it sounds like CamStudio and Lagarith are easy to use, meaning there isn't much to set in them. Is that correct? Also, if I do try to use one of the ffdshow encoders, what average bitrate (or quality) should I set? I realize it depends on my goals, but given what I've said in this thread so far, feel free to give your best estimate. I should have time to give these a try this evening. Thanks again for your continued help!
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
dw0914 wrote:
How do I set the audio encoder in PSXjin? I don't see this when I go to Record AVI.
It's probably hardwired to dump uncompressed data. This should be fine (170KB/s for 44100Hz 16-bit stereo PCM), you can compress it after recording.
dw0914 wrote:
Would Avisynth work just fine if PSXjin already outputs a separate audio and video file?
Yeah, Avisynth can open various sources.
dw0914 wrote:
What resolution should I use?
The minimum required to dump all resolutions that the game might switch to. Most games will probably be fine with 640x480. If not sure check the recording if something looks off. If you're going the 720p route then record at 960x720 if possible (I don't know PSXjin). Links: http://www.assemblergames.com/forums/showthread.php?39221-List-of-PS1-game-resolutions http://www.razyboard.com/system/morethread-native-resolution-pete_bernert-41709-4996857-0.html http://psxemulator.proboards.com/index.cgi?board=support&action=display&thread=1049
dw0914 wrote:
What filesize should I expect? TASvideos' PSX movies page look like they're around 100 MB or less for videos under 10 minutes. That seems comparable to my previously made SNES videos but way smaller than anything I've cranked out of PSXjin in my trials so far. I realize those mp4's are not intended for HD YouTube publication, but still... I'd prefer something on the smaller end since I'm going to be recording a ton of these. I don't mind sacrificing super high quality since I'm going to be showcasing gaming feats more so than the game's graphics.
Going from the filesize, 100MB for 10 minutes == 10MB / 60s == 1MB / 6s == 1024KB / 6s == 8192kbit / 6s == 1365kbit/s; of course that's shared between video and audio. Assuming 192kbit/s for the audio this leaves ca. 1170kbit/s for the video. How well these bits are chosen for encoding is determined by how much time you want to spend encoding. x264 has presets for that, not sure about ffdshow. It also depends on the resolution: as a rule of thumb, larger ones require more bits.
dw0914 wrote:
For video, it sounds like CamStudio and Lagarith are easy to use, meaning there isn't much to set in them. Is that correct? Also, if I do try to use one of the ffdshow encoders, what average bitrate (or quality) should I set? I realize it depends on my goals, but given what I've said in this thread so far, feel free to give your best estimate.
Select GZIP in the CamStudio codec's options, and enable Multithreading support in Lagarith's options (unless you don't have a multicore CPU). You will get large recordings; this is normal. For the final encode, try 500, 1000 and 1500kbit/s in single-pass encoding. Multi-pass encoding will analyze the video and distribute more bits to scenes that need them, but of course it takes longer.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Oh, something I forgot to mention: If you encode for internet streaming flash sites that don't support 60fps, put a "SelectEven" at the end of your Avisynth script (and check with "Info" that it's really <= 30fps).
Joined: 7/21/2012
Posts: 18
Lagarith codec works just fine (easy to use as well) - it produces a ~45mb video for 30 seconds in 640x480. I've downloaded AviSynth and read up on scripts, but I'm unfamiliar with a non-GUI approach and unfortunately have too much going on in Labor Day week to really sit down for a few hours to feel my way around it by trial, error, and AviSynth wiki search-fu. I get the impression that I should do something like this: - Notepad to make an .avs file - Type in something like:
# use the psxjin output avi and wav
video = AVISource("myGameVideo.avi")
audio = WAVSource("myGameAudio.wav")

# mix them:
AudioDub(video, audio)

#a SelectEven statement like you recommended (does it just stand alone?)
SelectEven
- ...after that is where I get stuck. I'm not really sure where to put anything to control the bitrate, which hopefully would reduce the filesize from 90mb/min (current) to something more manageable. - Then what? Start up Windows Media Player and open my .avs file? Do I have to specify some new output destination for the final, audio-dubbed .avi? I'm not really sure how opening an .avs in WMP results in a new .avi file somewhere on my hard drive, but then again, I've never done this before. Also, after making this video with the audio/video fused and other controls implemented, am I free to use a more familiar (and newb friendly) GUI-based video editor to make frame cuts and things like that? I had Windows Movie Maker (haha) in mind. I know it's not exactly professional grade editing software, but is that alright, or will it mess things up if I use it after AviSynth? Any input would be great - feel free to make some basic assumptions about the quality (etc) that I want, if it helps you to provide a brief example. Thanks!
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
dw0914 wrote:
- Notepad to make an .avs file
AvsPmod is better - it has a built-in list of Avisynth functions and a preview function. VirtualDub (or at least VirtualDubMod) also has an Avisynth editor. The code is correct; if the .AVI file has the audio already included then you don't need the AudioDub call. If it has audio but you don't want to read it you can use AVISource("myGameVideo.avi", audio=false) which might be slightly faster / use less memory.
dw0914 wrote:
...after that is where I get stuck. I'm not really sure where to put anything to control the bitrate, which hopefully would reduce the filesize from 90mb/min (current) to something more manageable. - Then what? Start up Windows Media Player and open my .avs file? Do I have to specify some new output destination for the final, audio-dubbed .avi? I'm not really sure how opening an .avs in WMP results in a new .avi file somewhere on my hard drive, but then again, I've never done this before.
Open the .AVS file with an encoder. This can be a command-line ones like - x264.exe - ffmpeg.exe - MEncoder (part of MPlayer) ...or a GUI like - VirtualDubMod - AviDemux - Handbrake - MeGUI In VirtualDub, you just select the video codec in "menu|video|compression" (needs x264vfw for h264 encoding). Select the codec and click "configure" for its options. Make sure "menu|video|fast recompress" is selected. ("direct stream copy" is useful if you just want to edit the audio.) The audio can be dumped via "menu|file|export|raw audio" or if you're using VirtualDubMod, "menu|streams|save wav". If you encode the audio from VirtualDubMod, get the Lame ACM codec, select "full processing" and then the codec from the list.
dw0914 wrote:
Also, after making this video with the audio/video fused and other controls implemented, am I free to use a more familiar (and newb friendly) GUI-based video editor to make frame cuts and things like that? I had Windows Movie Maker (haha) in mind. I know it's not exactly professional grade editing software, but is that alright, or will it mess things up if I use it after AviSynth?
Of course you can, but as long as you're editing it should be via lossless clips (either Lagarith/CamStudio/ZMBV-encoded files or directly via .AVS file). Simple timeline edits can be done with Trim and Dissolve.