Demultiplexing QuickTime MOV files for DirectShow - directshow

I'm working on a small project involving QuickTime media files (*.mov) playback. It's a simple output to specialized video card I have in my university lab. The only supported by manufacturer way to work with this video card in Windows OS is to use DirectShow filters. But since I have to use QuickTime video files as stream source I encounter the problem with DirectShow. I can't find any way to demultiplex a source file. There is no problem extracting an audio stream from a QT file but I can not find any demultiplexer which can actually split a video stream from it.
So far I tried Haali Splitter which were recommended for *.mov files by one of my professors but it's unable to correctly split a QuickTime file in to audio and video streams. Is there any other alternatives? Preferably free or open source since while I'm ready to spend a bit on buying QickTime source or slitter filter most of what I found are ridiculously expensive.
I also found the filter developed by River Past which can work as DirectShow filter source. But for some reason while it's working fine with WMP and GraphEdit it refuses to work at all when I'm trying to use it with my program or even in 3rd party graph editing tools. It's just throwing "UNSPECIFIED ERROR" which doesn't make any sense. And GraphEditPlus can't even load this particular filter for some reason. So apparently this filter has some kind of mechanism preventing it's usage with anything else but original Micrisoft GraphEdig and WMP.
And is there any kind of description of QickTime MOV file format? I was thinking about trying to write my own demultiplexer but unable to find any complete documentation describing this format.

Try the MP4 demux filter at http://gdcl.co.uk/mpeg4. It works with many/most MOV files and is open source.
G

Related

What is the best tool to make a CD-ROM Demo Application?

I have to make an application that will do the following:
Open a video file embedded in the application
Open some pdf files, preferably embedded in the application, but if it will have to open externally, it's no problem.
Work in fullscreen on the user computer, with a minimum resolution of 1024x768. I'm thinking about a resolution of 1024x768, centered on a black background.
I was thinking of using Flash, but I don't have much experience, so if there is another easier IDE that creates a Flash application, I would prefer that.
So, if anyone knows any Flash component to do this, I'll be very thankful.
Creating a Flash CDROM takes a little bit of care, but from my experience it's well worth it. From your requirements, the Flash IDE is well up to the task. The common requirements are as follows:
Windows / Mac platform
Flash Projector file
Autorun file (For the Windows platform)
Net access or all local
If your client is happy with creating the CDROM just for Windows, there will be very few dramas - but if they want to create a Mac-friendly version, you can do that too and I will explain afterwards.
Your Flash should preferably be an .exe projector file - the reason for this is so that the Windows user can open your app without downloading a Flash player (If the client wants a CDROM, they probably have limited net access, so this is a good thing!)
Within Flash, you can perform all your standard fs commands including full-screen.
You will likely need an Autorun file so that the user sees your application as soon as you put in the CDROM - simply create a file named 'autorun.inf' in notepad and enter the following:
[autorun]
open=yourProjector.exe
Where 'yourProjector.exe' is the name and path of your projector file.
It sounds like you're going to embed your videos and content in the CDROM - this is usually the ideal case, since your client won't receive annoying security messages, but this can also be a bad thing if you want to correct your content later (spotting errors after a thousand CDROMS have been distributed can be a PAIN).
You can serve some of your content online to avoid this, but it would give your user some ugly messages, so as long as you triple-check your content and embed everything, it would be the best scenario.
Now for a Mac, Apple has done away with autorun features years ago - there is a way to turn it on through Quicktime, but this is off by default for almost all Mac users, and turning it on is not recommended because it makes the Mac vulnerable to the 'Hong Kong Virus', one of the few Mac viruses around.
You can make your CDROM mac-friendly by creating a Mac Projector and adding instructions for how to use it by changing the background image of the CDROM window. I haven't had to do it before, but I hear that it's not too difficult.
You can use the Flash Projector. Here is a tutorial to get you started. Now, you won't be able to embed the PDF files but you can open them easily enough using fscommand("exec","foo.pdf")
You can create an Adobe AIR Application; however it won't run off the CD ROM; it'll need to be installed locally.
If creating a projector from Flash Pro doesn't work; look at a tool like Janus or Zinc

Phonon on Windows

