Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
C# console app to process FFMPEG jpg stream output
15 septembre 2014, par Gabriel BarzolaI am looking some tip or idea in order to process an stream of jpg files created by a fFMPEG command.
There is a way to split the outpuStream to capture each jpg file?
Here is the command ffmpeg -i rtsp://somertsp:554 -an -f image2pipe -vf fps=fps=5 -
I execute that command using a C# application.
Here is a example code
class Program { private static BackgroundWorker worker; private static MemoryStream buffer = new MemoryStream(); private static BinaryWriter bufferWriter = new BinaryWriter(buffer); static void Main(string[] args) { string file = @"C:\ffmpeg\bin\ffmpeg.exe"; string arguments = @"-i rtsp://xxx:yyy@v5demo.wavestore.com:554/rtsp/00004 -an -f image2pipe -vf fps=fps=5 -qscale 0 -"; var processStartInfo = new ProcessStartInfo(file, arguments); processStartInfo.CreateNoWindow = false; processStartInfo.RedirectStandardError = true; processStartInfo.RedirectStandardOutput = true; processStartInfo.UseShellExecute = false; worker = new BackgroundWorker(); worker.DoWork += worker_DoWork; worker.WorkerReportsProgress = true; worker.ProgressChanged += worker_ProgressChanged; var process = new Process(); process.StartInfo = processStartInfo; process.Start(); worker.RunWorkerAsync(process); process.WaitForExit(); } static void worker_ProgressChanged(object sender, ProgressChangedEventArgs e) { // save the image } static void worker_DoWork(object sender, DoWorkEventArgs e) { try { var internalWorker = sender as BackgroundWorker; Process p = e.Argument as Process; buffer = new MemoryStream(); bufferWriter = new BinaryWriter(buffer); using (var reader = new BinaryReader(p.StandardOutput.BaseStream)) { while (true) { //get the jpg image } } } catch (Exception ex) { // Log the error, continue processing the live stream } } }
-
How can i create ffmpeg code with video and audio filter in one command line
15 septembre 2014, par aligokaydumani can add a background image behind the video and change scale and position with this code
ffmpeg -loop 1 -i 360.png -i input.mp4 -filter_complex "[1]scale=362:218[over]; [0][over]overlay=200:117" -shortest -y output.mp4
and i can change audio and volume speed %10 faster
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.9*PTS[v]; [0:a]atempo=1.1[a]" -map "[v]" -map "[a]" output.mp4
i wanna do this 2 step in one code but i couldn't do that
Do you know any solution?
-
Get video thumbnail on a shared hosting without FFMPEG
15 septembre 2014, par SharpAffairLooking for a solution to extract thumbnail from an MP4 video, I found several results here, but they involve using FFMPEG.
Unfortunately, running FFMPEG's EXE file is unavailable in a shared hosting environment.
Is there any alternative, e.g. a .NET Framework solution or an external .NET DLL to meet the same goal?
-
avconv or FFMPEG command to have multiple pictures slices from a direct webcam on pc
15 septembre 2014, par user3162862I have found the command
ffmpeg -i rtsp://10.2.69.201:554/ch0_0.h264 -f image2 -vf fps=fps=1/120 img%03d.jpg
but it fail if I'm not on network. I tryed on my on computer but I have bind error. I would like to have a command like or a mix of these one:
ffmpeg -f v4l2 -s 640x480 -i /dev/video0 output.mpg
Thanks for your help. This is appreciated if that possible
-
ffmpeg : convert and keep audio tracks
14 septembre 2014, par raxeri have some video files in H.264 codec and DTS audio. My goal is to convert the audio tracks (mostly 2 tracks, english and german) to AAC, but i don't want to lose the DTS audio tracks.
I tried this command, but it only converts the tracks and replaces the DTS tracks
ffmpeg -i input.mkv -map 0 -c:v copy -c:a libfdk_aac -b:a 128k -c:s mov_text output.mp4
What should i do to have the DTS and AAC tracks in the output file?