FFMPEG là một công cụ hỗ trợ chuyển đổi định dạng các file audio, và video trên Linux. Nó cho phép mã hóa, giải mã, stream, lọc hầu hết mọi định dạng audio, video ở thời điểm hiện tại. Đây là một ứng dụng hữu ích để phát triển các website chia sẻ, xử lý video như YouTube, Vimeo,…
Trong nội dung bài viết này, mình sẽ giới thiệu đến các bạn hai cách cài đặt FFMPEG:
Sử dụng kho Nux Dextop YUM repository. Sử dụng phiên bản prebuilt 1. Cài đặt từ Nux Dextop YUM repository. Bước 1: Import GPG key và cài đặt Nux Dextop repo. Trên CentOS 7, bạn thực hiện những lệnh sau:
# rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro # rpm -ivh http://dl.atrpms.net/all/atrpms-repo-6-7.el6.x86_64.rpm Trên CentOS 6, bạn sử dụng lần lượt hai lệnh sau:
Bước 2: Cài đặt gói FFmpeg và FFmpeg development Bạn thực thi lệnh sau để cài đặt hai gói ffmpeg và ffmpeg-devel:
# yum install ffmpeg ffmpeg-devel -y
Bước 3: Kiểm tra FFmpeg đã làm việc? Kiểm tra phiên bản ffmpeg đã được cài đặt lên server bằng lệnh:
# ffmpeg -version
Bạn có thể kiểm tra những định dạng được hỗ trợ bằng lệnh sau:
# ffmpeg -formats Cuối cùng, bạn thử thực hiện tải về và chuyển đổi một video từ định dạng .mp4 sang .h246 bằng cách thực thi lần lượt những lệnh sau:
# cd /usr/local/src # wget https://archive.org/download/WoodstockFestivalTrailer/Woodstock_Festival_Trailer.avi # ffmpeg -i Woodstock_Festival_Trailer.avi -vcodec libx264 Woodstock_Festival_Trailer-H264.mp4 Sau khi quá trình chuyển đổi hoàn tất, bạn có thể thấy một file .mp4 mới trong cùng thư mục.
2. Cài đặt FFmpeg từ phiên bản prebuilt Đầu tiên, bạn tải về script chứa kịch bản cài đặt bằng lệnh sau:
# wget https://raw.githubusercontent.com/q3aql/ffmpeg-install/master/ffmpeg-install Bạn phân quyền cho file script ffmpeg-install
# chmod +x ffmpeg-install Cuối cùng, bạn thực thi lệnh sau để tiến hành cài đặt ffmpeg
# ./ffmpeg-install --install release Sau khi quá trình cài đặt hoàn thành, bạn có thể thực hiện các bước kiểm tra FFmpeg tương tự như mình đã trình bày chi tiết ở cách 1.
Ở đây, bạn nhận thấy phiên bản FFmpeg được cài đặt từ prebuilt sẽ mới hơn so với cách cài đặt từ Nux Dextop YUM repository.
Hy vọng bài viết này hữu ích, chúc bạn thực hiện thành công!
If the professional purple cv reviews a student is anticipating does not match the writing, they must check another professional. It could be inappropriate, for example, to choose a critical evaluation over a personal review since the former does not satisfy the requirements.
Delete Post
Are you sure that you want to delete this post ?
Thread was successfully added to your timeline!
Comment reported successfully.
Post was successfully added to your timeline!
You have reached your limit of 5000 friends!
File size error: The file exceeds allowed the limit (5 GB) and can not be uploaded.
Your video is being processed, We’ll let you know when it's ready to view.
Unable to upload a file: This file type is not supported.
We have detected some adult content on the image you uploaded, therefore we have declined your upload process.
Share post on a group
Share to a page
Share to user
Your post was submitted, we will review your content soon.
To upload images, videos, and audio files, you have to upgrade to pro member. Upgrade To Pro
Edit Offer
Add tier
Delete your tier
Are you sure you want to delete this tier?
Reviews
In order to sell your content and posts, start by creating a few packages. Monetization
Pay By Wallet
Add Package
Delete your address
Are you sure you want to delete this address?
Remove your monetization package
Are you sure you want to delete this package?
Unsubscribe
Are you sure you want to unsubscribe from this user? Keep in mind that you won't be able to view any of their monetized content.
Payment Alert
You are about to purchase the items, do you want to proceed?