Effacer les filtres
Effacer les filtres

Unable to import v210 codec movie file into MATLAB

9 vues (au cours des 30 derniers jours)
MechtEngineer
MechtEngineer le 18 Juin 2014
Modifié(e) : MechtEngineer le 25 Juin 2014
I have some .mov files recorded with a Blackmagic HyperDeck Shuttle, using the inbuilt Apple Uncompressed 4:2:2 Component YCbCr v210 10-bit codec. Windows does not play these files natively. I installed Apple Quicktime and Blackmagic’s Desktop Video for Windows (v10.1) (which contains the v210 codec) and Quicktime plays the files fine.
I have used the following four methods to try to import the movie into MATLAB. I have included the error messages from each of them in case they are helpful for troubleshooting.
Using uiopen
Opens it as a script in MATLAB. The contents seem like gibberish due to the encoding.
Using VideoReader
Error using VideoReader/init (line 447)
File could not be read due to an unexpected error. Reason: No width and height for this File Reason: Unknown error 0xC00D36E6
Error in VideoReader (line 146)
obj.init(fileName);
Error in
readVideoWriteFirstFrameToSameFolder
(line 49)
videoObject = VideoReader(fileAddress);
Using aviinfo
>> aviinfo('C:\Data\movie.mov')
Warning: AVIINFO will be removed in a future release. Use VIDEOREADER
instead.
> In aviinfo at 66
Error using findchunk (line 19)
Incorrect chunk size information in AVI file.
Error in aviinfo (line 93)
[chunk, msg, msgID] = findchunk(fid,'RIFF');
Using mmfileinfo
>> mmfileinfo('C:\Data\movie.mov')
Error using mmfileinfo (line 70)
Could not get file information.
Are the files supported by MATLAB?
In MATLAB®, VideoReader can access most, but not all, of the codecs installed on the OS. VideoReader supports Apple QuickTime Movie (.mov) files. Source: MATLAB Supported Video File Formats
Do I have the codec on my system?
The Mathworks File Exchange script getfourcc.m ( https://www.mathworks.com.au/matlabcentral/fileexchange/28706-list-video-codecs--fourcc ) gives a list of codecs on the system, including “v210”, located at “C:\PROGRA~2\BLACKM~1\BLACKM~1\BMDCOD~2.DLL”. This seems to be referring to the files BMDCodecLib.dll and BMDCodecLib64.dll located in C:\Program Files (x86)\Blackmagic Design\Blackmagic Desktop Video. So it seems like I have the codec, but I can’t tell if it is a 32-bit or 64-bit version.
The Windows Media Player method ( link ) lists the v210 codec as being present on my computer twice. This possibly means I have 32-bit and 64-bit versions of the codec, but I haven't been able to confirm there are two versions.
DMO Blackmagic Design Decoder (DMO) v210, v210
POTENTIAL SOLUTION #1: Install or get access to a 32-bit version of MATLAB
You might be unable to read a video file if MATLAB cannot access the appropriate codec. 64-bit applications use 64-bit codec libraries, while 32-bit applications use 32-bit codec libraries. Source: MATLAB Supported Video File Formats
My current MATLAB version is 64-bit. I installed a 32-bit version of MATLAB on my same system (which various Mathworks sources say is fine). I ran the same commands mentioned previously, and got the same errors. Result: FAILURE
POTENTIAL SOLUTION #2: Obtain a 64-bit version of the codec
For example, when working with 64-bit MATLAB, you cannot read video files that require access to a 32-bit codec installed on your system. You might need to install a 32-bit version of the codec, or create a video file with a codec whose 64-bit version is available and installed on your computer. Source: MATLAB Supported Video File Formats
If the current version I have is 32-bit, I haven’t been able to find a 64-bit version of the codec.
POTENTIAL SOLUTION #3: Edit the movie metadata
Both the VideoReader and aviinfo error messages suggest that the video height and width cannot be determined (presumably from the movie file metadata). Perhaps there is software that allows me to edit this metadata in the movie file?
POTENTIAL SOLUTION #4: Convert the file to another codec
This might be my only option. I want to retain the 10-bit bit-depth, so I can’t use the vast majority of video codecs that are 8-bit. I have used a 10-bit Matrox Video codec that can be imported into MATLAB before, so I might try converting.
It would save time, storage space and uncertainty (of data corruption in the conversion process) if I could import movie files with the v210 codec directly into MATLAB. I would appreciate any suggestions.

Réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by