English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 19 February 2014, 17:24   #1
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
Video capture on Hatari emulator?

Does anybody use the Atari ST emulator Hatari and know how the "built in" video capture works? When I click on record avi option it comes up with "AVI RECORDING: Failed to open file". It does mention on the authors site a PNG Library is required for avi recording but I can't make any sense of it. I downloaded what I though was the right thing and stuck in the the main directory but nothing. My dyslexic brain can't work it out.

I`m not sure if this is the relevant place to ask this but thought it might be easier than making a new profile for another forum.

http://hatari.tuxfamily.org/
lordofchaos is offline  
Old 20 February 2014, 00:56   #2
bcripon
Registered User

 
Join Date: Jul 2012
Location: Chicago, USA
Posts: 68
Actually, I use the Mac version of Hatari. Are you running it in OS X, Linux, or Windows? I have used the video capture successfully in the past. I think it uses the PNG library to compress the AVI. I thought you could record without it though.

Bob C
bcripon is offline  
Old 20 February 2014, 01:18   #3
s2325
Zone Friend

s2325's Avatar
 
Join Date: Jun 2006
Location: Gargore
Age: 39
Posts: 17,789
Hatari recording was very slow - one frame visible for 3 seconds. There is no problem if you use SainT.
s2325 is offline  
Old 20 February 2014, 02:28   #4
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
I`m using windows 7. It's the PNG library thing I can't get to work, I downloaded what I thought was the right thing and stuck it in the main directory but still no joy.

SainT has other issues for me, when recording the windows mouse pointer becomes visible and is picked up with the recording. It's fine however using full screen but the emulation doesn't seem as accurate as Hatari, for instance No Second Prize, the copper gradients have distortion during the intro.. Hmm. Shame there isn't an Atari ST emulator as mature as WinUAE.
lordofchaos is offline  
Old 20 February 2014, 05:30   #5
bcripon
Registered User

 
Join Date: Jul 2012
Location: Chicago, USA
Posts: 68
I agree with s2325 that Hatari is very sluggish when recording the video. However, when I play back the video, it does play back much faster.

Looking at Hatari's manual, the PNG library is only used for allowing the user to take screenshots in PNG format and to decrease the AVI video recording size.

Based on your error, I am guessing that Hatari's program directory is somewhere under C:\Program Files. As you know, Windows 7 started to limit what could write files to that directory. Some programs will bring up a prompt, but Hatari is a Linux program at heart so there really is not anything it does that is Windows-specific.

By default, Hatari saves the video capture in its' directory. If you edit the hatari.cfg file, I would look for AviRecordFile and change that directory to somewhere under /Users.

I just tried the Windows version of Hatari on my Windows virtual machine and the video recording worked. However, I dropped the Hatari program into C:\Users so hatari.cfg created the default AVI directory there as well.

I did look at the resulting video and it was more jittery than I remembered it. Since you are a Windows user, you might want to look into STeem as well. A developer took over the code about a year ago and appears to be actively maintaining it.

If you are interested in it, I would go to http://www.atari-forum.com where there is an active STeem forum.


Bob C
bcripon is offline  
Old 20 February 2014, 13:08   #6
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
@bcripon. Cheers for the suggestions, I think you may be onto something, what's more confusing though is that Hatari is located in my "Documents" folder not "c:\program files". I shall have a look at the config file and see if that sheds any light.

EDIT: Ok I figured it out (thanks to Bob for pointing me in the right direction), the config file wasn't located in the main programme folder, instead windows stuck it the users folder. I edited the config script so Hatari would create the avi in the same folder as the emulator. It works, slowly but it works.

Last edited by lordofchaos; 20 February 2014 at 13:33.
lordofchaos is offline  
Old 20 February 2014, 14:20   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,166
I haven't used Hatari, just looked at the documentation, but...

If the program is PNG-compressing every frame that will be slow and eat a lot of CPU time. It looks like there's an option to have it output BMP (uncompressed?) frame data:
Quote:
--avi-vcodec <x>

Select avi video codec (x = bmp/png)
Hopefully, if you specify --avi-vcodec bmp when running Hatari that will solve the speed problem, at the expense of much larger AVI files. But that's not really a problem, since you could use some other program to compress (losslessly even) the AVI files afterwards. Even something like 7-zip should work quite well, but transcoding using a different AVI codec would allow a smaller AVI to be generated.
mark_k is offline  
Old 20 February 2014, 15:19   #8
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
@Mark. Hi and thanks for the suggestions. I've had a look at the manual and it mentions this in the command lines options, these are changed in the config file?

I've tried entering the command in the config but I`m not seeing any differences.

If however I change the line " AviRecordVcodec = 2" to " AviRecordVcodec = 1" It records much faster but there is still stuttering.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	182
Size:	360.6 KB
ID:	39108  

Last edited by lordofchaos; 20 February 2014 at 15:27.
lordofchaos is offline  
Old 20 February 2014, 15:50   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,166
Quote:
Originally Posted by lordofchaos View Post
@Mark. Hi and thanks for the suggestions. I've had a look at the manual and it mentions this in the command lines options, these are changed in the config file?
--avi-vcodec is a command line option. If you open a Windows command prompt window and run Hatari from the command line, you'd add that option.
Quote:
Originally Posted by lordofchaos View Post
If however I change the line " AviRecordVcodec = 2" to " AviRecordVcodec = 1" It records much faster but there is still stuttering.
AviRecordVcodec = 1 should have the same effect as the --avi-vcodec BMP command-line option. So it seems there's no chance for any improvement beyond what you already have.

