InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Limited functionality with muxer.Demux(...)

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software
View previous topic :: View next topic  
Author Message
dhenrie
Newbie


Joined: 16 Jul 2008
Posts: 5

PostPosted: Thu Jul 17, 2008 11:02 am    Post subject: Limited functionality with muxer.Demux(...) Reply with quote

Note: this is somewhat related to the post "Demuxer.parse() not returning streams"

Let me first thank the developers of pymedia for making this tool - it's been useful for a bunch of tasks that I've already had to do, and it holds a lot of promise, but...

I am having issues with the Demuxer.parse() method. So far, I have only been able to make dump_video and vplayer work with .mpg (as in MPEG1) files, and a single .avi file. After doing some testing, I've found that the stream attribute of the demuxer object (returned by the .parse() method) usually contain 'None'. To clarify, when you have already executed this:

Code:
dm = muxer.Demuxer(format)
f = open(file_name,'rb')
s= f.read( 300000 )
r= dm.parse( s )


dm.streams will either contain a 'None' value or nothing at all. Here's a (messy) list of some stream examples that I've collected (I've replaced the video file names with single letters):

    format: videofilename.ext dm.streams

    A.avi ( None, {'index': 1, 'block_align': 1, 'type': 1, 'frame_rate_base': 1, 'height': 0, 'channels': 1, 'width': 0, 'length': 5, 'sample_rate': 22050, 'frame_rate': 25, 'bitrate': 176400, 'id': 65541})

    B.avi ( None, {'index': 1, 'block_align': 1, 'type': 1, 'frame_rate_base': 1, 'height': 0, 'channels': 1, 'width': 0, 'length': 6, 'sample_rate': 22050, 'frame_rate': 25, 'bitrate': 176400, 'id': 65541})

    C.avi ( {'index': 0, 'block_align': 0, 'type': 0, 'frame_rate_base': 1, 'height': 240, 'channels': 0, 'width': 320, 'length': 62, 'sample_rate': 0, 'frame_rate': 15, 'bitrate': 0, 'id': 14}, {'index': 1, 'block_align': 1, 'type': 1, 'frame_rate_base': 1, 'height': 0, 'channels': 1, 'width': 0, 'length': 62, 'sample_rate': 22050, 'frame_rate': 25, 'bitrate': 176400, 'id': 65541})

    D.mp4 ( {'index': 0, 'block_align': 0, 'type': 1, 'frame_rate_base': 1024, 'height': 0, 'channels': 2, 'width': 0, 'length': 14, 'sample_rate': 44100, 'frame_rate': 44100, 'bitrate': 0, 'id': 86018}, None, None, None)

    E.mp4 ( {'index': 0, 'block_align': 0, 'type': 1, 'frame_rate_base': 1024, 'height': 0, 'channels': 2, 'width': 0, 'length': 44, 'sample_rate': 22050, 'frame_rate': 22050, 'bitrate': 0, 'id': 86018}, None, None, None, None, None)

    F.mp4 ( )

    G.mpg ( {'index': 0, 'block_align': 0, 'type': 0, 'frame_rate_base': 1, 'height': 0, 'channels': 0, 'width': 0, 'length': -2077252342, 'sample_rate': 0, 'frame_rate': 25, 'bitrate': 0, 'id': 1}, {'index': 1, 'block_align': 0, 'type': 1, 'frame_rate_base': 1, 'height': 0, 'channels': 0, 'width': 0, 'length': -2077252342, 'sample_rate': 0, 'frame_rate': 25, 'bitrate': 0, 'id': 86016})

    H.mpg ( {'index': 0, 'block_align': 0, 'type': 0, 'frame_rate_base': 1, 'height': 0, 'channels': 0, 'width': 0, 'length': -2077252342, 'sample_rate': 0, 'frame_rate': 25, 'bitrate': 0, 'id': 1}, {'index': 1, 'block_align': 0, 'type': 1, 'frame_rate_base': 1, 'height': 0, 'channels': 0, 'width': 0, 'length': -2077252342, 'sample_rate': 0, 'frame_rate': 25, 'bitrate': 0, 'id': 86016})

    I.wmv ( )

    J.wmv ( )

    K.wmv ( )

    L.wmv ( )


Only C.avi and all of the .mpg files work. I need to be able to work with at least .wmv and .mp4 files (it would also be nice if pymedia also supported .mov files).

I have:
    Python 2.4.4 (I can't necessarily move to Python 2.5 due to other older programs)
    Windows XP SP3 (I believe it's 32-bit)
    pygame 1.8.0 for Python 2.4
    pymedia 1.3.7.2
    pymedia-examples 1.3.7 (from SourceForge)
    numpy 1.1.0

I do not have:
    Microsoft Visual Studio 2003
    libogg-1.1+
    libvorbis-1.0.1+
    liblame-3.95.1+
    libfaad2

and I have already fixed the video overlay problem in vplayer with " ovl.display(vfr.data) "

I would greatly appreciate any help, even if its something like "sorry, your stuck with only .mpg files, but there's this other python media site that you could check out". Thanks anyways.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software All times are GMT - 8 Hours
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group