pass a command to cmd
이전 댓글 표시
Hi all,
I want to append several mp3 files using cmd. Files are under different folder, so I need to first swith to the path:
cd /b E:\Voice\Folder 01
Then need to exclude the following:
copy /b 1.mp3+2.mp3+3.mp3+4.mp3 All.mp3
To append all mp3 files to a single file.
Does anyone know how can I do that?
Thanks.
댓글 수: 4
This isn't a MATLAB issue. That's not how you concatenate files, and no, just using cat on mp3 files won't necessarily produce a usable file either. Depending on the settings of the files and what's trying to read them, a directly concatenated file may only be readable up to the end of one of its segments. Metadata will be effectively obfuscated as well.
I don't know that windows has any system utilities for processing media files, so someone else will have to recommend a method if you want to do it outside of MATLAB.
If you want to do it in MATLAB, you can use audioread, resample if necessary, concatenate the vectors, and write it out with audiowrite.
Sonima
2021년 11월 11일
Walter Roberson
2021년 11월 12일
The depths of my memory are saying that mp3 files were defined in a way that you can concatentate them. mp3 is a container format, and the music chunks are identified within the container, so the question becomes whether the reader will stop at the end of the "first" container. mp3 container does not assume that there is only one music chunk in a file.
DGM
2021년 11월 12일
I've done it before and it usually works when the files are similar, but as you said, it depends on the reader and it seems to depend on the files being concatenated. If I concatenate a file with itself, Totem plays both segments fine. If I pick two files with differing bitrate or other options, Totem may or may not pick up the second segment. Similar happens with Audacious, though sometimes it displays incorrect track times when it does succeed.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!