dtra49684 2011-03-15 15:42
浏览 22
已采纳

在linux命令行中将循环轨道嵌入到MP3中?

I'm working on a site for someone where they are inviting their music artists to submit their MP3s for others to pick up and use in their own work - for a price of course. To prevent the artists track from being ripped off by unscrupulous individuals - my plan is to loop a vocal track underneath the 'preview' version and make it useless... and then serve up the clean version to people who have paid for the rights.

I'm using PHP & running on a Linux server - and it seems like a pure PHP solution is not the way to go, with the preference being using an exec() of a command line program to mix the tracks at the point of upload. I need something quick and reliable.

Unfortunately I don't know of any such tools and my searching has come up blank. Can anyone suggest where I might find something? It doesn't have to be free, but it has to be reasonable - and more importantly - simple to work with via PHP.

  • 写回答

1条回答 默认 最新

  • doujiao1948 2011-03-15 15:45
    关注

    you can unpack the MP3s to raw (16bit signed) using madplay. then for mixing the two file, read samples and sum them. write the result in a raw file and repack to MP3 using LAME. You can prolly implement that in C or PHP.

    Mixing samples is pretty easy : sample = sample1 + sample2; just take care about saturation.

    If you don't feel doing that by code, you can use SOX http://sox.sourceforge.net/ it's command line based sound manipulation program. It's supposed to be able to mix sound tracks.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥20 jupyter保存图像功能的实现
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
  • ¥15 NAO机器人的录音程序保存问题
  • ¥15 C#读写EXCEL文件,不同编译
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键