How to extract audio from MP4?
80 次查看(过去 30 天)
显示 更早的评论
I used R2013a version. can i extract audio from MP4 video files?
0 个评论
回答(2 个)
Hengameh Noshahri
2020-10-26
编辑:Hengameh Noshahri
2020-11-29
Try this:
[y,Fs] = audioread(filename);
audiowrite('outputfile.WAV',y,Fs);
File formats of .avi and .MOV are not mentioned among the accepted input file formats of audioread's documentation ( https://www.mathworks.com/help/matlab/ref/audioread.html#btiabil-1-dataType ), but I tried them in R2020 and they work with this code.
3 个评论
David Winthrop
2020-11-29
This does not work in r2018a:
>> [input_file, Fs] = audioread('2020-11-28 13-44-42.mp4','native');
Error using audioread (line 88)
The file type is not supported
Walter Roberson
2020-11-29
R2018a documents .mp4 support; https://www.mathworks.com/help/releases/R2018a/matlab/ref/audioread.html -- though you might need to install a codec package .
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!