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.
536 PHP ssh2_scp_send fails to send files as intended
536 Understanding How to Configure Google API Key
541 Who developed the "avformat-59.dll" that comes with FFmpeg?
624 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
536 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.