w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android FFMPEG: Could not execute the ffmpeg from Java code
Do you have root on the device? Mount '/data' and then enter your same 'ffmpeg' command in the shell and see whether the error is the same. Try using the shell to test out different command expressions. Try 'ffmpeg' alone and with just one input file. See whether those commands produce expected output. My wild guess would be that there is an issue with calling 'ffmpeg.main()' that relates to the details of your build.

Categories : Android

bash while loop and ffmpeg
It could be because some folders contain spaces, or other weird characters. Try this (won't work for ALL but for MOST cases): while read p # reads in each line of the text file- folder_list.txt do #each iteration echo "$p" #print out current line if [ -f "${p}/frame_number1.jpg" ] #checks wether the image exists in the specific folder then echo "$p" #printsout specific folder name sleep 1 #pause for 1 second ffmpeg -f image2 -r 10 -i "${p}/frame_number%01d.jpg" -r 30 "${p}/out.mp4" #create video fi # end if statement done <folder_list.txt #end of while loop I just added quotes around arguments involving "$p" so that if it contains space (and other things) it's not

Categories : Bash

PHP exec not executing FFmpeg command
try giving full path where the ffmpeg application is located. e.g. /usr/bin/ffmpeg So your function might look like: $output=exec("/usr/bin/ffmpeg -f image2 -i /home/phedra/imgs/image/img%03d.png -r 12 -s 610x489 /home/phedra/imgs/video/out.avi", $out); You must check what is the location of "ffmpeg".

Categories : PHP

Android FFMPEG command line for video filter
Your ffmpeg build is too old to support the curves video filter with presets. Presets were added on 2013-03-25 (lavfi/curves: add presets support) bumping libavfilter to version 3.48.103. You will need to update your ffmpeg.

Categories : Android

How to copy audio stream using FFMpeg API ( not a command line tool )
Your question is vague without some kind of code to go along with it, as trust me there are a lot of things that can go wrong when using ffmpeg's libraries directly (and on Windows there is no debuging). Unfortunately ffmpeg's libraries are not well documented so it is generally best to read the source code for ffmpeg in order to use its libraries. Find the equivalent command line options to perform what you want and track that through ffmpeg's source to see the library calls.

Categories : Opencv

How to execute command line ffmpeg commands programatically in android?
Recently I came across the similar problem. My solution is to simulate a command line in Java program. Firstly, I add a function to the file "ffmpeg.c": int cmd_simulation(int argc, const char** argv) { OptionsContext o = { 0 }; // int64_t ti; reset_options(&o, 0); av_log_set_flags(AV_LOG_SKIP_REPEATED); parse_loglevel(argc, argv, options); if(argc>1 && !strcmp(argv[1], "-d")){ run_as_daemon=1; av_log_set_callback(log_callback_null); argc--; argv++; } avcodec_register_all(); avfilter_register_all(); av_register_all(); avformat_network_init(); //show_banner(argc, argv, options); term_init(); parse_cpuflags(argc, argv, options); /* parse options */ parse_options(&o, argc, argv, options, opt_output_file); if (nb_output_files <= 0 && nb

Categories : Android

android sound overlap command line ffmpeg not working
Check out those resources for Audio/Video tasks with FFmpeg for Android: Tutorial to compile FFmpeg for Android: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ FFMpeg API examples: http://ffmpeg.org/doxygen/trunk/examples.html Also if you search github for FFmpeg and Android you'll find a lot of resources. Hope this helps, Cheers.

Categories : Android

Concatenate / Join MP4 files using ffmpeg and windows command line batch NOT LINUX
From reading your question, I'd suggest that the configuration file might look like this: # this is a comment file 'C:UsersJoe1Maysession3 eadyforfinalconversionTitlefile.mp4' file 'C:UsersJoe1Maysession3 eadyforfinalconversionEnglishfile.mp4' It may need double quotes around the pathfilenames instead of single quotes, for Windows. Try it both ways.

Categories : Windows

-bash: cordova: command not found; or -bash: phonegap: command not found
You've to add the path to the cordova bin in the bash file. /etc/profile ~/.bash_profile ~/.bash_login (if .bash_profile does not exist) ~/.profile (if .bash_login does not exist) Try to close and reopen the teminal after edited the file.

Categories : Cordova

Error when using scp command "bash: scp: command not found"
Issue is with remote server, can you login to the remote server and check if "scp" works probable causes: - scp is not in path - openssh client not installed correctly for more details http://www.linuxquestions.org/questions/linux-newbie-8/bash-scp-command-not-found-920513/

Categories : Misc

ffmpeg to convert all .jpg to mp4
I tried executing ffmpeg on Ubuntu 13.10 for doing exactly that but it started complaining with all sorts of errors. It seems ffmpeg is deprecated by avconv. Here is how I compiled my JPEGs into an .mp4 using avconv: avconv -r 30 -i line-%06d.jpg -qscale 2 -r 30 out.mp4 What I was trying to do is create a video of panning across a huge JPEG. If anyone's interested, details are here: Video panning across your family tree chart (.jpg to .mp4)

Categories : Bash

ffmpeg get value from cropdetect
cropdetect outputs to the console, so you can parse the output and then use it as a variable: ffmpeg -i input -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1 This will result in something like: crop=640:480:0:50 Then run your actual crop command: ffmpeg -i input -vf $cropvalue,scale=240:-1 -vframes 1 -qscale:v 2 output.jpg -vcodec mjpeg, -an, and -f rawvideo are superfluous Use -qscale:v to control jpg output quality. A sane range is 2-5 (a lower value is a higher quality). Use the scale filter instead of -s; especially if you're already using filters. Also the scale filter will allow you to set a specific width or height and with -1 it will automatically provide the correct value to preserve aspect. Otherwise if you try to force a specific size

Categories : PHP

How to use FFMPEG commands
You should be able to spawn a process to run ffmpeg using ProcessBuilder: Process ffmpeg = new ProcessBuilder().command(args).start() if (ffmpeg.waitFor() != 0) { // handle failure case } (The above code blocks the current thread until ffmpeg finishes.) However, I think your bigger issue would be having to cross-compile and distribute versions of ffmpeg for every device you're targeting.

Categories : Android

How to decode mp3 to pcm by ffmpeg
One way to do this is to call the executable in the code: system("ffmpeg -i input.mp3 output.wav"); //assuming the executable name is ffmpeg and its location is in PATH environment variable Another way is to use the API. Example here, see the audio_decode_example() function in that file. Some tutorials: Linuxers' Tutorial "For Beginners": http://linuxers.org/tutorial/ffmpeg-tutorial-beginners Dranger: http://dranger.com/ffmpeg/ (slightly out of date) CodeProject: http://www.codeproject.com/Tips/111468/FFmpeg-Tutorial Mathew Bajoras's Tutorial: http://www.personal.psu.edu/mrb5282/tutorials/video_ffmpeg/

Categories : C

ffmpeg + glfwGetTime()
You added the time the decoding needs to decode the Image to the 40ms you have to wait for displaying the next. This error is because you measure the time again at the end of your loop. instead of: } tiempo = glfwGetTime(); } write: } tiempo+=duraction; }

