How are codecs registered? - directshow

I am trying to get a deeper understanding around the codec area and how it all works.
The primary drive is the uncertainty of installing codec packs to deal with certain unplayable videos, which ends up not allowing the playback of those files anyway. This is often later complicated by installing other codec packs on top. I have also noticed that sometimes simply reinstalling a codec pack can cause videos, which were playable before to be unplayable after codec pack reinstall.
What I am curious about the most is what is happening in the background when a codec pack is installed (Shark007, CCCP, K-Lite) - how are codecs registered with different players, windows media player in particular? Is there a list of known codecs in WMP internals which gets new codecs added to? How can I find out whether I have a particular codec for a particular encoding type? How does DirectShow and its filters work together with new codecs?
Most of the information that I have found has been quite top level, with most advice being playing around with codec pack settings and/or installing other codec packs.. :(
Any sort of advice or recommendations for further info on this area (books, links, etc) would be GREATLY appreciated! :)

In Windows the most widely used multimedia API is DirectShow, and as you indicated in question tag you perhaps target exactly it. There are other APIs too. Important note is that DirectShow is NOT the primary API for Windows Media Player: WMP would attempt to play a file through Media Foundation, and if failed, the second attempt would be to leverage legacy DirectShow. Still, DirectShow is the most commonly used in applications.
In DirectShow, the multimedia pipeline is built from filters which are connected into a graph through their pins. The connected structure has the data streamed through, e.g. from file to decoded video/audio delivered to the devices. The codecs are components that frequently used within this pipeline.
The registration of codecs is the scope of authority of Filter Mapper subsystem. It takes care of all registrations and provides connectivity options for Intelligent Connect - the subsystem which connects stuff together, including supplies codecs when they are needed and the application requests the codec to be provided automatically.
The best documentation of the internals you will find on MSDN, under DirectShow.

Related

Directshow capture from avermedia gamer portable C875

I have purchased an avermedia Gamer portable C875 capture device and wish to integrate to it using directshow.
I have tried OBS Studio and this captures fine, however when I try any of my own directshow code in c++ builder I can see the device, but I cannot obtain video format or any video feed.
I have tried datastead ffmpeg components, mitov basic video, winsoft wcamera and FFVCL components, all which are directshow compatible and all of which detect the device but cannot preview or capture any video.
I even used straight forward directshow code from #Spektre which is just a basic wrapper for the windows DirectShow API.
This detects but freezes when calling
hr = graph->AddSourceFilterForMoniker(moniker, 0, dev->filtername, &dev->filter);
and dev->filtename = "LGP Stream Engine"
If I take this device out of the list then directshow driver fails on Select of the "Avermedia C875 Capture device"
I contacted avermedia and they say the device is directshow 10 compatible and no new driver work being done as it is EOL.
Any suggestions as to how I can interface to and capture from this device using directshow? EZCapture works fine, C875 doesn't.
It turns out that the avermedia C875 is not compatible with writing direct to an AVI capture or video render. As it is an obsolete product avermedia are not interested in providing a more compliant directshow driver.
Avermedia gamer lite portable 2 plus, is directshow compliant and does render as well as save to AVI.
I am not sure what OBS does that is different, the project is a bit too complex for me to try and extract just the video recording section to see how it handles things differently.
Thanks for the feedback #Roman, helped me track things down.

open source CMS and server for video streaming platform

I have to propose a platform that allows streaming video services employing the MPEEG-DASH standard. This platform blocks must be implemented with open source tools. I proposed FFmpeg to encode and MP4Box/GPAC tool for encryption and packaging. For the DRM case my propose is to use Widewine (I didn’t find any other open source tool) which is compatible with dash.js (the player proposed by me), it can be integrated to Chrome and according to CastLabs it’s also compatible with MP4Box. So, I have to select an open source CMS, and at the same time I need it to be compatible with dash.js. I read that it’s possible to add any JavaScript to these CMS, that it’s only necessary to create some modules to do so. I’d like to know which one of the following CMS you suggest me: MediaDrop, Drupal or Wordpress.
I also have some doubts about the server. I know that in order to offer this service it only takes a traditional HTTP server. In a first moment I chose Nginx over Apache because the latter presents some problems associated to performance (the server will receive a large amount of simultaneous requests), nevertheless, I discarded Nginx (Nginx-rtmp module) due to its constraints: it’s only for live streaming (I need the service to be offered also on demand) and the inputs must be RTMP. I found something about Nginx-based VOD packager, do you know if this one can be used as a server to offer live and on demand streaming service?
when it comes to DRM you will need other systems than just Widevine to reach all browser platforms, e.g. PlayReady for IE/EDGE or FairPlay with HLS for Safari. Here you can find a overview of the DRM systems for the different browsers: https://bitmovin.com/player-drm-support/
When you already use ffmpeg + MP4Box to encode and package the content, you don't need a dedicated VoD packager support on your webserver, you can just the DASH/HLS content on the HTTP Webserver. Here you can find a tutorial for x264 + MP4Box, maybe that's useful: https://bitmovin.com/mp4box-dash-content-generation-x264/

