x264 crf and Matlab processing >> FORUM
forum

forum



SearchSearch   Users   Registration   Entrance
Today: 21.07.2026 - 16:24:15
Pages:  1  

x264 crf and Matlab processing

MessageAuthor

Hi, Did anyone experienced the following problem or know how to resolve it? 1. I encode a video using the following: >> ffmpeg -i input -c:v libx264 -preset slow -crf 22 -c:a copy output.avi 2. The generated *.avi needs to processed by using Matlab. One reason is to compute VQM metric of it. So, I do like this: >>vid1=VideoReader('*.avi'); >> frame_vid1=read(vid1,1); Following error occurs: Error using VideoReader/read The frame index requested is beyond the end of the file. What can be the solution?




PBalla

registered user


Statistics:
Messages: 685
Registration: 02.07.2003
01.05.20 - 17:13:20
Message # 1
RE: x264 crf and Matlab processing

This is most likely due to H.264/AVC being muxed into an AVI file. AVI requires "hacks" to play formats with b-frames as the frames are not stored in the same order that they are displayed. Either ffmpeg doesnt apply these "hacks" or the AVI reader on your system cannot understand these changes (or both). Does matlab support opening MP4 files or MKV files? If not, you should complain to the matlab people since the AVI format is about 10 years out of date.




Christian

registered user


Statistics:
Messages: 341
Registration: 09.15.2002
01.05.20 - 17:18:13
Message # 2
RE: x264 crf and Matlab processing

Can Matlab not read MP4 files by now? If not, you could first decompress the H.264 file to a lossless format, like HuffYUV. This should work fine from AVI. BTW: You can calculate VQM with the , which supports Avisyth input. So you can easily load pretty much everything, e.g. via FFMS2 plug-in or via DirectShowSource.




BGReddy00

registered user


Statistics:
Messages: 301
Registration: 08.14.2003
01.05.20 - 17:21:55
Message # 3
RE: x264 crf and Matlab processing

Thanks for the comments! By the way, same happens if I encode it to a '*.mp4' file.




Digitalwave

registered user


Statistics:
Messages: 3,380
Registration: 09.28.2001
01.05.20 - 17:32:04
Message # 4
RE: x264 crf and Matlab processing

Its also possible that ssuave isnt running on windows. Matlab does run on unix/linux and OS X. If thats the case, you might have to poke Mathworks and see if they are willing to maybe add that in to their next version.




OxfordM3

registered user


Statistics:
Messages: 51
Registration: 02.06.2002
01.05.20 - 17:35:31
Message # 5
RE: x264 crf and Matlab processing
Turn all tracks down at once. : Previous topicNext topic: daisy chain firewire
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants