Page 1 of 1

Upscaling recorded videos

Posted: Sun Feb 18, 2018 11:52 pm
by Arganoid
Can anyone recommend a way to upscale recorded videos to HD without blurring? I've been using ffmpeg, and this document I just found suggests that too:

https://hg.tuxfamily.org/mercurialroot/ ... ording.txt

However, the videos that are produced have a lot of dropped frames. This happens regardless of which codec I use, and seems to be associated with the error message:

"Non-monotonous DTS in output stream 0:0; previous: 950272, current: 950272; changing to 950273. This may result in incorrect timestamps in the output file."

Which ffmpeg prints hundreds of times during the process. It's not clear if this is a problem with the videos Hatari produces, or with ffmpeg.

If I scale the video using the video converter built into VLC, the dropped frames problem does not occur – however, I have yet to find out how to use nearest neighbour sampling to avoid blurring.

Re: Upscaling recorded videos

Posted: Mon Feb 19, 2018 12:39 am
by Xerus
My solution to avoid the dropped frames with ffmpeg is to record with no compression (see hatari's manual).
MPNG with compression is not well recognize by many encoder/player...

Now the blurring problem, use the good Evil's tuto:
http://dhs.nu/videorecording.php

Re: Upscaling recorded videos

Posted: Mon Feb 19, 2018 11:20 am
by darklight
I take it you cant just record directly in HD (full screen) to start with? Might sound like a silly question, but there are still people who record in 240 "because why record in a better resolution than the original hardware?" Well there is one incredibly good reason - playback looks like a dogs breakfast!

Re: Upscaling recorded videos

Posted: Thu Feb 22, 2018 10:48 pm
by Arganoid
I switched the codec from MPNG (the default) to BMP. ffmpeg can now convert and upscale the video without any dropped frames. The downside is that a 9 minute 320x200 video is 5 GB.

Here is the result of my efforts:
https://www.youtube.com/watch?v=YcQoA2wf38U
The video is 720p rather than 1080p – in practice I don't think the difference is noticeable. If I follow the DHS advice for a 1080p video, the video doesn't take up the whole screen as there is padding at the top and bottom.

As for recording at the original resolution, that's not a problem as the BMP codec is lossless (and even with the MPNG codec, I couldn't see any noticeable loss of quality).

Re: Upscaling recorded videos

Posted: Wed Jul 18, 2018 7:01 pm
by Eero Tamminen
Yes, both BMP and PNG are lossless compression methods.

However, PNG compression is very heavy at highest compression level (which is the default), and can cause Hatari to skip frames if automatic frame skipping is enabled (it's enabled by default). If BMP takes too much space, one can try telling Hatari to use lowest compression level and disable frame skip.