Displaying different stuff to multiple Projectors.

I want to connect multiple projector to single laptop, I found about VGA Splitter (http://www.kvmswitchtech.com/vga-splitter-350mhz-8-port-p46359.htm) which can use to connect multiple projectors to single PC.
But I don’t want to display whole screen in both Projectors, in short Projectors should display different stuff at same time.
For Example:-
Projector 1 can Display Power point Presentation and Projector 2 can Display the running movie in player.
I got below set of Questions
Is there any Software available to perform this operation?
If I want to write my own application, Is Directshow (Provided by Microsoft ) is good one to start?
Is there any other VGA Programming language available?
Is there any Software available to perform this operation?
The primary question you are going to get here is how the projectors are connected to PC. The device might need specific integration and you're moving the item #2 below immediately. Otherwise it can be a sort of secondary monitor and you can extend your desktop over it, and then any full screen application running on the secondary monitor is going to be projected.
Perhaps, you will find more software choices going to SuperUser.
If I want to write my own application, Is Directshow (Provided by Microsoft ) is good one to start?
As mentioned above, the hardware might need you to use specific SDK from the vendor and this is your starting point. DirectShow is the API that covers multiple related tasks and might be of use here:
it is capable to built media pipelines terminating at DirectShow-compatible video output device (the projector might be not might be not capable/compatible)
it allows you to play media files into your application and otherwise control video/audio and integrate it into higher level software
DirectShow as API does not fully cover requested task, but it definitely relevant might be used in the in-house built Windows based app.
Is there any other VGA Programming language available?
The "language" is not actually language and it is how particular device is integrated with PC. This is typically covered by hardware vendors who provide the hardware with accompanying development kits and samples.

Media player/recorder (phonon)

I would like to develop a media player/recorder.
The primary target platform is Windows, support for other OSs would be nice, but that's not a high priority. It should be able to play formats like wav, mp3, avi. It should also be able to record audio (microphone) and video (webcam or capture card).
As I have some experience with QT and C++, I looked at QT (4.7.2) phonon with DS backend. But unfortunately I was unable to play a simple AVI, even with the MediaPlayer sample that comes with the QT demos. I could only hear sound, but saw no video.
The developer machine is a 64-bit Vista. I also tried it on another 64-bit Vista without any luck. On a 32-bit Win7 (QT MinGW) it then finally worked. But when I copied that MediaPlayer executable and its dlls to the 64bit machines and tried to run it, it again failed.
Is there a known problem with QT phonon on 64 bit machines? I also heard of a VLC phonon backend. Could that be solution? Is QT phonon mature enough to develop a commercial application on top of it? Or is it maybe more wise to access directshow directly?
Thanks
Directshow is just a programming framework or API, it does not guarantee that you will be able to play every possible video format on every computer, since it relies on codecs installed on the system to decompress the audio/video streams. A codec for one specific format might be available in one system an not in anotherone. On top of that, 64 bits architecture adds even more complexity, since codecs built in 64 bits mode cannot be used from 32 bits applications and vice-versa. The issue you are facing on the 32 bits Phonon player is very likelly to be caused by a missing or "not 32 bits compatible" codec.
VLC on the other hand is a self contained application, it does not depend on DirectShow or in any codec installed on the system, so it might be a good idea to use it instead of DirectShow, however you will need to read VLC legal terms and decide if you can still use it for your purposes.

Serving WMV on a drupal site?

I have a WMV file that I need to host on my drupal 6.13 site (on ubuntu 9.x).
Is a there a relatively painless way to do this.
Do I need the "Video" module to do this?
Or can I just install a video player and point my WMV file to it?
My other concern is the user should be able to view this video on my site without needing to download anything, is WMV the appropriate format? I am worry about people viewing this on the mac and ios device.
Should I convert this to another format first?
Can I do all of the above with free software alone?
Thank a lot.
The de-facto standard, especially if you want to target iOS devices, is H.264: WMV is not going to cut it. Most Flash-based players (which you'll need for browsers like IE and Firefox that do not support H.264) also support H.264 video.
From a site administration standpoint, you'll need to either prevent users from uploading non H.264 video, or transcode the files once uploaded. This is not a trivial task, and you should use a contributed module for this. Video is probably the most far along in providing a turnkey video hosting solution.
There is also Kaltura, but it's a commercial service and they have historically failed to address privacy issues despite repeated warnings. There's a new maintainer in charge of the module, independent of the company, and the module may be safer to use than in the past.

Resources