FFMPEG:创建静音.ogg音频文件 [英] FFMPEG: Create silent .ogg audio file

查看:1732
本文介绍了FFMPEG:创建静音.ogg音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在回答如何使ubuntuforums上安静的mp3或wav文件的问题.org FakeOutdoorsman提供以下配方:

In answer to the question "How-to make a silent mp3 or wav-file" on ubuntuforums.org FakeOutdoorsman provided the following recipe:


使用FFmpeg的另一种方法。 WAV中60秒的无声音频:

Another method by using FFmpeg. 60 seconds of silent audio in WAV:

ffmpeg -ar 48000 -t 60 -f s16le -acodec pcm_s16le -ac 2 -i / dev / zero -acodec copy output.wav

MP3中静音音频的60秒:

60 seconds of silent audio in MP3:

ffmpeg -ar 48000 -t 60 -f s16le -acodec pcm_s16le -ac 2 -i / dev / zero -acodec libmp3lame -aq 4 output.mp3

我如何做类似的操作来创建一个无声的.ogg音频文件?

How could I do something similar to create a silent .ogg audio file?

一个网络应用程序,我想创建一个非常短的文件,用于测试浏览器是否预加载音频文件,或者是否等到该文件实际播放才能开始流式传输。

For a web app, I want to create a very short file for testing whether the browser will preload an audio file, or whether it will wait until the file is actually played before starting to stream it.

推荐答案

指定 -acodec vorbis (而不是 libmp3lame ),并将 .ogg 放在输出文件的末尾(代替)。 mp3 )。

Specify -acodec to be vorbis (instead of libmp3lame) and put .ogg at the end of the output file (in place of .mp3).

这篇关于FFMPEG:创建静音.ogg音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