Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mythtv Optimization Help Needed
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
Tuxuser
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 136
Location: Solingen / Germany

PostPosted: Sat Feb 07, 2004 4:13 pm    Post subject: Mythtv Optimization Help Needed Reply with quote

Hi Folks

I setup a mythtv machine for living room use only. It's a 2400 athlon with a no-name tv card (some Askey type) a Matrox G450 graphics card and of course a harddisk with UDMA 133 (and dma enabled). To use the G450 with TV out, I enabled the framebuffer support.

The problem I'm not able to solve is the choppy video presentation. It looks to me like I have a frame rate of maybe 10 fps but not as it schould be at least 25 Hz (I'm in a PAL country).

Does anybody have an idea how to accelerate the system performance or how to monitor each section (actual data transfer to graphics card and hard disk, µC load). Some setting hints for best PAL software encoding would also be highly welcome.

Thanks!
Back to top
View user's profile Send private message
Griffon26
Retired Dev
Retired Dev


Joined: 12 Nov 2002
Posts: 51
Location: The Netherlands

PostPosted: Sat Feb 07, 2004 8:56 pm    Post subject: Reply with quote

Program a recording. Monitor CPU usage while recording (I recommend gkrellm). It will show you if your computer can do real-time encoding with the current settings.

MPEG4 is way more CPU intensive than MPEG2, so if CPU usage is too high try switching codec.

If the problem is not CPU usage, try decreasing the bitrate... that should rule out a possible I/O bottleneck.

If recording and playback (one at a time) works fine, you can do the same checks for simultaneous recording + playback. (This is also used when you just watch TV, because of the timeshift feature). This is where gkrellm is really more useful than top for checking CPU usage, because gkrellm shows you a small history of it.
Back to top
View user's profile Send private message
Tuxuser
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 136
Location: Solingen / Germany

PostPosted: Sun Feb 08, 2004 10:30 am    Post subject: Reply with quote

Thanks for assistance.

I monitored during Live TV which as you mentioned is the higher load for CPU and I'm able to trim it to 70 % (setting is possible between 50 and 95%) according to ksim. This is possible with RTJPEG as well as MPEG4. With MPEG4 I set the bitrate to 1500 bps and fumbled with the quality slide controles. With this I'm able to set almost everything but still no satisfying framerate. I checked with hdparm my harddisk but I'm getting only the read speed of about 35 MB/sec. How do I check the write speed wich seems more important in this case?
Nevertheless, especially with relatively slow paning of the TV scene you see a jittery picture as mentioned with about 10 frames per second or even lower - something for increasing the sales for aspirin but not watching with joy.
Back to top
View user's profile Send private message
Griffon26
Retired Dev
Retired Dev


Joined: 12 Nov 2002
Posts: 51
Location: The Netherlands

PostPosted: Sun Feb 08, 2004 10:47 am    Post subject: Reply with quote

Do you still have the problem if you record first and play back later?

Have you enabled DMA for your disk? (Looks like you have, but I have to ask)

Is it still choppy if you timeshift a little (by pausing a few seconds in Live TV and then continue)?
Back to top
View user's profile Send private message
Tuxuser
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 136
Location: Solingen / Germany

PostPosted: Sun Feb 08, 2004 5:54 pm    Post subject: CPU load Reply with quote

CPU load in record-only is about 27 to 33 %. DMA is enabled, at least hdparm confirms it. The choppy picture seems to vanish with timeshift or later view. I have to re-check it more often to get rid of my personel bias.
Furthermore I'd appreciate if you could tell me what's your settings for the encoder to give me a further starting point.
Back to top
View user's profile Send private message
Tuxuser
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 136
Location: Solingen / Germany

PostPosted: Sun Feb 08, 2004 6:07 pm    Post subject: CPU Load Part II Reply with quote

I rechecked and found that with MPEG4 my _decoding_ CPU load is 100 %??? I always considered decoding as a lower burden for the CPU. Bitrate is currently at 1449, min and max quality at 8 and frame distance at 4. MPEG sound at 32000.
Back to top
View user's profile Send private message
Griffon26
Retired Dev
Retired Dev


Joined: 12 Nov 2002
Posts: 51
Location: The Netherlands

PostPosted: Sun Feb 08, 2004 6:41 pm    Post subject: Re: CPU load Reply with quote

Tuxuser wrote:
The choppy picture seems to vanish with timeshift or later view. I have to re-check it more often to get rid of my personel bias.

I have read about this before on the net. I suppose it is a bug in mythtv/mplayer/... If you play too close to the point where it is recording, playback seems to overtake recording now and then causing hickups.

Tuxuser wrote:
Furthermore I'd appreciate if you could tell me what's your settings for the encoder to give me a further starting point.

I don't have MythTV working at the moment. I think I used MPEG2 encoding at about 4Mbit for video and PCM 48kHz for audio.

Tuxuser wrote:
I rechecked and found that with MPEG4 my _decoding_ CPU load is 100 %??? I always considered decoding as a lower burden for the CPU.

That is definitely the case. Encoding always takes more of your CPU than decoding. The difference decreases as the bitrate is increased.

There is of course also the exceptional case where you have a hardware encoder, but no hardware decoder. Then decoding would be using more CPU cycles.
Back to top
View user's profile Send private message
Tuxuser
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 136
Location: Solingen / Germany

PostPosted: Sat Feb 14, 2004 7:44 pm    Post subject: Reply with quote

Currently it looks quite good. My settings are:

PAL with 576 x 480 pixel
MPEG-4 coding with 2000 kbit
Max quality 8
Min quality 8
Max quality difference... 6
Scale Bitrate enabled


Another big thanks to Griffon26! :P
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