VOGONS

Common searches


Reply 20 of 21, by macaronic

User metadata
Rank Newbie
Rank
Newbie

Thank you for your reply. The frame rate was entirely my mistake. I was just starting out and had changed the output from surface to opengl in the configuration file so that I could test FRAPS with DOSBox. It was the FRAPS framerate in the corner. When I read your reply, I realised that I must have mucked something up on my end.

Reply 21 of 21, by Kisai

User metadata
Rank Member
Rank
Member

I'm going to give my 2cents on this topic, because I use the ZMBV codec for more than just dosbox ( which is why I compiled a 64-bit version ZMBV 64-bit codec, here you go. )

Basically if you have a 64-bit OS, you need both the 32bit and 64bit codec installed... depending on what you are trying to use.

For Virtualdub, use the version that matches the codec that is installed, I use the 64bit version just because I can. If you use the 32bit version that's fine too.

There's two caveat's with using the ZMBV codec:
1. You can not keep the 8-bit mode, this is why the original dosbox recording will be tiny but when you recompress it's twice as large at the minimum. ZMBV can only be used in 16bit or 32bit color mode, and you must implicitly select this if you use ZMBV as the output codec
2. You can only use uncompressed audio, this tends to be the reason why the video files become large, because a 1 hour video will have 600MB of that just be the audio. AVI files must stop at 4GB or they will be corrupt. So you have to keep this in mind when you record.

Now as for how to upscale for youtube. Do nearest-neighbor at the same aspect ratio, it doesn't matter if it isn't pixel-perfect, most DOS era games are 320x200 anyway. The resolution I upscale to is 1440x1080 if it has a perfect 4:3 ratio (some games do not, and need 320x200 to be stretched to 4:3, basically if the game has "circular" objects that are appearing squished, then it's not.) You may want to crop some pixels, particularly of the game made use of overscan for whatever reason.

Now the next thing you have to decide on, is if you want to use Virtualdub, or FFMPEG to scale. If you have a LOT of time to waste, use virtualdub to scale and recompress it to ZMBV, and upload that straight to youtube. It will work, and you won't get blurry 360p videos. But you MUST upscale it to 1080p or 720p. If you have less time to waste this is what I use for FFMPEG:
either (if I already aspect-ratio corrected/rescaled/cropped it in virtualdub)
ffmpeg -i %input -vcodec libx264 -level 41 -crf 22 -r 30 -f mp4 %output
or (if you want ffmpeg to scale)
ffmpeg -i %input -sws_flags neighbor+full_chroma_inp -s 1440x1080 -vcodec libx264 -pix_fmt yuv420p -level 41 -crf 22 -r 30 -f mp4 %output

Gotchas:
Although you can make a "basically lossless h.264", the result is YUV444 and doesn't work on youtube. Only YUV420p is supported. Hence if you upload the pre-upscaled ZMBV file to Youtube, youtube will attempt to recompress it using lower bit rate settings than even what I posted above. If you use FFMPEG before hand, it will still re-compress it.

Make sure that if you are re-compressing using ZMBV, that you set the Keyframes. A video that is made using dosbox doesn't really set keyframes, it just changes the palette and pixels. You need at least one keyframe, but you will be unable to seek in Virtualdub or Adobe Premiere (or even in VLC or MPC-HC) unless there are keyframes set around a minute apart. What happens when you seek is that the video decoder has to process all the frames from the last keyframe, it can't simply use the delta frames since there might not be a complete image. Youtube sometimes is unable to seek videos that weren't made with enough keyframes.

ALTERNATIVE TO ZMBV:
If you are using the OpenGL output, use MSI Afterburner 3 beta, and use the Intel Quicksync feature if you have Intel i5/i7 Ivy Bridge/Haswell with onboard video, this can capture directly to h.264 in a reasonable quality level. This is good enough for Let's Play type of footage, but not good enough for archival footage. If you don't have this CPU, you can still use it to capture video using other available codecs on the system. Just keep in mind that this, just like FRAPS, is capturing the output of the video card, so it will lose frames to keep up. DOSBOX's internal recorder prefers to render all frames, even if it slows the game down. Hence why you can only get archival footage with the internal recorder.