Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg Executing command error
7 avril 2016, par Sanket990When I conversion mp4 to mp3 using ffmpeg command
FFmpeg command Execution error- Working directory null IOEXception Executing below code.File path=Environment.getExternalStorageDirectory(); try { String ffmpegCommand="ffmpeg -i "+path.getAbsolutePath()+"/test/1.mp4 -f avi -acodec mp3 "+path.getAbsolutePath()+"/Songss.avi"; Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start(); String line; BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream())); Log.d("tag", "*******Starting FFMPEG"); while((line = reader.readLine())!=null){ Log.d("tag", "***"+line+"***"); } Log.d("tag","****ending FFMPEG****"); } catch (IOException e) { e.printStackTrace(); }
LogCat
java.io.IOException: Error running exec(). Command: [/data/data/com.example.ffmpegcommandexecute/ffmpeg -i /mnt/sdcard/Songs.mp4 -vn -s 00:00:10 -acodec libmp3lame output.mp3] Working Directory: null Environment: [ANDROID_SOCKET_zygote=10, ANDROID_BOOTLOGO=1, EXTERNAL_STORAGE=/mnt/sdcard, ANDROID_ASSETS=/system/app, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ASEC_MOUNTPOINT=/mnt/asec, LOOP_MOUNTPOINT=/mnt/obb, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar, EXTERNAL_STORAGE_SD=/mnt/ext_card, EXTERNAL_STORAGE_ALL=/mnt/sdcard:/mnt/ext_card, WTLE_VERSION=3.2.0.patch6.1, ANDROID_DATA=/data, LD_LIBRARY_PATH=/vendor/lib:/system/lib, ANDROID_ROOT=/system, ANDROID_PROPERTY_WORKSPACE=9,65536] at java.lang.ProcessManager.exec(ProcessManager.java:211) at java.lang.ProcessBuilder.start(ProcessBuilder.java:195) at com.example.ffmpegcommandexecute.MJPEGFFMPEGTest$ProcessVideo.doInBackground(MJPEGFFMPEGTest.java:301) at com.example.ffmpegcommandexecute.MJPEGFFMPEGTest$ProcessVideo.doInBackground(MJPEGFFMPEGTest.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:264) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: java.io.IOException: No such file or directory at java.lang.ProcessManager.exec(Native Method) at java.lang.ProcessManager.exec(ProcessManager.java:209)
-
ffmpeg watermark
7 avril 2016, par tomiI am using a static compiled lib of FFMPEG gotten from BAMBUSER for android. The problem I am facing now is that FFMPEG version gotten from BAMBUSER does not support watermarking.
ffmpeg -sameq -i mirror_watermark.mp4 -vf "movie=mirror_watermark.png [logo]; [in][logo] overlay=main_w-overlay_w:main_h-overlay_h [out]" output.mp4 No such filter: 'movie' ./configure --list-filters | grep movie returns nothing
So I guess I have to use a newer version of FFMPEG but I do not know how to get started since with the BAMBUSER everything was already set I just added certain encoders and decoders to their script.
-
How to calculate byte/index ranges for mpeg-dash MPD file ?
7 avril 2016, par TheSHEEEPI basically know how an .mpd file would have to be structured to support streaming from separate .mp4 (or webm) files.
However, I would like to implement the "static" (aka "on-demand") method, thus only having one file per quality that I want to offer in the stream.
In all samples, this is done by supplying the indexRange & range values within a Representation like this:
car-20120827-88.mp4 What I could not find out anywhere is how one would calculate the indexRange/range values here, using only ffmpeg (or ffprobe).
What exactly would one have to do to get those numbers right for arbitrary (yet supported, of course) video files to create the .mpd file for them?Or am I trying to figure out something in vain here and those values are just arbitrary?
-
Can anyone help in understanding AVFrame.linesize[] ?
7 avril 2016, par theateistI tried to find what each cell of
AVFrame.linesize[]
means, but I didn't found.As I understood
linesize[0]
is the width,linesize[1]
is the height.- If I'm right what does other cells mean?
- why after
avcodec_decode_video2(codecCtxDecode, frameDecoded, &frameFinished, &packet);
only linesize[0] has the value and other cells are always 0?
UPDATED
I think AVFrame.data[i] and AVFrame.linesize[i] are the data of specific color in the row and the length of the row, am I correct?
-
error occured on -pix_fmt in ffmpeg while converting from .mov to mp4 file
7 avril 2016, par AmeyI am trying to convert .mov to .mp4 using ffmpeg my command is :
ffmpeg -i input.mov -vcodec libx264 -acodec copy output.mp4
but its giving me error like this
[buffer @ 00000000059bf480] Unable to parse option value "-1" as pixel format Last message repeated 1 times
[buffer @ 00000000059bf480] Error setting option pix_fmt to value -1. [graph 0 input from stream 0:4 @ 00000000043fd8a0] Error applying options to the filter. Error opening filters!
even I tried for another command
ffmpeg -i input.mov -vcodec copy -acodec copy output.mp4
but it converts only some part and first part is blank with sound then after some time picture is coming..
I have two Q's
1] for first command what is -pix_fmt and what value to be set for ?
2] for second command why it was giving only some part, as I am copying everything vcodec as well acodec..
please guide me ..!!