ffmepg is a integrated tool for video encoding/decoding processing as open source project - http://ffmpeg.org
Typical syntax of ffmpeg command is like below:
1. Get Video Information
2. Get Video Information without bannder
3. Converting video to mp4
4. Converting video to mkv
5. Converting video to mp4 without any quality loss
6. Displaying the supported formats by ffmpeg
7. Converting video files to audio files
8. Change resolution of video files
9. Compressing video files
Note crf value 24 is too aggressive, you'd better lower its value,
10. Compressing audio files
11. Extracting images from video
- -r – Set the frame rate. I.e the number of frames to be extracted into images per second. The default value is 25.
- -f – Indicates the output format i.e image format in our case.
- image-%2d.png – Indicates how we want to name the extracted images. In this case, the names should start like image-01.png, image-02.png, image-03.png and so on. If you use %3d, then the name of images will start like image-001.png, image-002.png and so on.
12. Split video files into multiple parts
Below is an advanced version of splitting video files showing the way to implement one command instead of multiple command even though that does not reduce efforts to type the necessary options.
13. Joining multiple video parts into one
For your information, join.txt contains following video files
14. Adding subtitles to a video file
15. Adding multi subtitles to a video file
- Add an image overlay in front of video using ffmpeg — ffmpeg enables you to overlay image on top of the video.
- Burnt-in SRT subtitle based on ffmpeg — ffmpeg provides the straight and easy way to burn-in SRT subtitle. By forece_style, you can customize your subtitle format like font, fontsize,outline,outlinecolor,borderstyle and so on. The disadvantage of burnt-in caption is that can make bad TV experience for those who does not want to see the subtitle on top of the screen. On the contrary, the benefit of the burnt-in subitie is that doesn't require any additional technical tools/modules on the client.
- CEA-608/708 Closed Caption — CEA-608/708 cpations are the standard for Digital Video Broadcasting supporting closed caption as a part of video stream. CEA-608 captions are for NTSC vodeos only and its captions are encoded in the signal's VBI for NTSC. CEA-708 captions are considered for digital television only and are encoded directly into the MPEG data packages. The captions follow the CEA-708-D FCC recommendations.
- Creating a master HLS playlist.m3u8 in FFmpeg — FFmpeg kindly provides a straightforward way can create master HLS playlist. You can simply do it by adding master_pl_name as a part of ffmpeg encoding options. Make sure to require a closed GOP when encoding and to set the GOP size to fit your segment time constraint. For more information, please refer at https://ffmpeg.org/ffmpeg-formats.html#hls https://ffmpeg.org/ffmpeg-formats.html#hls
- Encode mp4 with multi subtitles in ffmpeg — ffmpeg can embed subtitles as a part of tracks in a single file.
- Encoding videos in .ts by FFmpeg — Below example shows how to encode video in .ts by FFmpeg
- ffmpeg overlay effect with fade in/out and alphablending — ffmpeg has a feature to overlay image on top of the video with fade-in and fade-out. It also able to combine with alpha value, so its interaction could be more smoother.
- ffmpeg with NVIDIA CUDA GPU
- Installing FFmpeg on CentOS 7 — sdsds
- Splitting video file by size in bash