[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash] Raw video/audio

From: Craig Kelley
Subject: [Gnash] Raw video/audio
Date: Fri, 21 Mar 2008 10:22:03 -0600

Hello Gnash developers;

I've coded up some kludges to get gnash to spit out raw video and
audio.  It started as a desire to graft XVideo hardware acceleration
into gnash (even my Pentium 4 desktop drops frames when playing a SWF
at full screen with AGG).  AGG only outputs RGB24, and most XVideo
adapters require YUV;  the translation isn't 'cheap' -- ffmpeg's
swscale code has inline MMX and SSE to do the job.

So instead, I had gnash spit out the raw BGRA frames, and the
SDL-mixed line.  Then I used ffmpeg/mencoder to move it to MPEG4 (or
whatever) where XVideo acceleration works fine.

Is any of this interesting to Gnash developers?  The code I have is
quite ugly at the moment.  It could be made into command-line options,
but there are some challenges:

o The video buffer is only exposed in the gui code at the moment, so
this kludge only works in an arbitrary make (eg, gnash-gtk-agg).
There is no natural point in the gnash player to access this
information (AFAICT).
o I haven't looked at the gst libmedia code; I've worked with SDL and
ffmpeg in the past, so I just grabbed the audio stream after mixing
took place.  I then wrapped it up in a pretty wave header so that any
PCM-ish audio player could play it.  I suspect it'd require a
different method (and routing the output filenames from the command
line down, etc.).
o Sometimes (often, actually), the sound inside an SWF begins at a
later time than the "video".  It can also stop.  My current code ends
up spitting out the concatenated streams all run together (which is
fine, for my intended use at the moment).  It could be polished to
output silence during those moments.

Making this code a general patch would require touching a LOT of gnash
code (and a fair bit of work).  Having native XVideo support would be
superior for my first case; but also being able to 'dump' the media
for other formats has some merit as well.  On the other hand, it's
fairly useless for a large set of interactive SWF files (and I have no
idea how XVideo would affect interactivity).

Any thoughts/suggestions?

I love 0.8.2, by the way.  It's amazing!


-- finger address@hidden for PGP block

reply via email to

[Prev in Thread] Current Thread [Next in Thread]