Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Encoding tv to xvid in realtime?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 367
Location: Leamington Spa, Warks, UK

PostPosted: Fri Feb 02, 2007 12:36 pm    Post subject: Encoding tv to xvid in realtime? Reply with quote

I have a freevo-based PVR and media organiser that does everything I want it to, except when it comes to recording TV. I can record my DVB-T stream directly to disk, but it takes up a *lot* of space. I've tried having mencoder transcode to xvid on the fly, but my computer can't keep up and I drop frames. (It's an old sempron 1800 or so)

What is the minimum CPU spec that I would need to upgrade to, to accomplish this?

I realise that I could transcode the files post-recording with some kind of script, but I'd like to have it happen in realtime if it's possible.
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Feb 02, 2007 3:36 pm    Post subject: Reply with quote

Does it have to be xvid? I'm not up to par with codecs nowadays anymore, but usually newer codecs achieve better compression & quality with higher CPU requirements. I'd bench all codecs there are (even or especially the old ones), maybe try a high bitrate MPEG-2 and see if that works in realtime. The result won't be small, but anything that is not quite as huge as a raw stream should probably be sufficient. You can then re-encode the MPEG-2 or whatever stream to whatever cpu intensive killer machine codec you like afterwards (maybe at the cost of some little extra quality due to encoding twice, but that's the same you get with dvd rips, so it's probably not that much of a problem).

There is hardware for encoding stuff on the fly in real time (mpeg de/encoder cards), maybe there even are such cards for xvid nowadays, I don't know. If you always want to encode the latest / highest quality codec in realtime, even the fastest desktop cpu won't be sufficient, as these codecs are optimized for size & quality, not encoding speed or even on the fly encoding. Even xvid requires you, if you want optimal results, to encode with two passes.
Back to top
View user's profile Send private message
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 367
Location: Leamington Spa, Warks, UK

PostPosted: Fri Feb 02, 2007 4:00 pm    Post subject: Reply with quote

IIRC the data coming in (a DVB-T transmission) is already high-bitrate mpeg2. The data coming in is, on average, somewhere over a gigabyte per hour. It's not the end of the world storing that much, but my disk does tend to fill up quickly.

If it's simply impossible to transcode to xvid on the fly, is there an 'interim' codec that might be a good tradeoff between size/speed?
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Fri Feb 02, 2007 6:00 pm    Post subject: Reply with quote

mr-simon wrote:
If it's simply impossible to transcode to xvid on the fly, is there an 'interim' codec that might be a good tradeoff between size/speed?

lavc mpeg4 is faster than xvid I think, you could try that. But your machine doesn't sound that slow, you should be able to do it. What settings did you try? I have a Pentium M 1.73 GHz and can encode xvid in realtime. I'm recording analog TV though, but there shouldn't be much difference. These are my mencoder settings for xvid:
Code:
-ovc xvid -xvidencopts max_bframes=0:me_quality=4:vhq=0:bitrate=1400
Bframes slow down encoding a lot, so I turn them off and you can lower me_quality to get even faster encoding.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sat Feb 03, 2007 12:36 am    Post subject: Reply with quote

mr-simon wrote:
The data coming in is, on average, somewhere over a gigabyte per hour. It's not the end of the world storing that much, but my disk does tend to fill up quickly.


One gigabyte per hour sounds fine to me - at least if you're thinking of upgrading, I'd just buy a large disk instead of spending a lot of money on a new CPU. Assuming that it'd require a new board and cooling solution as well, an additional disk should be way cheaper to handle. Unless you want to record TV 24/7 it shouldn't pose too much of a problem storage-wise.
Back to top
View user's profile Send private message
rtomek
Apprentice
Apprentice


Joined: 05 Jan 2007
Posts: 210
Location: Chicago

PostPosted: Sat Feb 03, 2007 3:41 pm    Post subject: Reply with quote

I 2nd frostschutz... A huge disk would be a way better idea than encoding on the fly in xvid. I have tivo, but i bought a huge disk drive to put in there so that I could get the highest quality recording then do what I want with it when I transfer it to the computer. Disk space is cheap nowadays and if you have 100 hours of stuff (120 GB drive in your case) and fill up your drive you probably won't get around to watch most of that stuff anyways and you can start deleting shows. Also, 1 GB per hour seems small... that is the rate I get on my tivo when I use lowest quality recording, my full quality takes something like 3 GB/hr, so you should be happy with only 1 GB/hr .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum