Nice to meet you
I would like to combine multiple mp3s in php into one file and play it.
<php
$mp1 = '../mp3/1.mp3';
$mp2 = '../mp3/2.mp3';
$mp9 = '../mp3/9.mp3';
$cmd = "cat$mp1$mp2>";
shell_exec($cmd,$mp9,$rtn);
?>
<audiosrc="<?phpecho$mp9;?>"autoplay="true">
Then only 9.mp3 will be heard, and the connection will not work.
Is the 1.cat connection wrong?
2. Where is the combined mp3 stored?Root, under mp3 folder?
3. Can this combined mp3 file be saved as data?
Thank you for your cooperation.
php mp3
cat
.However, there are two disadvantages: "Re-encoding will not be done" and "Tag information such as song title will become inconsistent," so if you want to combine properly, you should use another software for mp3 combination.
File Header for Tags--Audio Data--File Footer for Tags
, and music data is in the format of Frame Header--Audio Byte String
.Therefore, simply cat
the byte column simply puts the tag in the order of the frames, and if you try to force it into an mp3 file, you can read it.However, the tag information that has been shredded is usually lost.
cat
can join successfully.shell_exec()
function receives only one argument.The current source code has three, so something is wrong.exec()
Is it the function ?cat../mp3/1.mp3../mp3/2.mp3>../mp3/9.mp3
, the merge results are stored in the file ../mp3/9.mp3
.File Header for Tags--Audio Data--File Footer for Tags
, and music data is in the format of Frame Header--Audio Byte String
.Therefore, simply cat
the byte column simply puts the tag in the order of the frames, and if you try to force it into an mp3 file, you can read it.However, the tag information that has been shredded is usually lost.
cat
can join successfully.cat
can join successfully.
© 2024 OneMinuteCode. All rights reserved.