当前位置:网站首页>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
边栏推荐
- The new project Galaxy token just announced by coinlist is gal
- DFS and BFS concepts of trees and graphs
- How to use jedis of redis
- Interview summary: This is a comprehensive & detailed Android interview guide
- MacBook安装postgreSQL+postgis
- Use threejs to create geometry and add materials, lights, shadows, animations, and axes
- Containerd series - what is containerd?
- 已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
- Ctfshow web entry code audit
- provide/inject
猜你喜欢
Pyqt pyside custom telescopic menu bar sharing (including tutorial)
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
Why do big companies such as Baidu and Alibaba prefer to spend 25K to recruit fresh students rather than raise wages by 5K to retain old employees?
面试汇总:这是一份全面&详细的Android面试指南
基于TCP的移动端IM即时通讯开发仍然需要心跳保活
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
3. Package the bottom navigation tabbar
MacBook安装postgreSQL+postgis
Uni app common functions /api
Is "golden nine and silver ten" the best time to find a job? Not necessarily
随机推荐
CTF stegano practice stegano 9
“金九银十”是找工作的最佳时期吗?那倒未必
MacBook安装postgreSQL+postgis
【虚幻引擎UE】运行和启动的区别,常见问题分析
Uni app common functions /api
Official announcement! The third cloud native programming challenge is officially launched!
About the project error reporting solution of mpaas Pb access mode adapting to 64 bit CPU architecture
Looking back on 2021, looking forward to 2022 | a year between CSDN and me
Deep learning - LSTM Foundation
Enterprise level: spire Office for . NET:Platinum|7.7. x
Longyuan war "epidemic" 2021 network security competition web easyjaba
How to realize real-time audio and video chat function
Why can't all browsers on my computer open web pages
About the recent experience of writing questions
Rome链分析
【虚幻引擎UE】实现UE5像素流部署仅需六步操作少走弯路!(4.26和4.27原理类似)
Clickhouse materialized view
[wp][introduction] brush weak type questions
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
技术教程:如何利用EasyDSS将直播流推到七牛云?