Skip to main content

Posts

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...

Explain FFmpeg in 2 minutes

FFmpeg is a free and open-source software project that includes a library of tools for manipulating video and audio files. It is commonly used for transcoding, converting, and editing audio and video files, as well as for streaming audio and video over the internet. Here are some examples of what you can do with FFmpeg: Convert a video file from one format to another, such as from AVI to MP4. Extract the audio from a video file and save it as an MP3 or other audio format. Cut a section out of a video or audio file. Join multiple video or audio files together into a single file. Add an audio track to a video file, or add a watermark or other image to a video. Change the bitrate or other encoding settings of a video or audio file to reduce its size or improve its quality. FFmpeg is used by many different software programs and websites, including VLC media player and YouTube. It is a powerful tool that can do many different things, but it can also be complex to use, especially for someon...

A Comprehensive Guide to Encoding H.264 Video with MP4 Container Using Controllable Frame Rate and Bitrate in libavcodec

Introduction If you're working with multimedia applications or video production, you may often find yourself in a situation where you need to encode video with specific settings like H.264 codec, MP4 container, and controllable frame rate and bitrate. libavcodec, a vital component of the FFmpeg multimedia framework, can help you achieve this. In this guide, we will walk you through the steps to encode video with these requirements and introduce you to the concept of presets to control encoding quality. Encoding with libavcodec libavcodec is a powerful library for encoding and decoding audio and video streams. To encode video with H.264 codec and MP4 container while controlling the frame rate and bitrate, you can use the following.   Set Encoding Options: To control the encoding quality, you can set the encoding options using the AVDictionary structure. In this case, we'll focus on the 'preset' option, which defines the encoding speed and quality.  The available presets ...

Many Open Source projects available outside of GitHub and GitLab

 As beginners, We mainly focus on the view that we have in front of us and as a human, we look for where there is a crowd and look mostly where there is most opportunity. But this article aims to look everywhere to gain a broader view.   At the beginning of the software development journey and open source exploring, I felt the same experience as looking into the famous GitHub / GitLab sites. Later for the first time, came to know that there are many open-source projects that are hosted in their system and made publicly available.   Edit: Let's take the examples of these projects for this article. libcamera - An open-source camera stack project dedicated to Linux systems. They hosted the complete source code on their host. They did not host on popular sites like GitHub, or GitLab. source code: https://git.libcamera.org/libcamera/libcamera.git/ Later came to know about the source code hosts by FFMPEG, VLC Media Player also follows a similar style of hosting and some orga...