Right now I have Phonon working on windows with a DS backend. However, it will not play certain mp3 files and although it appears to be playing m4a files (the song progress bar keeps moving) no sound comes out. The application is built using PyQt4 on Windows and is aimed at Windows users.
I know that this is not the fault of my program as when I replaced a file with one that did not play normally with one that did, the song played perfectly. I have downloaded phonon vlc, and tried to build it, but I cannot get CMake to create a makefile. Whenever I try, it tells me that the dev-cpp gcc is not able to make a simple test file.
I also tried downloading clementine and amorak to see if I could get that to work, but I have had the same problems there as well. Has anyone run into this sort of problem before?
I've run into the same problem recently. It seems to be that Phonon has a bit of a hissy fit about ID3 tags, particularly compressed ones. I've taken to creating a temporary copy of every mp3 that I open and using mutagen to delete the tags from that copy. I then open the de-tagged temporary file using PyQt/Phonon, and everything works as I expect. BTW, mutagen is awesome.
Phonon does have a bit of a habit of failing reasonably silently. This is what I do: check if your MediaObject is in a Phonon.ErrorState; if so check its errorString(), usually some incomprehensible message. Google this message and try to work from there.
Edit: Hmm, interesting. It's not Phonon having the problem, it's the DirectShow backend not being able to play the file with the compressed ID3 headers. While the "fix" I outline above does work, I found I was still having problems playing other types of files, e.g. .m4a, despite having the right codecs installed.
The solution was to install the K-Lite Codec Pack, and use the Win7DSFilterTweaker tool that comes with it to change the default decoder for the various codec types from "Microsoft" to "ffdshow". You might also need to run the ffdshow audio decoder configuration tool and tick the box marked Show dialog when an unknown application tries to load ffshow in the DirectShow control tab.

Is it possible to open incomplete video-file for playback using directshow?

Is it possible to open incomplete video-files for playback using directshow?
The current solution first downloads the video file (.avi-container, can be h.264, mpeg2, mpeg4) and then starts playback. This can of course be a rather lengty operation.
The downloader fetches the videofile in chunks from a database so in theory it should be possible to open the file during download.
Is it possible to create a Directshow graph that can start the playback during download even if the file is incomplete when playback starts?
The software is written in C++ both server/client.
Thanks,
at the least http://en.wikipedia.org/wiki/VLC_media_player#cite_note-12 will probably do it...
As far as I'm aware, though, you should be able to start the graph as soon as the file exists...as long as it doesn't reach the end during playback while the file hasn't been written yet.
Or are you looking for some filter that will "wait patiently" before replaying?

Displaying a jpeg from a URL in labview

I need to make a labview VI that will display a jpeg image from a URL. (the url is generated based on some data)
I've found a way to display an image from the hard drive (Read JPEG File), so what I probably need is just a way to download it to a temporary file.
All I've found are some low level TCP client VI's. Is there an easier way? If there isn't I can just open a browser window, but I'd rather not.
Have a look at this LAVA post, titled Downloading an image from a Web server using Datasocket.
The only disadvantage is that it is not cross-platform, it will only work on Windows, on Linux I have seen this code killing LabVIEW.
The OpenG Internet Connectivity toolkit has code that is cross-platform.
Ton

Is it possible with AIR to play a video while it is downloaded

The idea is download a video in parts (from different servers) but starting to play before video file is complete.
The issue is that VideoDisplay component doesn't read the video file if it is opened for writing and vice-versa: writing is impossible if VideoDisplay plays the video...
I know I may sound totally off-topic, but you should make sure you've properly considered video streaming thru Flash Media Server, Wowza or Red5 before you put that much effort in downloading a file in chunks. Just a thought..
What about having multiple parts of the video, so playing can begin as soon as first part gets downloaded. So the parts have to be concatenated somehow at client side.
(Additionally, if one's connection is insufficient, showing a loading symbol is fine.)
Open the file in Shared mode, if that is possible with Air. Mainstream OS's (Windows, Linux, MacOS) have this functionality built in.
Use two threads:
In thread 1 (the downloader thread) open the file in Shared mode to allow reading from other threads and processes.
In thread 2 (the player thread) open the file in Shared mode to allow reading and writing from other threads and processes.
Be sure to buffer the beginning of the file so your player will always have something to play and won't choke while playing an incomplete file.

Resources