Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
C# Desktop recorder h.264 cross-"computer"
14 décembre 2013, par rodiI was looking for a method with "least requirements" for a maximum compatibility.
I have seen that there are mainly 2 ways: through directx, through .NET ( only >Win7) but both requires Win7 Or DirectX 9 installed.
could
ffmpeg
be useful? I have tried following this Wiki, but it prompts me:> ffmpeg -f dshow -i video="UScreenCapture":audio="Microphone" output.flv [dshow @ 00000000003ea700] Could not find video device. video=UScreenCapture: Input/output error
Any advice?
-
Killing infinite ffmpeg on the command line from an application
14 décembre 2013, par bhupinderI am using
ffmpeg.exe -f dshow -i audio=virtual-audio-capturer -q 4 -y -tune zerolatency outfile.mp3
to grap sound from speakers. This command runs infinitely. I have to use
Process->kill();
command to stop execution of this command in my application.
I want to know if it is safe to kill it the way I am killing, or is there any better way?
-
Using openssl with FFmpeg on Android with NDK
14 décembre 2013, par William SeemannI cross compiled FFmpeg with openssl support using the scripts from the Guardian project however my code crashes whenever I execute the following:
System.loadLibrary("crypto"); // loads OK System.loadLibrary("ssl"); // loads OK System.loadLibrary("avformat"); // crashes
The error:
dlopen("/data/data/wseemann.media.demo/lib/libavformat.so") failed: dlopen failed: cannot locate symbol "SSL_library_init" referenced by "libavformat.so"...
I build libavformat with a toolchain and then run ndk-build using the following Android.mk file to create the .so files:
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libswscale LOCAL_SRC_FILES := ffmpeg/$(TARGET_ARCH_ABI)/lib/$(LOCAL_MODULE).so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/$(TARGET_ARCH_ABI)/include include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libavcodec LOCAL_SRC_FILES := ffmpeg/$(TARGET_ARCH_ABI)/lib/$(LOCAL_MODULE).so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/$(TARGET_ARCH_ABI)/include include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libavformat LOCAL_SRC_FILES := ffmpeg/$(TARGET_ARCH_ABI)/lib/$(LOCAL_MODULE).so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/$(TARGET_ARCH_ABI)/include include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libavutil LOCAL_SRC_FILES := ffmpeg/$(TARGET_ARCH_ABI)/lib/$(LOCAL_MODULE).so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/$(TARGET_ARCH_ABI)/include include $(PREBUILT_SHARED_LIBRARY) LOCAL_PATH:= $(call my-dir)
It would seem that libavformat needs libcrypto and libssl when it is loaded but it can't find them or isn't loading them. Does anyone know how to fix this issue?
-
How to extract stream of images from video file using ffmpeg
13 décembre 2013, par user3032143I want to extract stream of images from a video file using ffmpeg.
I know I can extract them straight to the hard drive using these arguments:
-i - -qscale 1 h:\out\img-%05d.jpg
But i would like to extract directly to a stream.
This is my code so far:
private void ExtractImagesFromVideo(byte[] data,string _args) { try { serverBuild = new Process(); serverBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory; serverBuild.StartInfo.Arguments = _args; serverBuild.StartInfo.FileName = Environment.CurrentDirectory + @"\ffmpeg.exe"; serverBuild.StartInfo.UseShellExecute = false; serverBuild.StartInfo.RedirectStandardOutput = true; serverBuild.StartInfo.RedirectStandardError = true; serverBuild.StartInfo.RedirectStandardInput = true; serverBuild.StartInfo.CreateNoWindow = true; serverBuild.StartInfo.LoadUserProfile = false; serverBuild.EnableRaisingEvents = true; serverBuild.Start(); using (BinaryWriter bw = new BinaryWriter(serverBuild.StandardInput.BaseStream)) { bw.Write(data); } mStandardOutput = serverBuild.StandardOutput.BaseStream; mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null); serverBuild.WaitForExit(); byte[] _data = mStandardOutputMs.ToArray(); mStandardOutput.Close(); } catch (Exception _ex) { } finally { serverBuild.Dispose(); } }
and I call like like this:
string _argsOut = @"-i pipe:0 -qscale 1 -f mjpeg pipe:1 "; ExtractImagesFromVideo(data, _argsOut);
and it hangs on this line:
bw.Write(data);
thanks
-
FFMPEG MP4s are corrupt in Firefox after rotation ? [migrated]
13 décembre 2013, par PaulI'm working on a website that allows uploading of generic video types, converts them to MP4s (H.264), then plays them using the HTML 5
tag.
I would really like to give the option to rotate videos, but when I run the rotation, the output files will not play in Firefox ("Video cannot be played because the file is corrupt"). Windows also does not automatically generate a thumbnail based on its content, like for other MP4s. The files do play fine in VLC and in Chrome, but I will need them to work in Firefox as well.
I've tried joining the conversion and rotation into a single FFMPEG call, and I've also tried rotating before converting and vice-versa, but I still have the same problem.
Here are what my calls look like:
Rotation:
ffmpeg -i -vf "transpose=1" -qscale 0 -y -acodec copy
Conversion:
ffmpeg -i -vcodec libx264 -vsync 1 -bt 50k -acodec libvo_aacenc -crf
-s x -ar 44100 -ab 160 -ac 2 -y