[vlc] Re: HDTV Transport Streams (.ts) and Performance

Sigmund Augdal sigmunau at stud.ntnu.no
Sat Dec 4 13:48:13 CET 2004


HDTV streams are quite extreme in several ways. 

1. The compressed bitrate is quite large, and laptop discs are quite slow.
If I was you, I'd check that my disk is not the limiting factor. You'll need
sustainable read rates of >> 3MB/s. Also try increasing the file-cache
option in vlc preferences.

2. The raw video bandwith (decompressed) is about 100MB/s. This could perhaps
max out memory (at least if you need to do real time processing on such
amounts of data). Also laptops tend to have quite limited cache on the cpu,
which could impact processing of huge amounts of data like this.

3. I don't think OS X exports chroma conversion and scaling of the video
card through any api. So only apple dvd player can use that. Furthermore the
video card perhaps had IDCT acceleration as well, but vlc don't use that
anywhere. Rumor say that the opengl system in in osx can convert YUY2 to
RGB, and do scaling, so using the opengl module will only require vlc to do
YV12->YUY2 conversion (which is cheap in comparison), and graphics card will
do the rest. This should give a noticeable speedup.

Then for your comfort I can inform you that my 2.0GHz P4 laptop are no where
close to playing HDTV in realtime (though my videocard suck in comparison to
yours), in linux.


Sigmund

On Sat, Dec 04, 2004 at 01:52:33AM -0800, Galen wrote:
> I was just thinking here, what about somehow repackaging (but not 
> re-encoding) the stream to play in the Apple DVD Player? I pulls some 
> magic with MPEG2 decoding, thanks to some sort hardware assist and/or 
> amazing optimization. For comparison, my old laptop, an iBook, would 
> play DVDs perfectly with Apple DVD Player. Something like 30-40% of the 
> CPU. Yet not a single DVD would play smoothly with VLC or other similar 
> media players. Higher data rate discs and scenes faired the worst with 
> alternate players, yet not a single skip ever happened with Apple's 
> player. I've seen this phenomenon repeated over and over on many Macs.
> 
> I realize that a DVD-formatted VIDEO_TS folder with HDTV resolution 
> would be way out of spec for DVD playback, but perhaps, just perhaps, 
> it would work with the Apple player. The underlying formats are close 
> enough, I think - MPEG 2, AC3. The Radeon 9700 Mobility in my machine 
> is really pretty powerful in terms of raw function.
> 
> Anybody have a clue to try this technique? Or am I completely and 
> utterly crazy for event thinking this? (If this is the case, please be 
> gentle...)
> 
> If not via the Apple DVD Player, are there any other ways to harness 
> greater hardware acceleration? If the G4 won't do the trick by itself 
> with existing decoders, the solutions seem to fall into the following 
> categories:
> 
> 1) Reduce CPU requirement through shortcuts (with a quality and/or 
> resolution cost I'm sure) or better decoders (not terribly likely)
> 
> 2) Harness the power of my graphics card better
> 
> 3) Re-encode the file such that less processing is required to view it 
> - not very convenient, several hours or more for a single television 
> show as far as I can tell (without using up incredible amounts of drive 
> space)
> 
> Now I'm wondering if it's even reasonably for me to ask my computer to 
> play back HDTV content. So to get a little perspective, let's look and 
> see what PCs require to play back HDTV streams. The pcHDTV requirements 
> (copied and pasted from their site) for playback on an x86 Linux 
> system:
> 
> Intel® Pentium® 1200Mhz or higher
> NVIDIA card with IDCT acceleration for machines under 2000MHz.
> Linux Red Hat Linux 7.2, 7.3, 8.0 or 9.0.
> Sound card with S/PDIF support and external sound system.
> 256 Meg RAM or higher
> 
> Isn't that interesting... it seems my machine is likely faster than 
> those specs given. 1333 MHz G4 CPU - should easily be faster than a 1.2 
> GHz Pentium - and people claim (with some support) that G4s are faster 
> per Mhz than P4s. Video card? I would hope a Radeon 9700 mobility beats 
> a basic Nvidia with IDCT accelation. The remainder of the specs are not 
> even competitive with my setup.
> 
> Yet people running on x86 Linux can play HDTV with those specs, and my 
> machine with better specifications, cannot. It seems pretty clear to me 
> something is really wrong/broken/flawed with playback under Mac OS X. 
> Is it the OS? The decoders? Hardware acceleration (or lack thereof)? 
> What's the hang-up? My $2000 Mac laptop can't play what a $200 Linux 
> desktop off pricewatch.com can do with SETI at Home running in the 
> background.
> 
> So before I sulk in the corner, hopelessly depressed with my computer, 
> can anybody explain the disparity? Or better yet, help me overcome 
> it...
> 
> -Galen
> 
> On Dec 3, 2004, at 11:46 PM, Benjamin PRACHT wrote:
> 
> >On Fri, Dec 03, 2004, Galen wrote :
> >>I'm using VLC to play back .ts files, typically 1080i HDTV MPEG-2. I'm
> >>having performance issues though. Under my configuration, I cannot get
> >>the video to smoothly play. The current video playback is very jerky,
> >>although the audio is fine. I would like to be able to play back the
> >>video smoothly.
> >>
> >>This is my configuration:
> >>Mac OS X 10.3.6 - 100% up to date
> >>PowerBook G4 15"
> >>	1.33 GHz G4 (512 KB L2 cache)
> >>	768 MB RAM
> >>	ATI Radeon Mobility 9700 64 MB VRAM
> >>	1280 x 854 display (built-in LCD)
> >>
> >>I'm willing to recompile, tweak, hack, whatever. Optimally I would 
> >>like
> >>to get playback smooth from the .ts files. Just give me some direction
> >>with what to try, that's all I need...
> >>
> >
> >Well, HDTV streams have always required quite a big CPU for decoding,
> >and I've never seen such a stream played fine on a G4... I don't think
> >recompiling VLC will help (all the available optimisations of VLC are
> >already included in the standard binaries). VLC uses limpeg2 for mpeg2
> >decoding, which is considered as a fairly efficient mpeg2 decoder, and
> >include some altivec optimisations as well. On the other hand, there
> >is certainly still some room for optimisation in VLC's code (debugging
> >the OpenGL vout would be a start), but this would require some time and
> >skills, and I'm not sure even would allow playback of HDTV streams on a
> >G4. BTW, such streams play fine on G5 cpus...
> >
> >
> >-- 
> >BigBen
> >
> >-- 
> >This is the vlc mailing-list, see http://www.videolan.org/vlc/
> >To unsubscribe, please read http://www.videolan.org/support/lists.html
> >
> 
> -- 
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
> 

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list