Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all 1079 articles
Browse latest View live

MJPG encoded media type is not available for USB/UVC web-cameras after Windows 10 version 1607 (OS Build 14393.10 'anniversary)) update

$
0
0
The latest update replaced uvcvideo.sys driver and 
Dshow Camera MF Filter mfksproxy.dll
{95FEE196-49F0-4C30-B16C-22C7B75C18EC} file version: 6.2.14393.0 product version: 10.0.14393.0
and since then the MJPG formats are not available from streaming cameras in both Microsoft Media Foundation and Direct Show.

We have verified that ksproxy still can get to the correct media type but the MMF and DS cannot get MJPEG media type.

In MMF it's been replaced by NV12 unpacked data and in DirectShow it is plainly dropped.

Here is the link for github project that can be build to illustrate the issue:
google: github leokv uvc_mjpg_win10 (because this forum does not allow links)

h t t p s : // github . com / leok7v / uvc_mjpg_win10 


We've verified it on multiple hosts running Windows 10 in different hardware configuration with at least 4 different camera models.

Ability to get MJPG encoded raw frames is very important to us from the performance perspective.

Hope somebody from Microsoft is monitoring this forum and can help.

Leo

leo@zspace.com


Help with movie maker

$
0
0
I'm trying to create a movie and when I click import images they are loading sideways. When I try to rotate them to load straight up they still load sideways HELP? I can't even get started. 

How do I extract color matrix from MP4 an x264 stream in Media Foundation?

$
0
0

I am playing a video (mp4 containing x264 encoded video stream) with a custom player using media foundation.

When I convert the YUV information into RGB I need to account for the color matrix and range used at encode time.

Some of my videos have this information, I can use MediaInfo.exe or FFMPEG to see that it is present.

However, for such videos if I look at the relevant Media Foundation properties (Extended Color Information) the properties are not present in the files.

So, somehow I need to find a way to access the information.

Media Foundation does provide access to MF_MT_MPEG4_SAMPLE_DESCRIPTION and MF_MT_MPEG_SEQUENCE_HEADER for the video stream but I can't find descriptions of what these contain.

I noticed that the MF_MT_MPEG_SEQUENCE_HEADER is much longer for the videos with the information present and this (MPEG Headers Quick Reference) seems to suggest headers might contain the information I need.

I'm looking for Color Range (limited/full), Color Primaries, Transfer Characteristics and Matrix Coefficients (BT.709 etc).

I'd greatly appreciate any help finding this information from a Media Foundation video stream.

Thanks

Jules

Unable to seek output video created with IMFSinkWriter

$
0
0

With Media Foundation, I have successfully been able to extract frames from a source video, by using IMFSourceReader, and create a create a final video, by using IMFSinkWriter.  When I play the video in any player, it plays fine, however, in VLC, I am not able to seek the file.  Other players, like Windows Media Player, do not present this problem. 

So, what is wrong with my destination video?  I've followed the code in the "Using the Sink Writer to Encode Video" tutorial.


Handling of ID3 tags using the Media Foundation API and MP3 (using C++)

$
0
0

I am working on an existing utility that can take an audio file, such as uncompressed audio, and encode it to a different format, such as AAC or MP3. In my case, I am actually doing both AAC and MP3. The media foundation API has made it much simpler than I envisioned it would be, which is great. But I am not having much luck in finding information relating to the writing of metadata, such as title and artist, in the ACC and MP3 file.

Ideally, I would like to write the ID3 tag followed by writing of the MP3 data. I was having some trouble with IMFMetadata so I started to look at ID3Lib. This little library is great but when I am encoding the file to MP3, the encoding process is writing the MP3 data over the top of the ID3 tag data. I cannot find any means to set a file position with the Media Foundation API or a way to tell it to skip the ID3 tag, if present.

I am hoping someone can help point me down the right path.

Any ideas?


Al Pennyworth

Windows 10anniversary ed partition problem

$
0
0
The anniversary edition has made my partitioned F drive disappear.  I can't find it and programs won't access it.  Please help as I need access to this drive.

MFVideoFormat_MJPG: mjpa and mjpb support

$
0
0

I`m trying to read and decode an MOV file with the fourcc mjpa and one file with the fourcc mjpb.

It seems that there are some troubles with the interlaced mode. The IMFSample from the SourceReader has no information about any interlaced settings (e. g. MF_MT_INTERLACE_MODE attribute is not available) and after the decoding, the sample image is only half  the size. In my opinion this is due to the missing settings about the interlaced stuff, because each sample has only one field.

After searching about MJPEG support for the Media Foundation, I have found the following page (https://msdn.microsoft.com/en-us/library/windows/desktop/dd757766(v=vs.85).aspx) where you can read the following sentence:

"The QuickTime container format also supports motion JPEG streams with 'mjpa' or 'mjpb' entries, but the MPEG-4 file source does not provide a complete media type for those types."

Do you have more information about the incomplete media type settings for mjpa and mjpb files? Is it possible to use MFTrace to get more information about the available settings, the sourceReader get by opening this video file?

best regards

saoirse

DirectShow event EC_DEVICE_LOST not being sent after Windows 10 Anniversary update 1607

$
0
0

I have a software that relies on the Window Notification to detect when a USB UVC camera device was disconnected.

The exact same thing as in the following documentation to listen for events:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd390640(v=vs.85).aspx

After the update 1607 EC_DEVICE_LOST is no longer sent for some reason, and with this method does not work anymore.

AMCap a software for UVC windows cameras, does suffer with the same problem, because uses the same method for event handling.

Take a look at: https://github.com/john-peterson/amcap/blob/master/amcap.cpp

What has changed to affect that?



MFDub sample sources are not available anymore

$
0
0
The sample link for MFDub ( http://blogs.msdn.com/b/mf/archive/2010/03/12/mfdub.aspx ) don't work. Where can I get the sample sources, even if they were out of date (in that case, an updated but similar sample is better option, of course) ?

Media Foundation VBR Encoding & Writing

$
0
0
Hello everyone

I'm currently building the Media Foundation Tools for our own video Codec. Therefore, I created the Encoder and Decoder MFT components as well as an ASF File Sink. Since the codec has a variable bit rate by its nature, I figured it should be fairly simple to VBR-encode and write to an ASF file, but still I struggle in achieving this...
At first, I set the MF_PD_ASF_METADATA_IS_VBR attribute on the Presentation Descriptor of the ContentInfo before the Multiplexer gets initialized.
The Multiplexer has the Flag MFASF_MULTIPLEXER_AUTOADJUST_BITRATE set.
Apparently one would need to update the values MFPKEY_RAVG, MFPKEY_BAVG, MFPKEY_RMAX and MFPKEY_BMAX after each call of IMFMultiplexer::End() in the Sink for VBR. So I tried to set something legit for those attributes after each call. Did I get that right?
However, as soon as I enable the following properties on the Encoding Configuration Property Store of the ContentInfo object of my Sink, the Multiplexer object returns the MF_E_LATE_SAMPLE error code on the second Sample of the VBR video Stream...
MFPKEY_VBRENABLED -> TRUE
MFPKEY_PASSESUSED -> 1
MFPKEY_VBRQUALITY -> 90 
Has anyone experienced the same issues or is somebody able to explain to me where exactly which VBR properties need to be set? Also, all these settings have been made on the Sink - is nothing necessary on the Encoder's side?


Thanks already to everyone!
Cheers

Custom Mixer with EVR Presenter sample - Topology resolves successfully but playback freezes

$
0
0

Hi, I'm trying to write a custom mixer that works with the EVR Presenter sample.  I used the MFTrace tool and can see that the topology resolves and the media types set for each node seems correct.  However, once I start playback (IMFMediaSession::Start) it just freezes with no error message. 

I do receive and event MESessionTopologyStatus and it succeeded.  When I check the call stack for the presenter, I see the last function that was called was EVRCustomPresenter::ProcessMessage (MFVP_MESSAGE_BEGINSTREAMING).  This in turn calls EVRCustomPresenter::BeginStreaming() which tells the Scheduler class to start scheduling.  Scheduler is then left waiting for an object in member function Scheduler::SchedulerThreadProcPrivate().

I changed one line of code to use the default mixer and everything plays fine.  So the error is somewhere in my Mixer but I'm not sure where the problem is since I don't see any obvious errors being reported.  I wrote the code for the decoder too so I can see when using the default mixer, the decoder's ProcessInput function gets called.  With my custom mixer, this does not happen.  So it seems like EVRCustomPresenter::ProcessMessage (MFVP_MESSAGE_BEGINSTREAMING) is the last thing called and then playback just waits for something.

I implemented the following interfaces in my mixer (IMFTransform, IMFVideoDeviceID, IMFAttributes, IMFTopologyServiceLookupClient, IMFGetService, IMFVideoProcessor) following the guidelines from MSDN.

I see the EVR querying my mixer for IEVRTrustedVideoPlugin and IMFQualityAdvise but these are optional interfaces.  I am not playing back protected media too.

Is there some step my Mixer is missing that the EVR is waiting for?  Maybe when my Mixer::ProcessMessage(MFT_MESSAGE_NOTIFY_BEGIN_STREAMING) is called, am I supposed to send some notification to the EVR?

Better, yet. Is there somewhere where I can find an example of a custom mixer?

Thanks,

Stan

IWMWriter::SetInputProps does not apply the properties

$
0
0

Hi Community,

I'm trying to write ASF files using the Windows Media SDK. I need to configure the IWMWriter instance to use a resolution of 320x240 pixel for each sample. Therefore, I'm setting a default system profile for the writer (IWMWriter::SetProfileById) and retrieve a pointer to the input properties (IWMWriter::GetInputProps) and media type (IWMInputMediaProps::GetMediaType) I want to modify and use. After modification, I want to set the modified input properties for the writer using IWMWriter::SetInputProps, but actually none of the values are applied to the file I'm creating.

... // First set pointers to the video structures. pVideoHeader = (WMVIDEOINFOHEADER*)pMediaType->pbFormat; pBitmapHeader = &(pVideoHeader->bmiHeader); // Modify resolution in pixels of the bitmap header. pBitmapHeader->biWidth = frameWidth; pBitmapHeader->biHeight = frameHeight; // 3 bytes/pixel, 1 byte for each color value pBitmapHeader->biSizeImage = frameWidth * frameHeight * 3; // Modify rectangle definitions depending on // the new resolution of the video header. pVideoHeader->rcSource.bottom = frameHeight; pVideoHeader->rcSource.right = frameWidth; pVideoHeader->rcTarget.bottom = frameHeight; pVideoHeader->rcTarget.right = frameWidth; // Apply the adjusted type to the video input. HRESULT hr = pProps->SetMediaType(pMediaType); hr = pWriter->SetInputProps(nInput, pProps); ...

I'm happy about every hint I can get! :) What am I doing wrong?

Thanks in advance!

Dennis

An app default was reset

$
0
0
For the last 2 days everytime i turn my computer on i get the message that an app default was reset and it was reset to Microsoft Edge and i have to sign into Firefox and verify my email and reset my web browser to Firefox but as soon as i switch my machine of and back on again all this is lost and i have to do it all over again. Is there anything i can do to make Firefox stay as my chosen eb browser?

Network Path Broken and 3rd monitor cannot be detected

$
0
0

Update broke my computer...

My computer is the host for all files used in the office.  After this update, no one can log into my computer on the network anymore.  It gives error message that "Network path could not be found"  All of my settings are correct - I have triple checked. 

Also, my 3rd monitor cannot be detected- no matter what I do.  

I was on the phone with Microsoft "help desk" yesterday and they could not help with anything.  

I am very frustrated!  It was bad enough that Windows 10 was "tricked" on me to update to it...and now this.  

CaptureEngine video capture sample with AUDIO PREVIEW?

$
0
0

https://code.msdn.microsoft.com/windowsdesktop/Media-Foundation-Capture-78504c83/

What's the best way to get this sample working with audio?

Video and audio capture are working fine but I can not get any audio on preview, just video.

I'm trying to get the Marshall VAC-11SU3 working on Windows 10 desktop.


Win 10 Update - UVC USB Camera with extentions.

$
0
0

1. We are using a EtronTech eSP270 ISP which is a UVC complaint device. EtronTech have extended its features to spin the image by 90 degrees so that third party apps I.E Skype display it in the correct orientation. This involves in installing the modified UVC driver to give us this feature.

This has been working fine on all MS OS's and is working fine on Win 10 X64 1511 (OS build 10586.xxx). However a recent update for Win 10 x64 has broken the camera. Using a   standard UVC driver  it does not crash but the image is displayed incorrectly. When I force our custom UVC driver (supplied by Etrontech)  and run it in any Webcam Application I.E Skype or AmpCap it crashes with a blue screen. The Version that is now broken Win10 X64 1607 (OS Build 14393.187).

Can the MS Camera Dev Team explain what they have changed and a perfectly working camera will no longer work with the latest updates

Encoding HEVC

$
0
0

I am trying to directly encode YUV 1920x1080 into HEVC format.  The encode seems to go ok, and the encoded file size seems right, but when I play it back with the classic media player in Windows 10, all I get is black.  I can play back video encoded with handbrake with the same player.  Does this indicate a problem with the encoding?  I am setting MF_MT_MPEG2_PROFILE to 1 and MF_MT_MPEG2_LEVEL to -1 while using the subtype of MFVideoFormat_HEVC.  The HEVC codec used by foundation apparently only supports MAIN profile and 420 format.  My input is 422.  Not sure there is any way around this limitation.

Ok, I found out that I can play the files on a system that has hardware H.265 decode support only.  They seem not to be able to play on any systems without hardware support or using any 3rd party software.  Is the Media Foundation H.265 encoding that unique??

Thanks


Martin Autry



4K HLS Streaming linked to monitor resolution?

$
0
0

Hi,

We're using Windows 10 and Media Foundation's IMFMediaEngine API to stream HLS content.  We've noticed that the HLS streaming is limited by the monitor resolution, or even by the DPI scaling settings used.  For example on my 4K monitor if I set DPI scaling to 150% (the recommended value) then the maximum stream HLS will select is 2880x1440.

Is there an option, or an attribute I can pass to MediaEngine to prevent this from happening?

I can't find any Media Foundation documentation for the new HLS streaming feature...

Thanks,

IMFMediaEngine HLS Connection Bug

$
0
0

Hi,

We've noticed a strange bug in our app.  If we reload the same HLS stream multiple times (using MediaEngine SetSource), then after about 5 times it no longer loads.  No error is thrown either, it just sits there...

Has anyone else encountered this?

This happens on Windows 10.

Trouble setting the H.264 Encoder's Max Key Frame Spacing.

$
0
0

Hi

I am currently trying to change the max key frame interval of the media foundation H.264 encoder by setting the MF_MT_MAX_KEYFRAME_SPACING on the output media type of the encoder. But every video that I create seems to always default to a key frame interval of 2 seconds.

My current scenario entails setting up a SinkWriter with an uncompressed YUY2 input media type and a H.264 output media type.

The video source is 25fps so for a 1 second key frame interval I set the MF_MT_MAX_KEYFRAME_SPACING attribute on the H.264 output media type to 25 frames. But the H.264 encoder still outputs the key frames every 2 seconds(50 frames).

I also tried setting it to a higher 250 frames(10 second) interval and with the same result.

Am I missing some setting somewhere or is the max key frame interval not configurable on the media foundation H.264 encoder?

I have included two trace statements from my tests with the SinkWriter below:

1. The Media Foundation H.264 encoder being created.
7784,1CD4 12:44:33.39787 COle32ExportDetours::CoCreateInstance @ Created {6CA50344-051A-4DED-9779-A43305165E35}  (C:\Windows\SysWOW64\mfh264enc.dll) @00A5B51C - traced interfaces: IMFTransform @00A5B51C,

2. The output media format set on the encoder with the MF_MT_MAX_KEYFRAME_SPACING=25 attribute.
7784,1CD4 12:44:33.41075 CMFTransformDetours::SetOutputType @00A5B51C Succeeded MT: MF_MT_FRAME_SIZE=3092376453696 (720,576);MF_MT_AVG_BITRATE=3500000;MF_MT_MPEG_SEQUENCE_HEADER=00 00 00 01 67 42 c0 1e 95 b0 2d 04 9b 01 10 00 00 03 00 10 00 00 03 03 21 da 08 84 6e 00 00 00 01 68 ca 8f 20 ;MF_MT_MAJOR_TYPE=MEDIATYPE_Video;MF_MT_MPEG2_PROFILE=66;MF_MT_MAX_KEYFRAME_SPACING=25;MF_MT_FRAME_RATE=107374182401 (25,1);MF_MT_PIXEL_ASPECT_RATIO=4294967297 (1,1);MF_MT_INTERLACE_MODE=7;MF_MT_SUBTYPE=MEDIASUBTYPE_H264

Viewing all 1079 articles
Browse latest View live