[GEM-dev] Playing HDV video with frame accurate seeking on Linux

B. Bogart ben at ekran.org
Tue Aug 25 23:02:54 CEST 2009


Hey Max & Roman,

I have not looked at VLC yet, but I did experiment with the mplayer method.

Problem is there is no way to play the video backwards, which is the
main stumbling block there. This makes sense since most video codecs are
meant to play in one direction.

For now I'll tinker with different codecs and see what I get.

One thing that is clear is that the CPU overhead is too high, but the
disk usage very very low. I'd rather balance things out to use more disk
IO to save decoding cycles.

I thought using just mpeg2 iframes would be enough, but I suppose not. I
guess I'll try a massive mjpeg file.

.b.

Max wrote:
> hi,
> 
> you can control VLC by a socket connection and pyext/python like this:
> http://lists.puredata.info/pipermail/pd-list/2009-01/067316.html
> 
> actually while you are at it, it might be interesting for us if you
> compare the two methods.
> 
> m.
> 
> Am 25.08.2009 um 21:45 schrieb Roman Haefeli:
> 
>> hi b.
>>
>> if playing it in Gem is too slow (i guess, not only decoding, but
>> especially in Gem also the transport to the gpu takes quite some
>> processing power), it should be possible to use mplayer to display the
>> movie, while using pd to control mplayer. if it's about displaying
>> movies with 'big' (depends on the computer, of course) dimensions
>> without any further processing, i found this setup to be more performant
>> than playing the movie with [pix_film] directly.
>>
>> just a few hints:
>>
>> $ mknod mplayer.control p
>> $ DISPLAY=:0.1 mplayer -slave -input file=mplayer.control -fs
>> yourfile.m2t
>>
>> DISPLAY=:0.1 assumes, that you have an xserver running on two monitors,
>> so that still can edit the patch, while mplayer is playing in fullscreen
>> mode. you can omitt it, of course.
>>
>> and now you can write mplayer commands to 'mplayer.pipe' from pd using
>> [textfile].
>>
>>
>> [commands(  <- e.g. 'seek -10', 'seek 300' (relative values in seconds)
>> |
>> [t b a]
>> |     |
>> |     [list prepend add
>> |     |
>> |     [list trim]
>> |     /
>> [write mplayer.pipe cr, clear(
>> | /
>> [textfile]
>>
>> !! important!!
>> mplayer HAS to be listening on the pipe 'mplayer.pipe', otherwise pd
>> will hang until 'mplayer.pipe' is flushed (either by mplayer or by 'cat
>> mplayer.pipe').
>>
>>
>> if you find a way, that is less likely to block pd (by not using pipes),
>> let us/me know.
>>
>> roman
>>
>>
>> On Mon, 2009-08-24 at 17:06 -0700, B. Bogart wrote:
>>> Hey all,
>>>
>>> I'm doing a new version of "Step and Repeat" and want to do the video
>>> in HD.
>>>
>>> I'm already shot HDV footage, which plays very well in mplayer, but not
>>> so well in Gem.
>>>
>>> I need to do frame seeking, so I've taken my original HDV (m2t) video
>>> and converted into a large mpeg2 with 1 frame GOPs and loading the TOC.
>>>
>>> Everything plays fine, but the playback is extremely slow.
>>>
>>> What are the best options for HDV playback on linux?
>>>
>>> I could lower the resolution, and load all frames into a pix_buffer.
>>>
>>> I could lower the resolution and just play the file.
>>>
>>> Looks like there is no "RAM" message to load the whole file into RAM and
>>> playing from RAM on linux?
>>>
>>> The target machine is a AMD dualcore 4500+ (or something close).
>>>
>>> Any advice appreciated.
>>>
>>> Anyone know if you can do frame-accurate mpg seeking in mplayer?
>>>
>>> Thanks,
>>> B.
>>>
>>> _______________________________________________
>>> GEM-dev mailing list
>>> GEM-dev at iem.at
>>> http://lists.puredata.info/listinfo/gem-dev
>>
>>
>>        
>> ___________________________________________________________
>> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>>
>>
>> _______________________________________________
>> GEM-dev mailing list
>> GEM-dev at iem.at
>> http://lists.puredata.info/listinfo/gem-dev
> 




More information about the GEM-dev mailing list