Jump to content

Record video with small CPU?


theYinYeti
 Share

Recommended Posts

Hello,

 

Question is in title. I'll try to be concise in giving some details :)

 

I have a VIA 1GHz CPU. That's not a lot. My video source is a simple saa7134-based Pinnacle "PCTV Stereo", so without hardware encoding (so the CPU has to do everything).

 

Now some facts:

- File size does not matter. I have plenty of space. As long as the DMA 7200rpm harddisk can handle the flow, it's OK.

- File complexity does not matter. I don't have hardware encoding, but I *have* hardware decoding.

- Choice of tools is free. I've wiped the disk clean. I can re-install anything needed.

- I'd like an acceptable quality: I don't want to see many little squares moving around; at a normal distance from TV, I want to see a normal VCR quality (actually, it *is* VCR that I want to record).

- The resulting video file should be read-able by Xine.

 

Given those facts, what is the prefered method for recording a 4/3 video @25fps, preferably 640px-wide, but 320px-wide is OK (in short: record SECAM /dev/video0)?

 

What do you advise? Thanks,

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

Hello Yves

 

I have a VIA C3 just like you...

 

AnneWilson published an extensive step-by-step article on video editing and encoding under MDKL as part of the Mandrake Community Twiki - http://mandrake.vmlinuz.ca

 

Unfortunately, the Twiki is currently offline - although Anne undoubtedly can email you a copy of her article. She is a member of the MUSB - her nickname here is AnneW. If you'd like her other contact details please PM me.

 

I'll see if I have a copy of her article on my iBook *now running Mandrake 10.1 PPC*

 

 

:offtopic: can the via unichrome drivers work with 10.1? I am still using VESA and its very slow

Link to comment
Share on other sites

How fast is a 1Gh VIA CPU? If it isn't comparable to a P4 2.5Ghz I don't think you will get acceptable quality. When I looked for information about TV cards all the advice I could find was go with hardware encoding. I bought a Haupauge PVR250 and haven't regretted it.

 

So my advice is: forget about sotware encoding. Buy a PVR 250

Link to comment
Share on other sites

A VIA C3 1Ghz CPU is 1980 bogomips using a standard kernel. An AMD Duron 950 is approximately 1800 bogomips. And a P4 2.5 Ghz is 4960 bogomips.

 

Sadly, the C3 is nowhere near the same processing power - but in its defence, it also consumes nowhere near as much energy as the P4 either.

Link to comment
Share on other sites

Thanks for replying. TWiki seems to be online so I went there... and got lost. I did not find the page you're refering to. On Mdk Help, I get a list of links I cannot follow. There seems to be a password needed. So I cannot enter the Multimedia section, where I assume the page I want is.

 

As for buying a PVR250... I have thought about it. Unfortunately, I made the BIG BIG mistake of buying the case before the TV card, and the PCTV Stereo (low profile) is the only one to fit in the case...

 

Yves.

Link to comment
Share on other sites

Yes you can record using a 1Ghz or less machine. I have a Athlon 650 using a WinTV card and I can achieve 640x480 captures using nvrec so you should be able to with your machine. There is ffv1rec that is part of the avidemux project which combines nvrec to support more formats than just mjpeg. Mencoder or ffmpeg may work for you but they are too processor instensive for my machine for 640x480 but I can achieve 352x240. I don't know if xine can read .nuv which ffv1rec and nvrec produce. I normally put my final encodes in either mpeg1 or xvid after taking out commericals and what not. I do know that mplayer can read .nuv format though. Hope this helps some.

Link to comment
Share on other sites

Yes tuco, it helps a lot!

 

So to recap, I should install avidemux, inside of which are ffv1rec and nvrec, the former being based on the latter.

Using ffv1rec, I'll record .nuv files that I can edit afterwards using the supplied tools. One of those tools can convert to a more usual format.

 

Is that OK? Or should I also get other tools, apart from avidemux?

Thanks again. Any other advice, anyone?

 

Yves.

Link to comment
Share on other sites

Avidemux and ffv1rec are bunlded together. You will probably need to build from the source inorder to get ffv1rec since I haven't seen an rpm of it. Nvrec doesn't need Avidemux to run. Avidemux is a great GUI for video editing (cutting commericals, reencoding to a final format, so on.) You probably don't need to get anything else to get started.

 

Play around with it and tweak your commandline to your machine. When I have a chance, I will try and dig up my syntax for nvrec since I haven't had time to play around with ffv1rec much. I am hoping that I can get I little more performance out of my captures by not running in KDE or Gnome. I am trying out Xfce which doesn't beat up on my machine so much :P

 

tuco

Link to comment
Share on other sites

  • 1 month later...

I tried nuvrec. It works fine, but the nuvplay tool doesn't suit me, and I wasn't able to compile anything that would convert a nuv file to mpg or mov or avi.

Now I tried mp1e. This one is IMO very good and produces mpeg files to begin with. Unfortunately, I have video/sound sync problems: video is more or less 1 second ahead of sound...

 

I'm getting closer, but I'm not there, yet...

 

Yves.

Link to comment
Share on other sites

If you're going to encode, I would highly suggest to compile from source with all optimisations possible: sse, sse2(?), cmov-instruction, (3dnow: 3dnow doesn't have overflow checking I believe, but this isn't maybe of such importance for encoding ... it's however certainly important for mathematical libraries)... and I think ffmpeg can also use a package called "nasm". I don't know if nasm works for a transmeta-processor, but these processor are 586-compatible and the latest also 686 I believe.

 

I transcoded once an mpeg-4-movie. There was a 1/3 speedup when I compiled th e programs (and dependencies I used) from source. If you specify in you compiler-flags your architecture, it will set some extra flags for your architecture ... (unless maybe you compiled gcc for your transmeta-processor already): the flag is:

 

-march=cputype

 

I looked at "man gcc" and found that the cputype c3 is mentionned. 2 types are mentionned: c3 and c3-2, although there is a remark ... Anyway you could try it.

 

Don't know if it is needed, but if you have the C3-2 which seems to have sse-support, you could add the options:

 

-mfpmath=sse -msse

 

I think that for 3dnow, a program needs to have make explicit use of it (maybe it is possible ...)(and I think this is also for instructions like "cmov"), but sse-instructions can be generated from the code of the program.

 

Just do a "cat /proc/cpuinfo" to see which instructions/flags are available for you cpu.

 

Hopes this helps some ...

 

Maybe you knew this, but it is important that the dependencies (the software on which ffmpeg/transcode/mjpegtools ... relies is compiled form source, with the above optimisations/flags and mayeb other configure-flags (like with the cmov-instruction, 3dnow, ...), nasm, ... mostly the configure-program will optimise the configure-flags normally (not sure abou the compilerflags ... doesn't have to be I suppose), but ofcourse programs like nasm have to be installed ...

 

The performance of ffmpeg and transcode is (highly) dependend on the performance of the software they depend on

mjpegtools might also be interesting. Although you don't need it probably, but mjpegtools has a very nice scaling algorithm!! The/A bi-cubic one? I used it to upscale the mpeg-4 and I couldn't see that it was upscaled, really impressive. The upscaling slowed the encoding by a factor of 2 ... but anyway, the quality of the upscaled picture was nice.

Edited by Michel
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...