简体   繁体   English

如何合并多个m4a或音频文件并将其附加到音频标签,并正确显示controller上的时间

[英]How to merge multiple m4a or audio files and attach it to audio tag, and show the time on controller correctly

<audio id="audio" controls>
    <source src="Countdown.m4a" type="audio/x-m4a">
    Your browser does not support the audio element.
</audio>

This is the html element, I want to repeat "Countdown.m4a" three times, and as "Countdown.m4a" is 5 mins longer, the controller slider should show 15 mins instead of 5 mins.这是 html 元素,我想重复“Countdown.m4a”三次,由于“Countdown.m4a”长 5 分钟,controller slider 应该显示 15 分钟而不是 5 分钟。

How to achieve this?如何做到这一点?

tried using, but not able to modify control slider length.尝试使用,但无法修改控件 slider 的长度。 Tried finding how we can merge the files using js, but nothing I could find online.试图找到我们如何使用 js 合并文件,但我在网上找不到任何东西。

Because all a/v media is inherently more complex and involved than it seems (meaning concatenating media is more problematic than you might think for a whole bunch of reasons), your best bet would be to concatenate sound by doing all your work server side, where you can leverage command line apps like ffmpeg.因为所有的 a/v 媒体本质上都比看起来更复杂和复杂(意味着连接媒体比你想象的更成问题,原因有很多),你最好的选择是通过在服务器端完成所有工作来连接声音,您可以在其中使用命令行应用程序,例如 ffmpeg。

That said, check this out: https://mitya.uk/articles/concatenating-audio-pure-javascript , which has a refreshingly thorough client side approach.也就是说,请查看: https://mitya.uk/articles/concatenating-audio-pure-javascript ,它具有令人耳目一新的客户端方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在网页上播放.mp3或.m4a音频并同时显示嵌入式专辑封面? (使用Javascript,HTML5或Flash) - How to play a .mp3 or .m4a audio on a webpage and show the embedded album art at the same time? (using Javascript, HTML5, or Flash) 如何正确流式传输M4A文件? - How to stream M4A files correctly? QuickTime插件无法播放M4A(Apple无损音频)文件 - QuickTime Plugin not playing M4A (Apple Lossless Audio) Files 如何使用javascript随机播放音频标签中的多个音频文件? - How to randomly play multiple audio files in audio tag using javascript? 如何将多个音频文件与 ffmpeg 库合并在一起? - How to merge multiple audio files together with ffmpeg lib? 如何以 mp3/m4a 格式录制音频 JavaScript-recorder.js - How to record audio in format of mp3/m4a JavaScript- recorder.js Rails 4将多个音频文件添加到audio_tag - Rails 4 Adding Multiple Audio Files to an audio_tag 如何将加载的音频设置为HTML Audio标签控制器? - How to set loaded audio to a HTML Audio tag controller? 无法在网页上获取 m4a 音频文件的长度 - cant get length of m4a audio file on webpage 无法使用Wavesurfer播放大型M4A音频文件 - Unable to play large m4a audio file using wavesurfer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM