How to extract audio from MP4?
Show older comments
I used R2013a version. can i extract audio from MP4 video files?
Answers (2)
Hengameh Noshahri
on 26 Oct 2020
Edited: Hengameh Noshahri
on 29 Nov 2020
2 votes
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 Comments
Walter Roberson
on 26 Oct 2020
Though my memory is saying that .mp4 was not supported by audioread() back in R2013a.
David Winthrop
on 29 Nov 2020
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
on 29 Nov 2020
R2018a documents .mp4 support; https://www.mathworks.com/help/releases/R2018a/matlab/ref/audioread.html -- though you might need to install a codec package .
madhan ravi
on 26 Dec 2018
0 votes
1 Comment
keshav poojari
on 26 Dec 2018
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!