Categories : C++

FFmpeg package for php
Yes simple ffmpeg does work through PHP exec if you have necessary permissions. Sample command <?php /*** convert video to flash ***/ exec("ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv"); ?> Source

Categories : PHP

Remuxing mp4 on the fly with FFmpeg API
OK, another question researched and answered by self... Turns out, as I theorized in the question, mp4 file is not fully written until the end. During a direct disk write to a file, the producer would seek back to the start of the video and update all the pointers to various atoms. That is, the general structure of mp4 is ftyp -> mdat -> moov. Where moov contains all the meta about the contained tracks. Unfortunately, it is written last. However, its location is located in the header. That is why the seek is required: mdat is of varied length (because it contains raw encoded frames, there can be x number of them). Thus, the moov atom is offset by the length of mdat. When producer finishes writing the file, it will update the header with the proper location of moov. For additional referen

Categories : C

How to add album art with ffmpeg?
With Recent version, ffmpeg -i out.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3 Use -map to associate input stream to the output Use -c copy to directly demux/remux The -id3v2_version 3 is what is missing in your command line. Note that that wil write an IDV2.3 but you can ask for a 2.4 (-id3v2_version 4) with the -id3v2_version 3 option the -metadataoption will be well interpreted

Categories : PHP

Keep timecode in ffmpeg?
from man page: http://ffmpeg.org/ffmpeg.html ‘-copyts’ Do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value. Note that, depending on the ‘vsync’ option or on specific muxer processing (e.g. in case the format option ‘avoid_negative_ts’ is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected. ‘-copytb mode’ Specify how to set the encoder timebase when stream copying. mode is an integer numeric value, and can assume one of the following values: ‘1’ Use the demuxer timebase. The time base is copied to the output encoder from the corresponding input demuxer. This is sometimes required to avoid non monotonically increasin

