Skip to main content

Posts

Showing posts with the label cpp

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