directshow

Qt播放音视频文件报错DirectShowPlayerService::doRender: Unresolved error code 0x80040266或DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80004005 ()

烂漫一生 提交于 2019-12-02 01:52:11
使用QMediaPlayer和QVideoWidget QHBoxLayout *m_layout= newQHBoxLayout(this); QMediaPlayer *m_player = new QMediaPlayer(this); m_player->setMedia(QUrl::fromLocalFile(QString::fromLocal8Bit("d:/QtTest/111.mp4"))); QVideoWidget *m_videoW = new QVideoWidget(this); m_layout->addWidget(m_videoW); this->setLayout(m_layout); m_player->setVideoOutput(m_videoW); m_videoW->show(); m_player->play(); 代码写起来很简单,编译也能通过,但是运行就会出错 DirectShowPlayerService::doRender: Unresolved error code 0x80040266 如果文件路径不对或者文件名是中文的,则会显示如下错误: DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80004005 () 网上查了下, Qt

Directshow recording/preview problem

笑着哭i 提交于 2019-12-02 00:22:47
问题 I have a project where I need to record a video using DirectShow from a webcam, but I need to be able to stop recording while the preview continues to run. I am using WPFMediaKit http://wpfmediakit.codeplex.com/ The problem is that when I record a video the pause function also pauses the preview pane in the application I am new to DirectShow, any suggestions how is can address this issue or a solution Thank you very much. P.S I use C# & WPF 回答1: I don't know about the WPFMediaKit, but

How can I directly embed a DirectShow Push Source filter in an EXE?

醉酒当歌 提交于 2019-12-01 23:22:46
I have a Delphi 6 program that receives audio from an external program via a socket. Now I want to feed that audio to a DirectShow filter graph I create that routes that audio to different output filters on the PC. I am using DSPACK for my DirectShow filter graph work. I'll be using one of the DSPACK examples that shows how to create a Push Source Filter as my starting point. Is it possible to embed a DirectShow filter directly into my main EXE, or do I have to create an external DLL or AX file and run regsvr32 on it? I'd like to avoid creating an external module otherwise I'll have to create

Real-time video encoding in DirectShow

99封情书 提交于 2019-12-01 17:04:04
问题 I have developed a Windows application that captures video from an external device using DirectShow. The image resolution is 640x480 and the videos saved without compression have very huge sizes (approx. 27MB per second). My goal is to reduce this size as much as possible, so I am looking for an encoder which will allow me to compress the video in real-time. It could be H.264, MPEG-2 or anything else. It must allow me to save the video to disk and it would be best if I also could stream it in

Regarding the scope of Sample Grabber in DirectShow

笑着哭i 提交于 2019-12-01 14:40:45
I have 2 related questions for my web cam live capture application. The webcams capture data in varying formats such as YUY2, RGB24, I420, MJPG etc. I need to convert the captured data to I420 irrespective of the input format. Hence I need to know the current scope/capability of the Direct Show inbuilt Transform filter such as Sample Grabber. Will the Sample Grabber support at least these many transformations? Or will I have to write my own custom filters? Many of the webcams seem to have multiple format output. When I connect Sample Grabber whose media type is Set to I420, will the Sample

Grab Video Stream from FireWire

送分小仙女□ 提交于 2019-12-01 14:19:58
I'm trying to stream a video from a camera ( Sony HVR-Z1E ) over FireWire to my Computer. The incoming pictures/stream shall be processed further by some functions which expect the CVMat format ( from openCV ). Well my problem is now that I have no idea how to grab the stream. Okay openCV 2.1 offers me some methods ( cvCapturefromCam ) , but no matter which parameter I give him, it always gets the stream from the webcam of the laptop and not from the firewire. I heard I need to switch the primary cam in the DirectShow API ( with the Windows SDK ). But I actually don't know how to do that

Get bitmap info from MPEG-2 Program / Transport Stream?

守給你的承諾、 提交于 2019-12-01 14:18:26
In order to render a DirectShow graph in my WPF application, I use a sample grabber to write a bitmap to memory, and read it elsewhere in code. This may seem as a wierd solution, but seems to be the only way to get a WPF brush out of it. The following code gives me the information I need about the bitmap: AMMediaType mt = grabber.GetConnectedMediaType(); VideoInfoHeader header = (VideoInfoHeader)Marshal.PtrToStructure(mt.formatPtr, typeof VideoInfoHeader); header.BmiHeader // ... Now, header.BmiHeader is of type BitmapInfoHeader and provides information such as the width and height of the

Getting MP4 File Duration with DirectShow

自作多情 提交于 2019-12-01 14:15:07
I need to get the duration of an mp4 file, preferably as a double in seconds. I was using DirectShow (see code below), but it keeps throwing a particularly unhelpful error. I'm wondering if someone has an easy solution to this. (Seriously, who knew that getting that information would be so difficult) public static void getDuration(string moviePath) { FilgraphManager m_objFilterGraph = null; m_objFilterGraph = new FilgraphManager(); m_objFilterGraph.RenderFile(moviePath); IMediaPosition m_objMediaPosition = null; m_objMediaPosition = m_objFilterGraph as IMediaPosition; Console.WriteLine(m

change recording file programmatically in directshow

隐身守侯 提交于 2019-12-01 13:21:30
I made a console application, using directshow, that record from a live source (now a webcam, then a tv capture card), add current date and time in overlay and then save audio and video as .asf. Now I want that the output file is going to change every 60 minutes without stopping the graph. I must not loose any seconds of the live stream. The graph is something like this one: http://imageshack.us/photo/my-images/543/graphp.jpg/ I took a look at the GMFBridge but I have some compiling problem with their examples. I am wondering if there is a way to split what exist from the overlay filter and

Simulate a DirectShow Webcam

那年仲夏 提交于 2019-12-01 13:06:21
I am a developer in DotNet. I want to give skype a possibility to add a webcam simulator and send my bitmap frames to the DirectShow simulator. In this case I can draw my images in my application and on skype I can share this images to my friend. I was on: http://msdn.microsoft.com/en-us/library/dd407344%28VS.85%29.aspx but it's no Dotnet and I am not sure what example I should believe in. I also saw: http://directshownet.sourceforge.net/ But as far as I undestand, here I cannot do with this framework what I need, or can I? My question is: What is basically needed to create such an DirectShow