Categories : Osx

How can I seek to frame No. X with ffmpeg?
av_seek_frame will only seek based on timestamp to the key-frame. Since it seeks to the keyframe, you may not get what you want. Hence it is recommended to seek to nearest keyframe and then read frame by frame util you reach the desired frame. However, if you are dealing with fixed FPS value, then you can easily map timestamp to frame index. Before seeking you will need to convert your time to AVStream.time_base units if you have specified stream. Read ffmpeg documentation of av_seek_frame in avformat.h. For example, if you want to seek to 1.23 seconds of clip: double m_out_start_time = 1.23; int flgs = AVSEEK_FLAG_ANY; int seek_ts = (m_out_start_time*(m_in_vid_strm->time_base.den))/(m_in_vid_strm->time_base.num); if(av_seek_frame(m_informat, m_in_vid_strm_idx,seek_ts, flgs)

Categories : C

PowerShell script ffmpeg
Try this: $oldvids = Get-ChildItem *.mkv -Recurse foreach ($oldvid in $oldvids) { $newvid = [io.path]::ChangeExtension($oldvid.FullName, '.mp4') .ffmpeg.exe -i $oldvid.FullName -y -vcodec copy -acodec ac3 $newvid } $oldvid is a .NET FileInfo object and when it needs to be converted to a string, it can be just the filename and not the whole path. That won't work for files not in the current dir. So just use the FullName property to get the full path.

Categories : Powershell

ffmpeg set auto height
I dont know if it is possible via ffmpeg (but I dont think so, because I was using ffmpeg a while ago and dont remember there was something like this in api), but your goal would be to run one more ffpeg command to get informations about the file and then you can fit your height and width via php: $cmd = "ffmpeg -i /var/www/web1/bates.avi 2>&1"; if(preg_match('/Video: ((w+), (w+), (w+))/s', `$cmd`, $video)) { $video = $video[1]; print_r($video); //flv, yuv420p, 384x204 #or $video = $video[4]; print_r($video); //384x204 }

Categories : PHP

Qt C++ ffmpeg cannot find library
Configure PRO-file as shown below: INCLUDEPATH += C:programmingffmpeg-20130606-git--win32-devinclude LIBS += -LC:programmingffmpeg-20130606-git--win32-devlib LIBS += -lavcodec -lavformat -lavutil Then, build the project, copy the all dll libraries from C:programmingffmpeg-20130606-git--win32-sharedin to exe output path and run application. UPD Maybe you need to copy some of the following libraries from Qt5.0.2mingw47_32in: libgcc_s_sjlj-1.dll libstdc++-6.dll libwinpthread-1.dll

Categories : C++

ffmpeg cannot detect file while os can
The problem is that you've set up your system so every new cmd.exe shell immediately cd's to your Documents directory, so ffmpeg is trying to run there. The obvious way around that is to just give ffmpeg absolute paths instead of relative: images = os.path.abspath('.\images') cmd = "ffmpeg -f image2 -r 20 -i {}\image%01d.png -c:v libx264 -r 20 {}\output.mp4".format(images, images) Alternatively, you can always stick a cd command into what you send to the system function: curpath = os.path.abspath(os.getcwd()) cmd = "cd {} && ffmpeg -f image2 -r 20 -i .\images\image%01d.png -c:v libx264 -r 20 .\images\output.mp4".format(curpath) However, the best solution is to stop using system entirely, as the documentation for system suggests, and leave the shell out of it: cmd = "ffmpeg

Categories : Python

Can ffmpeg be used to output to bytes
Yes, it is. You gotta learn how to use the other protocols FFmpeg has. Input/output to a file is just a particular protocol... but you can output, for example, to a socket, to a FTP/HTTP, and so on... It's very easy for anyone to create a new protocol (in C, of course) and register it with FFmpeg. I don't think FFmpeg has a built-in solution to write to a buffer, but for sure it's possible. I've done this once.

Categories : C#

FFmpeg: HLS options cannot be set/get/find
Try passing in the priv_data field of AVFormatContext (ofmt->priv_data) instead of the struct itself. It will be NULL at this point in your code but it gets filled in after a call to avformat_write_header. av_opt_set_int(ofmt->priv_data, "hls_list_size", 10, AV_OPT_SEARCH_CHILDREN) should work at that point. If the options need to be set before calling avformat_write_header() like your options for Live Streaming, you should pass them as the AVDictionary** options argument to that function.

Categories : C++

Problems with executing FFMPEG through PHP
Any time you have an exec that doesn't work in php, you should switch to passthru for debugging. passthru('../../../../../../usr/bin/ffmpeg -ab 320k -i source.wav dest320.mp3 1 2>&1'); Appending 1 2>&1 to the end, pipes your stderr to stout, and returns any errors you have while running your exec.

Categories : PHP

Run FFmpeg executable from sdcard
You can issue permissions pragmatically to any files that resides on sd-card. Create a file object and try this file.setExecutable(boolean); – true, allows execute, false disallows it. I hope this works.

Categories : Java

FFmpeg error code 254
Error code 254 for FFprobe means: File not found. Thanks to blahdiblah for the tip removing -v quiet from the command. The TESTVIDEOPATH was given with " at the beginning and end to get spaces in the pathname to work. When executing it, Java excaped these " and put some extra around.

Categories : Java

ffmpeg process saying it is erroring
What you are experiencing is the standard practice across all *NIX tools: they send the "business value" data to stdout and separately send any diagnostic output to stderr. This is an important hallmark of tools written in the "small is beautiful" paradigm, which greatly values the concept of piping one tool's output into the next one's input, thereby creating an ad-hoc chain of information processing. The complete scheme would break down if the tool sent "Processing... 50% done" kind of output to stdout. Feel free to ignore such output on stderr, but make sure you consume it, as you are doing now, in order to avoid blocking due to overfull output buffers.

Categories : Java

FFMPEG compiling on heroku
I have forgotten to add all subpaths to the LD_LIBRARY_PATH So I changed my heroku variable from LD_LIBRARY_PATH: vendor/ffmpeg/lib:/usr/local/lib to LD_LIBRARY_PATH: vendor/x264/lib:vendor/mp3lame/lib:vendor/ffmpeg/lib:/usr/local/lib via heroku config:set LD_LIBRARY_PATH=vendor/x264/lib:vendor/mp3lame/lib:vendor/ffmpeg/lib:/usr/local/lib I have made a gist with detailed compiling instructions for FFMPEG on HEROKU https://gist.github.com/klangfeld/6009744

Categories : Ruby On Rails

How to call ffmpeg from Activity?
You should follow basically this steps: Build ffmpeg for android (http://bambuser.com/opensource) Load the ffmpeg library (*.so) on your app Use native calls (JNI) to call ffmpeg APIs

Categories : Android

Need help on ffmpeg batch script
This would be my suggestion. Looks like this was follow-up from your previous thread. #!/bin/bash [ -n "$BASH_VERSION" ] || { echo "You need Bash to run this script." exit } shopt -s extglob || { echo "Unable to enable exglob." exit 1 } until read -erp "Drop source folder: " SOURCE [[ -d $SOURCE ]] do echo "Drop source folder does not exist: $SOURCE" echo "You can abort this script by pressing CTRL-C." done until read -erp "Drop destination folder: " DES [[ -d $DES ]] do echo "Drop destination folder does not exist: $DES" echo "You can abort this script by pressing CTRL-C." done while IFS= read -r FILE; do BASE=${FILE##*/} NOEXT=${BASE%.???} echo ffmpeg -i "$FILE" -vcodec prores -profile:v 0 -an "$DES/${NOEXT}.mov" ## Remov

Categories : Bash

FFmpeg 0.8 - Compile library to convert mp2 to mp4
I tried lots of tutorials but the one that worked for me was this one (and it is a lot newer), then I used avformat_open_input to open it: http://bambuser.com/opensource Please also post how you are creating gFormatCtx and the gFileName value! I followed this tutorial, even though it is for an old version, it is great to learn: http://dranger.com/ffmpeg

Categories : Android

ffmpeg to opengl texture with glTexImage2D
In your source code you have these lines: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 1 ? GL_REPEAT : GL_CLAMP ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 1 ? GL_REPEAT : GL_CLAMP ); First of all, the values you want to set are integers, so you have to use glTexParameteri (note the i at the end). Second, first you disable mipmapping, then you try to reenable it. If you want to mipmap, you must supply a full image pyramid (within the selected LoD range). For a video player you normally want to disable mipmapping: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); I converted my video to 512x256 to comply

Categories : Opengl

Video Trimming via ffmpeg twice crash
Your problem may be related to discussion here The linked thread is old but symptom there was that android/JNI call to ffmpeg worked first time but not the second time. As noted in the thread, the solution is to explicitly unload/load the library in between successive calls to ffmpeg. you could try it.

Categories : Android

cannot link ffmpeg libraries for my own Qt project
ld: warning: directory not found for option '-L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' ld: warning: directory not found for option '-F/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' Did you install your Qt on /tmp and it got after a reboot autodeleted? I am not an OSX user, so this platform might work differently than I think, but it nowhere looks good when the linker tries to access folders, which don't exist.

Categories : Qt

Starting Multiple FFmpeg Sessions
If you want to run processes in parallel, you need to place an ampersand & at the end of the process execution line, to inform the shell you want it running in the background. For example, this command runs the five processes in sequence (about ten seconds): $ date;for i in 1 2 3 4 5;do sleep 2;done;date Tue, Sep 10, 2013 4:05:32 PM Tue, Sep 10, 2013 4:05:43 PM Whereas this one only takes two seconds because they're running in parallel: $ date;for i in 1 2 3 4 5;do sleep 2 & done;wait;wait;wait;wait;wait;date Tue, Sep 10, 2013 4:05:45 PM [1] 6116 [2] 4940 [3] 7040 [4] 6944 [5] 3592 [1] Done sleep 2 [2] Done sleep 2 [3] Done sleep 2 [4]- Done sleep 2 [5]+ Done sleep 2 Tue,

Categories : Linux

ffmpeg pipe blocks while capturing
I found the solution by myself, after reading this article: the problem was that the errorStreamwas full and it had to be read to let the process to continue its work, so I inserted a Thread that consumes the errorStream: public InputStream getInputStream() throws Exception { try { process = Runtime.getRuntime().exec("ffmpeg -f dshow -i video="" + query + "":audio="" + microPhoneName + "" -r 25 -vcodec mjpeg -acodec mp3 -f " + getContentExtension() + " -"); new Thread("Webcam Process ErrorStream Consumer") { public void run() { InputStream i = process.getErrorStream(); try { while (!isInterrupted()) { i.read(new byte[bufferLength]); } } catch (IOE

Categories : Java

Error in ffmpeg when reading from UDP stream
Incoming frames needs to be handled in a callback function. So the mechanism should be such that a callback gets called whenever there is a new frame. In this way there is no need to manually fine tune the delay. Disclaimer: I have not used ffmpeg APIs.

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.