Skip to main content

Posts

Overlaying the animated gif logo file on corner of mp4 video using FFmpeg command

  Sometimes, I inspire from some online videos that their logo continiously animated throughtout their length. Hence tried this work and FFmpeg command essentially takes two files as input - mp4 video file and an animated gif, apply various filters and then overlays the gif on the mp4, loops the gif infinitely and saves the final output as mp4 file (without audio). ffmpeg -i input.mp4 -stream_loop -1 -i animals.gif -filter_complex "[1]colorchannelmixer=aa=1,scale=iw*1:-1[a];[0][a]overlay=x='35':y='35':shortest=1" -c:v libx264 -an output2.mp4 Breaking it down -stream_loop -1 - This option tells ffmpeg to loop the gif file indefinitely. -filter_complex - this option is used to specify a complex filtergraph, a chain of filter in a single instance. This complex filtergraph is composed of two filters: a. [1]colorchannelmixer=aa=1 - This filter changes the color channel of the gif file. b. scale=iw*1:-1[a] - this filter changes the scale of the gif. [0][a]overlay=x=...

H264 vs H265

 H.264 and H.265 are video compression standards that are widely used for the recording, compression, and distribution of high-definition video. Both standards are designed to provide high-quality video while using less bandwidth than previous standards, making them particularly well-suited for applications such as streaming video over the internet and Blu-ray discs. One of the main differences between H.264 and H.265 is the level of compression that they offer. H.265, also known as High Efficiency Video Coding (HEVC), is designed to provide higher levels of compression than H.264, allowing it to encode video with the same or even lower bit rates while maintaining the same or higher level of visual quality. This makes H.265 particularly well-suited for applications that require efficient use of bandwidth, such as streaming video over the internet or transmitting video over limited-capacity networks. Another key difference between the two standards is their support for different res...

H265 HEVC - Introduction for beginners

 H.265, also known as High Efficiency Video Coding (HEVC), is a video compression standard designed to provide higher-quality video with the same or even lower bit rates as its predecessor, H.264/MPEG-4 AVC (Advanced Video Coding). It is widely used for the recording, compression, and distribution of high-definition video, and is particularly well-suited for applications such as streaming video over the internet and Ultra HD (4K) and 8K resolution video. The H.265 standard is based on advanced techniques for predicting and encoding the content of a video signal, allowing it to achieve higher levels of compression than previous standards. It uses a technique called block-based motion compensation, in which the video is divided into small blocks of pixels, and the motion of these blocks is predicted and encoded using complex algorithms. This allows the encoder to efficiently represent the motion in a video signal, reducing the amount of data that needs to be transmitted. In addition ...

H264 - Introduction for beginners

 H.264, also known as MPEG-4 Part 10 or AVC (Advanced Video Coding), is a video compression standard that is widely used for the recording, compression, and distribution of high-definition video. It is designed to provide high-quality video while using less bandwidth than previous standards, making it particularly well-suited for applications such as streaming video over the internet and Blu-ray discs. The H.264 standard is based on advanced techniques for predicting and encoding the content of a video signal, allowing it to achieve high levels of compression without sacrificing visual quality. It uses a technique called block-based motion compensation, in which the video is divided into small blocks of pixels, and the motion of these blocks is predicted and encoded using complex algorithms. This allows the encoder to efficiently represent the motion in a video signal, reducing the amount of data that needs to be transmitted. In addition to its use of motion compensation, H.264 als...

Screen-recorder-ffmpeg-cpp - Personal project

The screen-recorder-ffmpeg-cpp project appears to be a relatively small and specialized project that is focused on providing a screen recording utility for Linux systems. It may not be as well-known or widely used as some other open-source projects on GitHub, but it could still be useful for users who are looking for a screen recording solution that works on Linux and uses the FFmpeg library. watch the demo video https://youtu.be/a31bBY3HuxE The screen-recorder-ffmpeg-cpp project is a screen recording utility that uses the FFmpeg library to record the screen of a computer running Linux. The project is written in C++ and uses the GTK+ toolkit to provide a command-line interface recording process. The screen-recorder-ffmpeg-cpp utility allows users to record the entire screen or a specific window, and to choose the audio and video codecs to use for the recording. The utility also provides options for setting the frame rate and bitrate of the recorded video, as well as for choosing the fi...

Wav_Audio_player_SDL project

  The Wav_Audio_player_SDL project is a simple audio player that is designed to play WAV audio files. The player is written in C++ and uses the SDL (Simple DirectMedia Layer) library to provide audio output and a graphical user interface (GUI). demo video youtube The Wav_Audio_player_SDL utility is a cross-platform application that can run on only Linux. The player provides basic controls for playing and stopping audio file. It does not includes a volume control and a progress bar that shows the playback position, but we have a plan and if time permits, we do it in the future. The Wav_Audio_player_SDL project is open-source, which means that the source code is available for anyone to view, modify, and distribute. If you are interested in using the Wav_Audio_player_SDL player, you can clone the project's repository from GitHub and build it from source. source code: https://github.com/abdullahfarwees/Wav_Audio_player_SDL

how to get frames per second value from video file using ffmpeg c++

  To get the frames per second (FPS) value from a video file using FFmpeg and C++, you can follow these steps: Include the required FFmpeg header files in your C++ source code: #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> Open the input video file using the avformat_open_input() function: AVFormatContext *format_context = nullptr; int error = avformat_open_input(&format_context, input_filename, nullptr, nullptr); if (error < 0) { // Handle error } Find the stream information in the input file using the avformat_find_stream_info() function: error = avformat_find_stream_info(format_context, nullptr); if (error < 0) { // Handle error } Find the video stream in the input file using the av_find_best_stream() function: int video_stream_index = av_find_best_stream(format_context, AVMEDIA_TYPE_VIDEO, -1, -1, nullptr, 0); if (video_stream_index < 0) { // Handle error } Get the FPS value from the video stream's codec context using the...