Problems with VideoFileReader: Error using coder.internal.errorIf

4 views (last 30 days)
Hallo,
when I am trying to open a .mpg file with the vision.VideoFileReader with
vid = vision.VideoFileReader (videoName, 'ImageColorSpace', 'RGB','VideoOutputDataType',...
'single');
I get the following error message
Error using coder.internal.errorIf (line 9)
Unable to read video from the file. Use dsp.AudioFileReader to read
audio content.
I tried to open a .mp4 file with the vision.VideoFileReader and it works without any problem.
I have already searched the internet for a solution, but I found nothing that solves the problem.
Any ideas?
Thanks, B
  2 Comments
Dinesh Iyer
Dinesh Iyer on 12 Nov 2014
Barbara,
Which platform are you on? If on Windows, can you check if you are able to open this file using Media Player?
What kind of MPG file is this? MPEG-1, MPEG-2? Do you have any additional codecs installed on you system? Also, would it be possible for you to share your file?
Dinesh
Shayma Hamandi
Shayma Hamandi on 12 Apr 2020
I have the same problem
do you fix this?
my video is mp4 but i could not play it with media player just with VLC
and this is the error message
Error using vision.VideoFileReader
Unable to read video from the file. Use dsp.AudioFileReader to read audio content.

Sign in to comment.

Answers (1)

Yusuf Suer Erdem
Yusuf Suer Erdem on 19 Apr 2021
Edited: Yusuf Suer Erdem on 19 Apr 2021
Hi There! I have faced with the same trouble. As I understood that it is about VLC Media Player because 32 and 64 bit versions of it make differences. For my idea, the code requires 32 bit of it but we do not have it. Best practice is using Media Player because on Program Files we do have both versions of Media Player as 32/64 bits.
I converted my .avi to .mp4 and I could work on without problems. Good luck!

Community Treasure Hunt

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

Start Hunting!