AronParker / AviRecorder

A recording tool for source-based games.
25 stars 5 forks source link

Some codecs not showing up #15

Open freiz000 opened 7 years ago

freiz000 commented 7 years ago

I want to use x264 but the codec won't show up in AviRec, but it does show up in VirtualDub. I have tried both 32 and 64 bit versions of AviRec and VDub with same results. I do not want to use lossless as video files are too big and I don't want to waste time since I will encode it to x264 later on. I'm using Windows 7.

1avirec

2vdub

freiz000 commented 7 years ago

Wait a minute, I think I just realized something. The x264 and xvid codecs in VDub say "MPEG-4". Does this mean it's for .mp4 files, so .avi can't really use them?

AronParker commented 7 years ago

If they're visible in VDub, they should be visible in the tool. Try downloading the x86 version if you downloaded x64 and try downloading the x64 version if you have the x86 one and see if that helps.

freiz000 commented 7 years ago

Maybe I wasn't clear or you missed it, but I did try that, and unfortunately it didn't help.

AronParker commented 7 years ago

Oh I'm sorry, I misread that. I think I Know where the issue is, x264 is a codec that requires the whole number of frames to be passed to the codec in advance, which the program, as it is a realtime recorder, doesn't know. Now I know that x264vfw works around this, but it's not really a clean solution.

I do think you should only use x264vfw in it's last stage, when you output your final video. If you only wish to record x264vfw, OBS might be better for this unless you can't get a stable framerate in tf2. If you still believe confidently that you need it, tell me and I'll try to add it.

freiz000 commented 7 years ago

OBS unfortunately performs terribly. Don't have that great hardware to record at high graphics settings.

I've been thinking, and honestly, I will (most likely) edit the finished x264 video anyway, so perhaps it's not necessary to make x264vfw functional in AviRec.

To me, the real problem is the file size of the videos, and I think others would agree.

JPGs are way smaller and I see no visual difference between a JPG (set at jpeg_quality 100 in-game) and TGAs. Do you think it would be possible to implement a JPG alternative instead? I actually browsed the code and noticed something about TGA to BMP conversion, So if JPG is converted to BMP then the file size would be pretty much the same and therefore useless to implement?

AronParker commented 7 years ago

Fair enough, I believe you could try MagicYUV aswell which is another lossless codec being highly performant and reduces the original video size to about a quarter of it. But from I've read here, this is not what you're looking for either.

The JPGs vs TGA thing doesn't matter too much, the "huge" TGA frames are deleted as they're processed so they're not too big of a problem, recording them in JPG wouldn't save much because we need to encode them in a video file anyway. I think there is a JPEG encoder (MJPG) which is used in MSI Afterburner (which you could try aswell), but given that this is a realtime recorder aswell you might experience performance problems there too.

Considering the circumstances it might be the easiest thing to just allow H264 and add it as an exception. it's been a long while since I set everything up, I currently don't even have TF2 installed or any other source games so I'd need you to test it. If you're up for that, let me know.

freiz000 commented 7 years ago

I think you may have misunderstood my point on JPG/TGA. I do actually use MagicYUV and Lagarith, my recent video got to 20 GB. That's an enormous size for just a few minutes. If it was uncompressed it would have probably been at 60 GB. If it was possible to have an option in AviRec to use JPG instead of TGA, then an uncompressed video would only be 12 GB, and with MagicYUV, it would get even lower than that.

Like my previous post stated, there wouldn't be any noticeable difference in quality, if JPG set at jpeg_quality 100 would be used. So a JPG option in AviRec may be more preferable.

AronParker commented 7 years ago

Alright well here's the deal, in order to write AVI files using JPEG's you need a codec and sadly I don't know how to produce these. If you mean recording directly to JPEG frames only, the tool doesn't support this unfortunately.

The easiest solution would be to just allow the h264 codec, which would give you the best quality aswell. I can do that, however changing the program to use JPEGs instead of TGAs for recording or creating a codec that encodes and decodes JPEGs in a multimedia stream would be out of the scope of this Project, I lack the motivation to do this. However if anyone wants to make this happen I can gladly give some tips.

I can tweak so that the h264 codec gets available, however not much more I'm sorry.

freiz000 commented 7 years ago

Feel free to add the x264 codec and I will make sure to try it out.

AronParker commented 7 years ago

I added an exception for X264, try to see if these two work:

Release.zip

freiz000 commented 7 years ago

Long story short: x264vfw crashes within a few seconds. The outputted file works but of course it's only like 5 seconds long. Tried a bunch of different settings.

AronParker commented 7 years ago

Well any information about what caused it crash? Some error dialog or some log file?

freiz000 commented 7 years ago

Sorry, I was tired in my last post. When it crashes, there is a blank window that pops up for a short while with the title 'x264vfw log' or something similar. I tried to find the actual file this log is written to, but I just can't find it. Google doesn't provide any help for where this log file may be. The only thing I could find was a "stats" file, so I activated that, but it doesn't actually display any errors.