当前位置:网站首页>Ffmepg usage guide
Ffmepg usage guide
2022-07-05 04:09:00 【Learning is like sailing against the current. If you don't adva】
1、//Ubuntu Lower installation ffmpeg
sudo apt update
sudo apt install ffmpeg
// Verify the installation , Please use the following ffmpeg -version command , The command shows FFmpeg edition
ffmpeg -version
2、 To print all available FFmpeg The encoder and decoder of
Please enter :
ffmpeg -encoders ( Commonly used to recode )
ffmpeg -decoders
// Inquire about ffmpeg Which container formats are supported
ffmpeg -formats
// Inquire about ffmpeg Which codec formats and codec names are supported
ffmpeg -codecs
// Basic conversion
When using to convert audio and video files ffmpeg, It is not necessary to specify input and output formats . The input file format is automatically detected , And guess the output format from the file extension .
Remove video files from mp4 Convert to webm:
ffmpeg -i input.mp4 output.webm
Remove audio files from mp3 Convert to ogg:
ffmpeg -i input.mp3 output.ogg
The encoding of a video is MPEG4, Want to use H264 code
ffmpeg -i input.mp4 -vcodec h264(or libx264) H264_output.mp4 //input.mp4 It refers to the address of the video to be converted ;output.mp4 Is the storage path of the converted video
ffmpeg -i input.mp4 -vcodec libx265 H265_output.mp4
ffmpeg -i input.3gp -vcodec h263 H263_output.3gp //H263
ffmpeg -i input.webm -vcodec libvpx-vp9 vp9_output.webm
ffmpeg -i input.webm -vcodec libvpx vp8_output.webm
The same is true
ffmpeg -i input.mp4 -vcodec mpeg4 output.mp4
// Frame rate conversion 60 frame
ffmpeg -i 123.mp4 -r 60 456.mp4
//ffmpeg- Modify resolution
ffmpeg -i video_1920.mp4 -vf scale=640:360 video_640.mp4 -hide_banner
ffmpeg -i 4K_120fps_2160-3840.mp4 -vf scale=4096:2160 4k_120fps_4096-3840.mp4 -hide_banner
3、ffmpeg extract mp4 Audio in file , Save as wav file
(1)ffmpeg -i 123.mp4 -acodec pcm_s16le -f s16le -ac 1 -ar 16000 -f wav 123.wav
This creates a wav file , Designated as 16 position 、 Mono 、 The sampling rate is 16k.
among -f wav Is essential , Didn't it , It's generated pcm data , Instead of wav, Pay special attention here .
(2) If you only want to get the original pcm file , You can use the following command :
ffmpeg -i 123.mp4 -acodec pcm_s16le -f s16le -ac 1 -ar 16000 123.pcm
(3)ffmpeg Extract from the video WAV Format audio :
ffmpeg -i .[ Thunder download xunbo.cc] Love apartments Season 2 EP20.rmvb -f wav -ar 16000 2-20.wav
4、ffmpeg Convert other formats of audio to wav Format :
ffmpeg -i 'THE_CROODS__A_NEW_AGE.AC3 5.1 channel .mka' -acodec pcm_s16le -f s16le -ac 6 -ar 48000 -f wav 123.wav
边栏推荐
- 输入的查询SQL语句,是如何执行的?
- 线上故障突突突?如何紧急诊断、排查与恢复
- error Couldn‘t find a package. JSON file in "your path“
- [brush questions] BFS topic selection
- 如何实现实时音视频聊天功能
- Clickpaas low code platform
- 【FineBI】使用FineBI制作自定义地图过程
- Common features of ES6
- UI automation test farewell to manual download of browser driver
- 陇原战“疫“2021网络安全大赛 Web EasyJaba
猜你喜欢

Interview related high-frequency algorithm test site 3

Rome chain analysis

Threejs Internet of things, 3D visualization of farms (I)

UI自动化测试从此告别手动下载浏览器驱动

Wechat applet development process (with mind map)

The new project Galaxy token just announced by coinlist is gal

C语言课设:影院售票管理系统

Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
![[brush questions] BFS topic selection](/img/24/7ec68ef60f94f7b366054824223709.png)
[brush questions] BFS topic selection

我国算力规模排名全球第二:计算正向智算跨越
随机推荐
【UNIAPP】系统热更新实现思路
A real day for Beijing programmers!!!!!
web资源部署后navigator获取不到mediaDevices实例的解决方案(navigator.mediaDevices为undefined)
This article takes you to understand the relationship between the past and present of Bi and the digital transformation of enterprises
[phantom engine UE] realize the animation production of mapping tripod deployment
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
Deflocculant aminoiodotide eye drops
优先使用对象组合,而不是类继承
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
Ctfshow web entry code audit
[phantom engine UE] only six steps are needed to realize the deployment of ue5 pixel stream and avoid detours! (the principles of 4.26 and 4.27 are similar)
FFmepg使用指南
快手、抖音、视频号交战内容付费
C语言课设:影院售票管理系统
Threejs implements labels and displays labels with custom styles
Use object composition in preference to class inheritance
Realize the attention function of the article in the applet
A應用喚醒B應該快速方法
Soul 3: what is interface testing, how to play interface testing, and how to play interface automation testing?
UI自動化測試從此告別手動下載瀏覽器驅動