views:

523

answers:

2

Hey all,

I'm pretty noob when it comes to C# but it's probably my best shot at achieving this. So i'm learning as I go, and while this may seem ambitious it's for a good reason. I want to write a Picture-in-Picture style video player that quite simply creates a block of X width by Y height, and a video file can be loaded and started and played. Like a fullscreen video but with no interface (and not fullscreen,) but as a window on top of everything else.

I'm just not sure where to start. This is for a linux system, so i don't want to (and probably can't) use directx. must i tap into opengl to stream video to screen ... and what about codecs? does the system (ubuntu) handle decoding etc, or must that be built into the app?

I'd appreciate any guidelines and tips, as well as any articles or anything that could help.

+4  A: 

If only there was some sort of open-source Linux media player that already existed in C# that you could read how they did it... :)

Paul Betts
Hahah. Thanks Paul :) I knew about Banshee, but didn't know it was done with Mono etc. I'll see what I get from that.However, I still wouldn't mind if anyone had any other comments! :)
David
Well, it is also hard to believe Microsoft uses .NET to create Zune software on Windows. .NET shines in media player field.
Lex Li
+1  A: 

The video application shall have control on:

  • Video demuxing and decoding

  • Video presentation

For the first, I would use ffmpeg (my favourite), but other possibilities are also SDL and xine. For the second, I suggest OpenGL (my favourite... :P), but probably SDL is more appropriate, since you could already use for video decoding.

Surely there are tons of libraries to develop video application. You have to choose.

Note that mentioned libraries may be written in c/c++, and indeed for using them you have C# bindings for calling library routines. You should prefer libraries already exposing C# bindings. The TAO Framework (on sf.net) has already ffmpeg bindings, but probably it won't be updated anymore, and SDL probably have them.

Luca
Use GStreamer instead unless you need to have low-level control, it already has C# bindings and will be much easier to integrate (don't have to worry about actually rendering content, whereas ffmpeg will just provide you uncompressed video/audio streams)
Paul Betts