Jump to content

Flying Cow


Recommended Posts

After days... months? of toying around with VLC I gave up. I can't compile it, so I won't add video support through VLC :(

But here are the good news:

I downloaded MPlayerHQ, tested it, and it happens to support .avi, .mpg, .mov, .flv and .wmv!

So, I downloaded it's sources, compiled it (I'm using MinGW+MSYS) and it worked! I got mplayer.exe! This may sound trivial, as I just did ./configure and make, but after days of trying to get VLC compiled, I got very happy to get another player to compile as easy as this.

Ok, so, this is what I'm planning:

I'll write an output driver for MPlayerHQ, this output driver in term will have the task to tunnel the video signal (ok ok, video frames) to Flying Cow. Flying Cow will then display the frames as usual (with reflection, etc...) ;)

I hope it works...

Link to comment
  • Replies 229
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

^ Naaah, video isn't the heaviest thing, you forgot the worst one: PDF previews :(

(current implementation works fine with some PDFs and hungs with others)

I agree..i have some trouble with my pdf,i have a little suggestion about this problem...currently if flyingcow was unable to preview a .pdf show a orrible red X...how about recognize when it was unable to preview the file and put a beatifull reflected PDF icon (u can find very nice work on deviantart).

@Leonhart

W-O-W (like windows vista effect XD),the cow version is so LLLLOOOOOOOLLLL

Link to comment

Oh hey Leon,

yup~ like that, cept, it's kinda hard to see a cow hide in that.. could be taken for clouds ..or worse

How about a more exaggerated / minimal spotches, or rather, looking at cowhides, it seems like there's more white than black, or that the cow is more white with black spot patterns over.

oh, and my name's Leon as well :)

Link to comment

@Leonhart:

I like that icon! Hope to see more of it soon. Thanks!

@all:

Non-technical explanation:

FlyingCow will have video support through MPlayerHQ soon! This means you'll be able to play .avi, .mov, .mpeg, .flv and .wmv files without using Microsoft codecs (ok ok, .avi files may use s.o. codecs when no mplayer codec fits, and maybe .wmv does also).

Yes, I said .flv files also.

Technical explanation:

At last!!!! Look at this screenshot:

http://www.matiasmoreno.com.ar/screenshot-...tput-driver.jpg

Ok, let's see:

The command line in the backgroud is mplayer (MPlayerHQ), running in command-line mode.

It is custom version I had just compiled, with a new video output module: flyingcow :-)

On top of it you can see a Form1 window, which in turn gets the output from the flyingcow video output module in mplayer.

Audio is played by mplayer itself.

The reason I need to do stuff this way is to put the video inside an OpenGL texture to render it inside FlyingCow, and to give the mirror effect, etc...

I'm currently using a FileMapping, this is horrible way of implementing but at least is better than using a file itself. I did set the FILE_ATTRIBUTE_BACKUP flag so Windows shouldn't be flushing the file to disk much often (teoretically almost never, but here it seems to flush every 2 seconds) (oh, it may be mplayer reading the file... hahaha).

In a future version I'll plan to use something better, probably a named pipe.

Greetings to everyone!

Link to comment

Ok, I checked and it doesn't write to disk, it was mplayer reading the movie (an mpeg in this case). I played it twice (so it would use the disk cache) and the hard disk led keeps off, so Windows seems not to write the file to disk at all :)

@nick8204:

Do you mean the output plugin for mplayer?

I downloaded mplayer source code, MinGW compiler, MSYS (part of MinGW), MSYS tools or something like that, and MSYS zlib (needed to play .mov files).

Then I got my hands on vo_tga.c which is the most easy to understand video output plugin I found, and wrote a plugin which instead opens a file mapping and writes the video frames there.

Indeed the file is filled with:

command (dword) commands sent from Flying Cow (ok, from the test app by now) (unused up to now).

status (dword) filled by the plugin, it tells if it started playing, stopped, etc...

reserved (dword)

stride (dword) width of a scanline in bytes

width (dword) width in pixels

height (dword) height in pixels

bpp (dword) bits per pixels, this is always 24

timestamp (dword) this is incremented by the output plugin on each frame, so I know when a new frame is available

pixels[] (array of bytes) pixel data

I'm using no mutexes/semaphores, yes this is an ugly implementation, but it works ("first make it work, then make it work right").

Then I edited configure, video_output.c, and maybe some other files I don't remember, then I deleted config.h and config.mak, and run make clean, ./configure and make. This is the unix way to compile programs (mplayer is for unix, but is compatible with windows).

Link to comment

This is the hardest upload I ever had :(

Ok, here is it:

http://www.matiasmoreno.com.ar/flyingcow/d...-2007-12-30.rar

Mirror:

http://www.matiasmoreno.bbt.net.ar/flyingc...-2007-12-30.rar

This new version uses a custom version of MPlayer - The Movie Player to play the movies.

Flying Cow now supports

  • .flv (Flash Video)
  • .mov (Quick Time)
  • .wmv (Windows Media Video)
  • .avi (Audio/Video Interleaved)
  • .mpg/.mpeg (Motion Picture Expert Group).

WARNING: playback is pretty unstable, at least in my machine, and jitters all time. I'm traying to track down this problem.

Link to comment

Sorry, I missposted the 1st link, now is right.

The 2nd link, I checked it and works, but it may not work outside of Argentina (bad ISP hosting service).

I've noticed some Flash Videos dont sync audio/video correctly. This is an MPlayer issue (I'll post a bug report asap to them, VLC player is open source and doesn't desync so maybe they can fix it using it as a reference).

Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...