Click here to Skip to main content
15,892,537 members
Everything / Ffmpeg

Ffmpeg

ffmpeg

Great Reads

by Clayton Rumley
There are those who think I am crazy, and this just might be the proof.
by Bjørn
Using the FFmepg.exe to create video snapshots
by Junian Triajianto
Using the power of Livestreamer and FFmpeg, twitch stream can be recorded every time a user goes online.
by Bohdan Stupak
A simple snippet of how you can convert video in .NET Core

Latest Articles

by V. Subhash
Compile FFmpeg v7.0 CLI from source and check out some of its new features
by V. Subhash
A simple fix for excessively bright video and low-volume audio
by Tough Developer
The V380 Pro wireless CCTV camera is available from many sellers on AliExpress for as low as 15USD. It has 10
by V. Subhash
How to get compile the latest FFmpeg source code and try out some new features

All Articles

Sort by Updated

Ffmpeg 

12 Apr 2024 by V. Subhash
Compile FFmpeg v7.0 CLI from source and check out some of its new features
1 Feb 2024 by El Bunda7
I had the same issue. I was redirecting the standard output, but FFmpeg outputs text messages to the standard error. static void Main(string[] args) { ProcessStartInfo startInfo = new ProcessStartInfo(); ...
5 Nov 2023 by V. Subhash
A simple fix for excessively bright video and low-volume audio
14 Aug 2023 by Richard MacCutchan
Support and maintenance of libav was abandoned some years ago according to Libav - Wikipedia[^].
14 Aug 2023 by ilostmyid2
By using ffmpeg or ffplay you may specify -rtsp_transport tcp switch to force the rtsp stream be opened via tcp. In programming, I'm using libav to open the rtsp stream with the following code: AVDictionary *options = NULL; av_dict_set(&options,...
5 Jun 2023 by Nobunaji
I'm trying to detect the silence inside an audio file using ffmpeg's silencedetect filter and outputting the timestamps inside a txt file. The function runs but no file is created. What I have tried: I've tried the following code : return...
4 Jun 2023 by Nobunaji
Hi, i have the following complex_filter in a fluent-ffmpeg function : .complexFilter([ { filter: "volume", options: [string], inputs: "1", outputs: 'audio', eval: 'frame' }, { filter:...
4 Apr 2023 by Tough Developer
The V380 Pro wireless CCTV camera is available from many sellers on AliExpress for as low as 15USD. It has 10
8 Mar 2023 by V. Subhash
How to get compile the latest FFmpeg source code and try out some new features
17 Feb 2023 by OriginalGriff
This is not a video repair site: we are here for software development problems and this is not that! To be honest, you are unlikely to find a free repair tool that will work with anything that large: most free tools are trial versions and only...
13 Mar 2022 by Member 15564955
Hi, I am trying to convert files from a Chinese manufactured birdbox camera which also has a microphone. The camera records files with the extension .h264 and until recently, the only way I had found to convert them to a format I could play on...
13 Mar 2022 by lingeswararaj.s
How to convert H264 video file to MP4 file with audio. When i am converting H264 to MP4, i could not get the audio when playing the video. What I have tried: I tried converting H264 file to MP4 file using ffMPEG. Its converted but audio is not...
1 Mar 2022 by j ongamer13
Hello, I am trying to make a program that copies a specific video until the total length is longer than a specified amount. I need help trying to join them. Here is my joining code. // videos is a List containing a list of every single...
2 Sep 2021 by bazzabahuloo
I managed to get this working for me by making a change in the stream reader thread for Audio when video is playing at anything other than normal speed. I am not sure this is the correct place, but it seems to work well at both high and low...
1 Sep 2021 by bazzabahuloo
Hi I have an AVPlayer written in Delphi using the FFMPEG libraries. This basically implements a video player as per FFPLAY but under Delphi. I want to add variable speed video playback to this player, which is easy on the video side as you...
11 Aug 2021 by Eyadox
I wrote code using Aforge to capture the Video from the camera and its working fine. My problem is when I just start the Camera in the preview mode only without recording, the camera (preview window) freezes after 15 or 20 seconds. Then I noticed...
17 Jul 2021 by 4L4K1
What is the fastest why of create a thumbnail from a video by FFmpeg or anything else in WPF c#? look at the code in what I have tried section it takes about 3 seconds How can I reduce it What I have tried: string Arguments = @"-ss " +...
26 Jun 2021 by Eric Stevens 2021
I've been referencing this article about how to create a custom IO-Context with FFmpeg, but he invoked the use of an IStream interface. I am simply just trying to use an std::ifstream object in order to create the Context and proceed with opening...
26 Jun 2021 by KarstenK
It looks like you missed some steps to create working code with not initializing your audio_file. It needs to be created before used. Maybe you read some ffmpeg tutorial to start. The ffmpeg is tricky so stick the documentation and working code...
21 Jun 2021 by V. Subhash
Cut, copy, convert, mix, rotate, flip, resize, crop, combine, compose, blur, sharpen, smoothen, side-by-side split, PIP inset, fade in/out using FFmpeg Filters
10 May 2021 by Member 15192080
Hi everyone, I'm trying to convert with ffmpeg-python every frame of a video in a numpy array that could work with opencv What I have tried: Here my code: for i in (frames): out, _ = ( ffmpeg ...
23 Feb 2021 by Bohdan Stupak
A simple snippet of how you can convert video in .NET Core
6 Jan 2021 by Richard MacCutchan
See ffmpeg Documentation[^]
5 Jan 2021 by RickZeeland
See the third answer here: c# - Can ffmpeg burn in time code? - Stack Overflow[^]
11 Sep 2020 by KarstenK
You should contact the folks of tcpreplay. Normally you have some decoding functions which are doing the jobs. Best is to search for some sample code.
11 Sep 2020 by Sharma Dilip
I have a PCAP file having the encoded video data. I am using TCPReplay to broadcast this PCAP data to my server. In my server I have written a QT UDP socket program to receive these packets. I am able to receive these packets successfully in my...
24 Aug 2020 by Fazi_13
i am getting below the messages in cmd [dshow @ 05bdd9c0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [gdigrab @ 05c51800] Thread message queue blocking; consider raising the...
24 Aug 2020 by Sandeep Mewara
For error: Quote: Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) Try to add -thread_queue_size 512 and see. Seems you need to tune your parameters to what your system/configurations can support....
23 Aug 2020 by Hank Williams
Have you tried using the Aforge VideoSourcePlayer control instead of the picturebox control? I think the VideoSourcePlayer control is more suited to your needs.
19 Jun 2020 by Jo Aqra
I'm trying stream live audio to a wide range of clients in a web browser. My current solution : Dotnet core 3.1 console application -receive the audio data over UDP -trimming the first 28 bytes of each received packet -and send the processed...
30 May 2020 by Member 14816523
Hi, I am working on the OpenGL Application. which can open and read multiple video file frames. so, in output is can play three different videos at the same time without async frames rendering. what are odds get the sync frames rendering? After...
26 Mar 2020 by Member 14129828
I tried to create a video from a sequence image using FFmpeg in c#. I wrote this code but I didn't get the output how to solve this problem...thanks What I have tried: public void Execute() { using (var...
26 Mar 2020 by Maciej Los
Please, take a look at answered question: Converting Images into Video using C#[^] You can also be interested in this project: GitHub - mmaitre314/PictureMovie: Create MP4 videos from JPG/PNG/GIF/BMP images[^] Other links:...
25 Dec 2019 by Alexander Iacobciuc
In this article you will find an implementation of a stream player control.
18 May 2019 by son0nline
How can sound be recorded programmatically in Windows into mp3? What I have tried: Nothing - this is an old question that deserve an answer for the rest of the Code Project community.
18 May 2019 by Michael Haephrati
I would start here[^] and follow the guidelines.
1 May 2019 by OriginalGriff
H264 is a video stream format - it doesn't contain any audio stream data at all. MP4 is a package, which can contain both audio and video stream(s) - but it can't "invent" an audio stream from video data! Start with your movie source file: it probably contains both video and audio streams, and...
30 Apr 2019 by ilostmyid2
In the following code, I can't figure out what's wrong: uint8_t *dstData[4]; int dstLinesize[4]; AVPixelFormat convertToPixFmt = AV_PIX_FMT_RGBA; int ret; // ... printf("tmp_frame format: %d (%s) %dx%d\n", tmp_frame->format, av_get_pix_fmt_name((AVPixelFormat)tmp_frame->format),...
30 Apr 2019 by KarstenK
Normally the error message is more correct than the code written by some beginner. So I think you have mismatched some data or data types. Here is some working code with sws_scale which may show you to get it work. I think you should review the naming of your variables and their usage in the...
18 Apr 2019 by ilostmyid2
In the following code, I need to know whether I used a proper method for rendering frames obtained after decoding and rescaling. Besides, I get exception. I don't know what the exception is, since I see red x instead of images after some time. using System; using System.Collections.Generic;...
18 Apr 2019 by Fueled By Decaff
You are trying to perform UI(User Interface) operations on a thread that is not the UI thread. Either create and display the Bitmap in the backgroundWorker1_ProgressChanged method or use this.Invoke to execute code on the Form UI thread and generate the Bitmap and display it in the method...
19 Feb 2019 by ilostmyid2
In the following code: int CplayerDlg::play() { FILE *fp = fopen("video_files/1010.brf", "rb"); ASSERT(fp); RecordFrame rf; RecordHeader hdr; ASSERT(fread(&rf, sizeof(rf), 1, fp) == 1); ASSERT(rf.frameType == FRAME_TYPE_HEADER); ASSERT(fread(&hdr, sizeof(hdr), 1, fp) == 1);...
28 Jan 2019 by ilostmyid2
I got the latest version binaries of ffmpeg from here[^]. When I examine CPU and GPU usages when I play a video by its ffplay, I see that GPU is used during play. Not much using of CPU also indicates it. But when I get the latest version sources from the original site, I can't use GPU. To...
28 Jan 2019 by RickZeeland
See answers here: GPÜ-accelerated video processing with ffmpeg - Stack Overflow[^]
22 Jan 2019 by Umesh_dmt
make sure all the files available on path which you provide on script. Follow the below example -y -i /storage/emulated/0/Pictures/HelloCamera/VID_TESTING_20190123_124845.mp4 -i /storage/3636-3861/ic_launcher_incode.png -filter_complex [0][1]overlay=10:main_h-overlay_h-10...
18 Jan 2019 by ilostmyid2
hi i'm in the process of deciding how to decode received video frames, based on the following: 1. platform is Windows. 2. frames are encoded in H264 or H265. 3. GPU should be used as much 4. certainly we prefer less coding and simplest code. we just need to decode and show the result on screen....
18 Jan 2019 by RickZeeland
Maybe the easiest way is to use LibVLC (which use ffmpeg too), see example here: .net - How to streaming video via VLC api in C# - Stack Overflow[^]
20 Sep 2018 by paunescuionica
I cannot visualize a H264/MP4 stream generated by ffmpeg in Chrome, IE, Edge. It works only in Firefox. My testing environment is Windows 10, all updates done, all browsers up to date. What I have tried: I have a source MJPEG stream, which I need to transcode to H264/MP4 and show it in...
20 Aug 2018 by Jochen Arndt
Start by reading HWAccelIntro – FFmpeg[^]. For usage with the API check if an appropriate decoder is available and select that for decoding (requires that the library has been built with support for that decoder): // C/C++ example to use the DXVA2 decoder AVCodec* decoder =...
20 Aug 2018 by ilostmyid2
platform: Windows application: WinForm application language: C# decoder: ffmpeg Hi We're using ffmpeg to decode frames sent via network to us. The program is written in C# and uses FFmpegInvoke as well as the required DLL's like avcodec-56.dll and avutil-54.dll for decoding the frames. We need...
16 Aug 2018 by Member 13948830
I am working on a small project that needs to use ffmpeg to pull out some video from the main video. I have called the following within a command prompt and get my 8 second video named correctly in the folder: ffmpeg -ss 00:47:25 -t 8 -i C:\\Personal\\TestData\\MainVideo.mp4 -vcodec copy...
16 Aug 2018 by Member 13948830
This is what I did to finally get it to work var processStartInfo = new ProcessStartInfo(@"C:\FFmpeg\bin\ffmpeg.exe"); processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; ...
20 Jul 2018 by Gerry Schmitz
How to webcast using Microsoft Expression Encoder[^]
20 Jul 2018 by Ledrunning
Hello! I have been working on the solution to develop video streaming services on server side using C#. In my case I need to implement videostream from file (or other stream, not any devices) to local network via Ethernet for clients. I try use AForge.NET Framework and AForge.FFmpeg.dll...
7 Jun 2018 by entangledloops
You need to use a buffer, like a FIFO. See here: FFmpeg/transcode_aac.c at master · FFmpeg/FFmpeg · GitHub[^]
7 Jun 2018 by godspeed123
Hi ThereI want to encode audio using FFMPEG, but the problem is the nb_samples of the AVFrame is 22050 but the frame_size of the encoder is 1152. So how can I use avcodec_encode_audio2 function with this. Does anyone have an example of a way to do this?Thanks in advance.
15 May 2018 by newfall
Hi Experts, I have developed the gstreamer GPU encoding on Jetson Tx2. but now i am trying for Desktop GPU encoding using gstreamer. I am not able get "*omxh264enc*" in the listed supported elements using "*gst-inspect-1.0.exe*". so, i want to do hardware encoding on* desktop GPU* using...
3 May 2018 by Hitesh Rohilla
I am not a pro in FFMPEG but since working on it on non-frequent bases I tried to search for the solution but didn't get one However, I get one for RTSP FFMPEG -rtsp_transport tcp -i "rtsp://://" -f mpegts -codec:v mpeg1video -b:v 800k -r 30 - But my streaming is...
25 Apr 2018 by radnix
In the past, I'm able to record an RTSP camera stream with FFMPEG using this command: ffmpeg -i rtsp://192.168.241.1/axis-media/media.amp -acodec copy -vcodec copy -f mpegts out.ts FFmpeg produces a well structured transport stream container with my camera video inside the container....
19 Feb 2018 by Member 13682761
I want to merge a video and Gif. My video is a picture and a song during 45 seconds and my Gif is a equalizer animation. I want to combine video and Gif , Gif opacity be 50%. I can't find any solution but I try do it by C# it doesn't work too. Thanks a lot. What I have tried: private void...
18 Feb 2018 by Donald jeffers
Please refer to this link. I hope this helps.
17 Feb 2018 by Member 13682761
hi dear, I want to create a video during 15 seconds using one picture in C#. I try a lot of way but I couldn't , if anyone has solution pleas help me. this is my code : What I have tried: using (Process p = new Process()) { p.StartInfo.UseShellExecute = false; ...
17 Feb 2018 by RickZeeland
A lot of people seem to struggle with this, this one seems to have an answer: c# - Image sequence to video stream? - Stack Overflow[^]
9 Nov 2017 by arunavachowdhury
This is a simple code to create ffmpeg log output in a file instead of console. But this code doesn't create an output log file wherein the same arrangements when used in command prompt it works. Can anybody help in this? what more needs to be done to get the output in the log file? Regards...
9 Nov 2017 by arunavachowdhury
Tried with the above code but its not working. When we run ffmpeg with the same code we need to remove the final "\" after ffmpeglog.log to generate the log. When I am using " -i \"d:\\wildlife.wmv 2> \"D:\\ffmpeglog.log\"" The log is not generating but cannot remove the "\" from the string...
8 Nov 2017 by Richard MacCutchan
A quick check with your debugger would show you that your parameters are wrong as you have unescaped backslashes in your strings. So the code: string fullPath = "d:"; string fileName= "wildlife.wmv"; string pathfile = "D:"; process.StartInfo.Arguments = "-i \"" +...
26 Oct 2017 by Graeme_Grant
You want to "capture" the output? This should answer your question: Capturing console output from a .NET application (C#) - Stack Overflow[^]
26 Oct 2017 by hsafavi
I want to catch devices using ffmpeg.exe. i used Process class and related ffmpeg command but no success What I have tried: i used following code but the output is nothing!! i think it happens because the process exited as soon as process.start() executed. how can i do that? static void...
4 Oct 2017 by StefanAdmin@123
I want to convert a raw files to mp4 video format using ffmpeg and i want to implement it using C++. How do i go about it. I have configured libs and include folder in visual studio set up.I will be glad if i could get a useful link or sample code in C++. What I have tried: I don't know how to...
4 Oct 2017 by KarstenK
You best start at the ffmpeg documentation site. I also like to mention the ffmpeg examples. Maybe that stackoverflow answer helps you in your problem. It is a complex library so you will have to learn a lot.
11 Jul 2017 by Ahmad_Mustafa
use this proc.StartInfo.Arguments = string.Format("-i {0} -i {1} -acodec copy -vcodec copy -map 0:0 -map 0:1 {2}", Wavefile, video1, strResult);
11 Jul 2017 by Member 13117475
Hi, I am working on capture images by calling RTSP service. For calling RTSP service I have created one sample application (as a client) and in that I have created socket object and call RTSP service listen method. I am also able to receive byte[] using UDP listener, but I am not able to use...
11 Jul 2017 by KarstenK
Why are you sending TCP and receiving UDP packets??? Use TCP alsp on the receiver side. You should use the Image.Save() with a parameter to enforce jpeg. image.Save(path, ImageFormat.Jpeg); Else check for other problems, like the transmitted data and its size.
17 Mar 2017 by Ahmad_Mustafa
There is a Long process to use FFmpeg in C#. I have some Questions about it when i use it in c# project and make some software using it and give to some one all the things we install to setup Other person needs these things as well ? Is there any Other easy way to setup FFmpeg in c# Project....
20 Jan 2017 by Junian Triajianto
Using the power of Livestreamer and FFmpeg, twitch stream can be recorded every time a user goes online.
30 Nov 2016 by Charly LEE
the input mp3 is single channel with 32000 sample rate, 16bit signed.I am using ffmpeg 2.6 to decode mp3 on ios9.3.2 pad. It get white noise only. but it works on windows.I record the decoded PCM to file and use tool to play it. when I changed the bit set to 32. I can hear the original sound...
30 Nov 2016 by KarstenK
the solution looks really simple. AVPacket avpkt; av_init_packet(&avpkt); // set values AFTER init avpkt.data = encode_packet->data; avpkt.size = encode_packet->data_length;I am a bit confused that your old code works on Windows. But I know that the Objective-C runtime...
27 Nov 2016 by Member 12761317
I'm using IP webcam android app(It converts mobile camera into IP web camera). I'm running below code in Visual Studio 2015 with OpenCV 3.1. VideoCapture cap; Mat img; cap.open("http://192.168.0.101:8080/video?x.mjpeg"); while(waitKey(33)!=27) { try{ ...
27 Nov 2016 by Arthur V. Ratz
Normally, in this code, at the beginning, you declare two variables: VideoCapture cap; Mat img; You normally open the camera by invoking cap.open("http://192.168.0.101:8080/video?x.mjpeg"); method and then perform a loop to retrieve each frame from the camera device storing them into a frame...
17 Sep 2016 by Stefan Ionescu Freelancing
I am trying to programmatically watermark a video in Android using WritingMinds' Ffmpeg library from Github :https://github.com/WritingMinds/ffmpeg-android-javaI did all they said in their documentation and imported the library in Android Studio.Still, it gives me an IOExeption with...
10 Sep 2016 by Richard MacCutchan
See VideoFileReader Class[^] for instructions on installation and usage.
10 Sep 2016 by ghasem110deh
hi guy'si use Aforge lib in my project for capture image and record live video from webCam ...but when use ffmpeg.dll to save AVI file from webCam send this Error :private VideoFileWriter FileWriter = new VideoFileWriter(); FileWriter.Open("test.avi", 460, 500, 25,...
29 Aug 2016 by hansonzou
the particulars is i save a rtsp stream to ts file by ffmpeg per 10 second , it may last for a long time(more than 26.5hour), when it done, it will save a m3u8 file, after that, i use ffplay to play then m3u8 file, if i want to seek to 26.7hour , the play must be stoped. -----PTS (sec) =...
29 Aug 2016 by KarstenK
The only way I see is to split the files in parts with playtime less but roughly the 26.5 h and than compute the offset and seek the correct subfile.
9 Jun 2016 by Member 11549235
Hi, I'm working on a FFMPEg Project and trying to write a file with a stream. But when I call avformat_write_header it always throws an errr. Here's the code:AVCodecContext *codecctx; AVFormatContext *fmtctx; fmt=av_guess_format(NULL,filename,NULL); if(!fmt) printf("Das Format kann...
9 Jun 2016 by Member 11549235
The Problem is i forgot to call avio_open. Now I'm trying to add a png Image to the stream, but don't know how to convert it to an useable Frame. Can you give me some hints?
8 Jun 2016 by Jochen Arndt
Like Richard I do not know ffmpeg well. But the documentation for avformat_write_header[^] states for the first parameter:Quote:Media file handle, must be allocated with avformat_alloc_context(). Its oformat field must be set to the desired output format; Its pb field must be set to an...
16 May 2016 by Eranga Dayarathne
I have Created audio and video capture method and Save thee two file in to my location.after these two file merge in to one avi format file.in the final output file audio run first and video take delay. how to fix it. I used ffmpeg.exe for merge.are there many system for capture audio and...
27 Apr 2016 by Clayton Rumley
There are those who think I am crazy, and this just might be the proof.
9 Apr 2016 by Prakash1206
there are a lot of questions asked regarding opencv + H.264 but none of them gave detailed explanation.i am using openh264(openh264-1.4.0-win32msvc.dll) along with opencv 3.1(custom build with cmake having ffmpeg enabled) in visual studio, i wanted to save video coming from webcam in mp4...
13 Mar 2016 by Maxim Komlev
Experiment of Video Transcoding and Streaming on the fly to all major internet browsers (just to video tag) without Flash or Silverlight
26 Jan 2016 by paunescuionica
I'm currently developing an application which will enable visualizing images from different sources (mostly IP cameras) in browser (in a HTML5 video element). The UI will allow for matrix view so, normally 16 or more cameras will be displayed at the same time.From cameras I get MJPEG streams...
18 Dec 2015 by Jochen Arndt
Your FTP server should know which files are actually being uploaded.A good implemented server would also lock the file even for reading while the upload is in progress. Then your service might detect the new file but will be not be able to open it.If there is no read lock, there should...
18 Dec 2015 by Member 11324668
Hi i have a simple question, i have window service that run in specific interval.Now i have one issue when user upload a big file and during same time window service run and convert that file to mp4 using ffmpeg but original video is not uploaded completely. therefor converted video does not...
23 Nov 2015 by Sergey Alexandrovich Kryukov
Please see my comment to the question. I cannot tell you for sure what to choose, not sure myself, but I can give your some words in favor or FFMpeg. I did not use Media Foundation, but I often heard the opinions that FFMpeg offers a much broader set of features compared to Media...
23 Nov 2015 by paunescuionica
I'm using an API which gives live images from different sources (mainly from IP cameras). So I have few jpg images coming in each second.My requirement is to produce a H.264 encoded MP4 live stream, that will be displayed in a browser (in HTML5 element).So, transform this live...
30 Jul 2015 by CHill60
If you can't understand the code presented we are unlikely to be able to help you much in a Quick Answers Forum! However - your first link - you can put the code wherever you like. A button click event would be appropriate, amongst other options.The missing reference on your 2nd link is...
30 Jul 2015 by Atom Scott
First, I'm fairly new to see sharp so I'm looking for a thorough and easy to understand answer.How do I make a C# win form program that breaks a video down to frames, then puts those frames back together to make a video?I also want to be able to select which frames to extract by setting an...
26 Jul 2015 by parisonj
Hi,Does anyone have any good tips or practical experience on controlling the playback rate of video/audio streams?Using SetRate() doesn't seem to give me reliable (smooth) results, certainly above values of 2.0, and often locks up completely.Ideally, I need to typical rates of x1, x2,...
5 Jun 2015 by Adrian Andrei
Check the autos.Check if ffmpeg images folder is the Process.WorkingDirectory.Check if images are png files.Check if there are some problems with your code.