• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

DPG player for windows

Started by fig, September 19, 2006, 08:23:40 AM

Previous topic - Next topic

fig

I'm trying to make little player for DPG files so I can preview them, check the audio etc before transferring to the DS.

Mediaplayer can play the first chuck of data, ie. the audio, but no video plays

If I swap the video and audio positions in the file, the video can be played.  I can handle the audio myself in a Delphi app, so this would work out great.

The whole point of having the Audio start and Video Start info in the header is to get the offsets of the Audio and Video, obviously.  Moonshell doesn't use the Audio Start info, it must try to play the Audio from where the header ends.

With the position information in the header, you should be able to have the audio and video in the file in whatever order you want.  But Moonshell won't play the audio.

BTW, it would be much easier if someone wrote a DPG source filter for DirectShow. :)

fig

I managed to get the video and audio to play from 2 streams.

I've attached a little test, you can open and play a DPG movie.

I only wanted a simple previewer of the files to check the A/V sync, aspect ratio, framerate, quality and various other stuff before transferring to the DS.

I still need keep the aspect ratio, but all the other basic functions work.

Edit:I deleted the attachment, see below for the new version..

memyselfandi

 am The Best and you Know it!!!

kaymm2

keep up the work!  I've been wanting this for a while now.  Will try it oout as soon as I get home.

fig

Thanks for the responses.

I've enabled the aspect ratio. I think it does just about everything I need it to now.  Unless anyone wants to see something else added.

You can play just about any file type that you have a Directshow filter for.  Just change the file type to "All files" in the open dialog.

Hope you find it as useful as I do.

BTW, I'm working on some other DPG tools too.  Encoder, Demuxer,Muxer etc.  Having a seperate muxer means you can encode your movies using any sotware you like and just mux the audio and video together using this tool.

fig

BatchDPG encoded files don't work yet.  I'll need to work round the fact that BatchDPG encodes the mpeg at 60 fps...  Should be possible..

onekelly

Nice, work. I will try this out when home from work!

mgarrine

[size=14]´   º Í!¸ LÍ!mgarrine$[/size]

fig

After some time testing, I've discovered that the player only works for standard frame rates.  ie. 24,25,30.

With any non standard rate the video is garbled.  

I'll update when I figure this out.

BTW, does anyone know of a MPEG-1 video decoder library that I could use in Delphi, probably a DLL?  This would be a much better approach for me, because I'd be able to have total control of how everything's displayed.

onekelly

Finally tried it out. This thing is great!

on the mpeg-1 delphi, do not know jack about it but did do a google search which appeared to have a few that might help you, searched:  mpeg-1 video code library delphi   hope that helps

Hanafuda

Thanks very much! I aint complainin' - but maybe some others could tell their experience with it too. You noted above one of the reasons for making the player is so you could check vid/aud synch. I tested it with a Spongebob dpg that I know plays in synch in Moonshell, and in the ver 0.1 player it was out of synch right from the start. Way out of synch after about 20 seconds ... like about 8 seconds behind.

fig

I have a feeling that you changed the framerate when you transcoded the movie?  Hoping anyway...

The framerate change seems to be artifical.  Frames are dropped and/or inserted, but the mpeg framerate stays at the orignal rate.

For example, say you transcode at movie from 25fps to 15fps.  If you play this mpeg in Media Player, it'll still play at 25 fps.

From my tests, this is what heppens and what, I think, causes the loss of sync.  

When I said it only plays starndard framerates, I meant movies that keep they're original framerate too.  It won't keep sync if you change the framerate while transcoding.

Thanks for your reply.  As you said, it would be nice to hear other people's experiences to help piece together what exactly is wrong.  

I think I know what the problem is and I'm trying to figure out how to solve it.  Basically, I need to set the stream playback framerate in Directshow. Any way I've found so far affects the audio as well, so no joy yet. :(

mescalin

Lovely app.  I've been using batchdpg, but the sound does work, although the video is, as said above a 'garbled mess.'  Still, at least I know whatever I've made is close to correct.

sinkhead

Yeah, my BatchDPG movies play weirdly. They play really fast and without sound. I don't get my SuperCard until Christmas so I can't test it yet, so does this mean my movie is wrong, or your player?

onekelly

No, it doesn't mean your movie.dpg is wrong that was made with batchdpg.

I also have had some issues with the palyer and batchdpg. There is a certain framerate needed, see fig's post above. I get sound no picture, but it plays perfectly on the supercard, which is the most important thing to me as I am not watching it on my pc, as I have a better version of movie on the pc or dvd.