简体   繁体   English

使用ffmpeg提取视频文件的英语音频

[英]Extract the English audio of video file using ffmpeg

I like to extract the English audio stream of a video file using ffmpeg. 我喜欢使用ffmpeg提取视频文件的英语音频流。 Also, if the file doesn't have an English audio stream, I want to extract all audio streams. 另外,如果文件没有英语音频流,我想提取所有音频流。 Preferably with a language suffix in their names, if their languages is known. 如果已知其语言,则最好在其名称中带有语言后缀。

First, you need to submit your file to get informations regarding streams : 首先,您需要提交文件以获取有关流的信息:

ffmpeg -i your_file.mp4

Then you will get all streams corresponding to your file. 然后,您将获得与文件相对应的所有流。 For example : Stream #0:4(eng) for an english subtitle 例如:英文字幕的流#0:4(eng)

Then you can extract audio doing : 然后您可以提取音频:

ffmpeg -i input.mp4 -map 0:4 -c copy audio0.mp3

to extract audio as an mp3 file 将音频提取为mp3文件

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

相关问题 使用ffmpeg从视频文件中提取音频流并输出到单个立体声WAV文件 - Using ffmpeg, extract audio streams from video file and output to single stereo wav file 使用ffmpeg将视频文件与音频同步会返回没有音频的视频 - syncing a video file with audio using ffmpeg is returning a video without audio ffmpeg 如何将文本/数据文件附加和提取到音频或视频 stream? - ffmpeg how to attach & extract text/data file to audio or video stream? 在Unity中使用autogen ffmpeg C#从视频中提取音频 - Extract audio from video using autogen ffmpeg C# in Unity 从具有FFMPEG的视频中提取音频,但持续时间不同 - Extract audio from video with FFMPEG but not the same duration 使用 ffmpeg 从视频中提取每个音频和字幕 - Extract every audio and subtitles from a video with ffmpeg 使用 ffmpeg 和 python 将视频中的所有音频流提取到单独的音频文件中 - Extract all audio streams from video into seperate audio files using ffmpeg and python 在ffmpeg中将其他音频文件与视频(+音频)混合使用 - Mix additional audio file with video(+audio) in ffmpeg 如何使用ffmpeg在特定时间向视频文件添加音频 - How to add audio to video file at a specific time using ffmpeg 使用ffmpeg更改要与视频合并的音频文件的音量 - Change volume of audio file to be merged with video using ffmpeg
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM