VideoReader reads ".h264" video compression file with error "Caught unexpected exception of unknown type."
49 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
cui,xingxing
el 29 de En. de 2023
Editada: cui,xingxing
el 27 de Abr. de 2024
Initially when I tried to use the VideoReader function to read the ".h264" video compression format file I got the error "Unable to determine the codec required." Then I learned from the Internet that I needed to install the "Media Player Codec Pack" package to read it correctly, so I successfully installed the package from this link, and when I read it again using VideoReader, I got the following error: "Caught unexpected exception of unknown type."
videoPath = "myvideo.h264";
info = mmfileinfo(videoPath)
info =
struct with fields:
Filename: 'myvideo.h264'
Path: 'E:\workDir'
Duration: 0
Audio: [1×1 struct]
Video: [1×1 struct]
info.Video.Format
ans =
'MPEG2'
ENVIRONMENT: Matlab R2022b, windows 10
Note: Since I installed this package, I can play ".h264" files normally with the windows media player that comes with my windows system.
2 comentarios
Walter Roberson
el 29 de En. de 2023
Use a tool such as VLC to determine which codec was used. The codec is a 4 character code (so it is not 'MPEG2' which is 5 characters)
Respuesta aceptada
cui,xingxing
el 30 de En. de 2023
Editada: cui,xingxing
el 27 de Abr. de 2024
1 comentario
Kevin Wang
el 15 de Ag. de 2023
Editada: Kevin Wang
el 15 de Ag. de 2023
Thank you so much!
Exactly what I needed!
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!