Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to execute FFMPEG using a compiled FFMPEG jar on Android
2 février, par ValtinhoI added org.bytedeco.javacpp's ffmpeg-2.3-0-9.jar (https://www.versioneye.com/java/org.bytedeco.javacpp-presets:ffmpeg/2.3-0.9) and I need to be able to execute a command inside of my android app, such as:
ffmpeg -ss 00:00:00 -t 00:00:15 -i in.mp4 -codec copy out.mp4
However, "ffmpeg" is not a class or a method that is exposed by this jar. Some posts suggest that I should be using the exec method when dealing with ffmpeg native code, but how do you do that (if that's even the right thing to do with this library)? I am trying the following command without success.
Process p=Runtime.getRuntime().exec("/libs/ffmpeg-2.3-0.9 -i -i in.mp4 -codec copy out.mp4");
Any suggestions?
-
How to Merge two videos without re-encoding [duplicate]
2 février, par Yogesh AgarwalI am trying to Merge two video without re-encoding them.
Currently i use a approach which is too much time consuming and resource as well. I just want to merge without re-encoding them. Currently i am using
exec ( "cpulimit -l 90 ffmpeg -i $filename1 -qscale 0 $intermediate1 &> stream1.log" ); exec ( "cpulimit -l 90 ffmpeg -i $filename2 -qscale 0 $intermediate2 &> stream2.log" ); $output = '/var/www/html/myserver/merg/'.uniqid().'_merge.'.$ext; exec ( "cpulimit -l 90 cat $intermediate1 $intermediate2 | ffmpeg -i - -qscale 0 $output &> stream3.log" );
Above takes a lot of time.. I want a quick way to do it.
-
How can I extract audio from video with ffmpeg ?
2 février, par user1269669I tried the following command to extract audio from video:
ffmpeg -i Sample.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 Sample.mp3
but I get the following output
libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 SamplE.avi: Invalid data found when processing input
Can anyone help, please?
-
Automating Basic Video Editing [closed]
2 février, par user29470652What's guys! I am a beginner in programming.
As of now, I have created a basic YouTube downloader with the help of Python, FFmpeg, yt dlp, and Flaskapp.
Now, I am automating the basic video editing part ( Turn bulk video files into a basic similar edit like we have one template then we add a caption from the title of the video, then place the video in the center of the template trim out to meet the video length of the given video then saving it) with the help of FFmpeg.
Has anyone already tried or built it?? Any marketer or video editor??
I am halfway to the project
Here is theenter image description here
I am halfway through the project and wonder if anyone has ever done it before like any video editor or marketer??
-
Gstreamer : how to achieve the same effect as ffmpeg filter tmix
2 février, par dudengkeThe ffmpeg command can smooth video:
ffmpeg -i 1.h265 -vf "tmix=frames=3:weights=1 1 1" 2.h265
Now i want to use gstreamer to smooth but I can't find the avfilter in gst-libav
gst-launch-1.0 filesrc location=1.h265 ! decodebin ! videoconvert ! avfilter filter="tmix=frames=3:weights=1 1 1" ! videoconvert ! gstsink
My question: Is there another way gstreamer can achieve the same effect as "tmix" in ffmpeg? I tried chatGPT, but the effect was not.
gst-launch-1.0 filesrc location=1.h265 ! h265parse ! avdec_h265 ! videoconvert ! tee name=t \ t. ! queue ! identity single-segment=true ! videomixer name=mix sink_0::alpha=0.33 \ t. ! queue ! identity single-segment=true ! mix.sink_1 \ t. ! queue ! identity single-segment=true ! mix.sink_2 \ mix. ! gtksink