Why does not the video working from ffmpeg in matlab?

6 Ansichten (letzte 30 Tage)
medic911
medic911 am 7 Mär. 2016
Beantwortet: Muhammad am 5 Sep. 2018
I encoding video with program HandBrake. Then I read this video in Matlab and everything works properly. I encoding video with program ffmpeg. Matlab reads only black frames. Both encoders are h.264 (mp4). Both videos play fine in VLC.
ffmpeg code:
ffmpeg -i Barrier.avi -c:v libx264 -b:v 500k outputt5.mp4

Akzeptierte Antwort

Muhammad
Muhammad am 5 Sep. 2018
Use the video filter for making sure that your output is in YUV420 format (in FFMPEG: -vf format=yuv420p). When you use the yuv444 or yuv422 formats then MATLAB is unable to read the videos properly.
FYI: Did this on MATLAB 2016b and 2017b.
Hope it helps!

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 7 Mär. 2016
Historically there have been some problems with videos that sometimes seem to go away if you use a video editing tool to delete the first frame. No promises.

Community Treasure Hunt

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

Start Hunting!

Translated by