If disk bandwidth is the limiting factor, you could try telling Hatari to record its AVI to a RAM disk. There are probably several different RAM drive products for Windows, I'm not familiar with them though. That would eat up a lot of RAM so depending on how much RAM your PC has, and how long the AVIs you want to record are, it might not be practical.

Edit to add: if you set Hatari to double screen resolution (e.g. to show 320x200 low-res in a 640x400 window), try disabling that; it should reduce the I/O bandwidth needed to write the BMP AVI file a lot.

In the Hatari source code (avi_record.c) is a comment about PNG compression: "Compression levels 3 or 4 give good tradeoff between cpu usage and file size and should not slow down Hatari with recent computers." However it seems the compression level is hard-coded to the maximum 9 :
Code:
AviParams.VideoCodecCompressionLevel = 9;	/* png compression level */
Maybe the best solution would be to compile Hatari yourself after modifying the compression level used, or maybe just patch your current Hatari executable to change the level. Then you might be able to create PNG AVIs without slowdown.

Also it seems Hatari's AVI writing is not multi-threaded. Hopefully some future version will fix that, then there should be much less slowdown with multi-core CPUs. Related message on the hatari-devel mailing list.

Last edited by mark_k; 20 February 2014 at 16:08.
mark_k is offline  
Old 20 February 2014, 18:57   #10
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
@Mark_K. My PC has 8 gigs of RAM and an I5 processor so I`m hoping the RAM option you mentioned works out. Changing the resolution sounds like a possible quick fix so I`ll try that out, most importantly I need to keep the quality as high as I can for the comparison videos I`m making.

You've certainly gave me some options to think about, in the meantime I`ll stick with SainT as it's the most viable solution for the moment.
lordofchaos is offline  
Old 20 February 2014, 20:05   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,166
I was bored, so I patched the Hatari 1.7.0 Windows executable to change the PNG compression level. If you download and unpack this archive, replace your hatari.exe with one of those. hatari_0.exe probably uses no compression, so better to try hatari_1.exe to start with. I haven't tested any of them.


Multiupload
mark_k is offline  
Old 20 February 2014, 21:18   #12
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
Thanks. I've tried out a few of the executables with varying degree's of success. Hatari_1.exe works really well but gives out insanely large file sizes, of course..Things start to stutter on Hatari_4.exe. I had been capturing in full screen mode but when I switch to windowed mode and try to record, the emulator just quits straight out I then switch back to full screen and try to capture again, emulator just quits out? Well I'll keep on experimenting and see where I get.
lordofchaos is offline  
Old 20 February 2014, 21:37   #13
s2325
Zone Friend

s2325's Avatar
 
Join Date: Jun 2006
Location: Gargore
Age: 39
Posts: 17,789
Maybe you know that but you can stream to youtube with any emulator by using USB cam. It will not save any file or make slowdown. Just create account, click on upload and select webcam capture. Emulator must be set to window mode.
s2325 is offline  
Old 20 February 2014, 22:02   #14
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL
Posts: 1,690
Quote:
Originally Posted by lordofchaos View Post
Hatari_1.exe works really well but gives out insanely large file sizes, of course..
There is huffyuv or lagarith lossless, open source codec...

http://lags.leetcode.net/codec.html
http://neuron2.net/www.math.berkeley...g/huffyuv.html

as RGB compression is not so efficient, fully reversible YCoCg instead YCbCr can be used to substitute YCbCr.

http://wiki.multimedia.cx/index.php?title=YCoCg
pandy71 is offline  
Old 21 February 2014, 21:59   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,166
It might be worth experimenting with lossless codecs intended for screen capture. After you've finished recording a PNG-AVI using Hatari, reduce file size by converting to a different codec using avisynth or VirtualDub etc. You might find they tend to give better results than lossless codecs designed for real-world video.

CamStudio, open source.

MSU Screen Capture Lossless Codec, not open source but (according to their web page) has excellent compression ratio.

FM Screen Capture Codec

inno Screen Capture Codec (iSCC)

Techsmith Screen Capture Codec (TSCC)

Also the DOSBox PC emulator comes with a Zip Motion Block Video (ZMBV) codec.

Last edited by mark_k; 21 February 2014 at 22:19.
mark_k is offline  
Old 22 February 2014, 16:58   #16
lordofchaos
TinkerTailorContentMaker

lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 41
Posts: 1,132
Thanks guys for the info, I shall try experimenting over the weekend with these suggestions, so many combinations to try it's enough to make your head spin In a good way of course.

@s2325. Have you used this USB Cam before, it records the source directly? Any suggestions for a good one. Cheers.
@mark_K. I`m using the Techsmith Codecs, they work really well, especially with WinUAE.

Last edited by lordofchaos; 22 February 2014 at 17:09.
lordofchaos is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hatari ST emulator for 68K? Angus request.Apps 14 25 September 2013 21:31
Problems with video capture Reasonjp support.WinUAE 1 25 August 2013 03:34
Slow video capture hipoonios support.WinUAE 13 11 August 2012 20:28
1.5.1: Problem with Video capture silk support.WinUAE 16 14 September 2008 11:35
Video Capture Program Techx support.Apps 4 16 January 2006 16:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08340 seconds with 16 queries