Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to remove specific duration from video using ffmpeg
31 mars 2017, par Fidonai've tried many ways to solve the problem, i also tried this code before
ffmpeg -i movie.mp4 -vf trim=3:8 cut.mp4
but for the result, the audio is still there but the video is gone. all i want is the video and audio both are removed. can anyone help me how resolve this?
-
Combine A Video Only and a aac audio as fast as possible with ffmpeg or anything else
31 mars 2017, par BubunI want to combine a video (without audio), and a .AAC encoded audio file together as fast as possible. I don't want to convert anything, I just want to combine the both video and audio in a single playable file.
Here is what I tried:
First downloaded the video and it's audio files
And save them in a folder and combine both with ffmpeg.
The problem is, this is taking too much time. Please answer if you have any other way to do it, but please keep in mind that we need to use PHP for the job done.
-
iframeextractor complied error using FFmpeg 3.2.4
31 mars 2017, par asdemonI compile the FFmpeg-iOS using the script from https://github.com/kewlbear/FFmpeg-iOS-build-script
when I add the compiled .a file to the iframeextractor project, it appear such errors:
Undefined symbols for architecture i386: "_kVTProfileLevel_H264_Main_5_1", referenced from: _vtenc_init in libavcodec.a(videotoolboxenc.o) "_kVTProfileLevel_H264_Main_4_2", referenced from: _vtenc_init in libavcodec.a(videotoolboxenc.o) "_kVTProfileLevel_H264_Main_4_1", referenced from: _vtenc_init in libavcodec.a(videotoolboxenc.o) "_kVTProfileLevel_H264_Main_3_1", referenced from: _vtenc_init in libavcodec.a(videotoolboxenc.o) "_kVTProfileLevel_H264_Main_3_0", referenced from: _vtenc_init in libavcodec.a(videotoolboxenc.o) "_CMSampleBufferGetDecodeTimeStamp", referenced from: _vtenc_frame in libavcodec.a(videotoolboxenc.o) .... ld: symbol(s) not found for architecture i386
I search some where and add compile flag -libiconv and add
libz.dylib,libbz2.dylib,libiconv.dylib
, but the error goes onIs there some help?
-
[PHP]Combine A Video Only and a aac audio as fast as possible with ffmpeg or anything else
31 mars 2017, par BubunI wanna Come a video (Without Audio), And a .AAC encoded audio file together as fast as possible. I don't want to convert anything, I just wanted to combine the both video and audio in a single playable file. Here is what I exactly trying: First downloaded the video and it's audio files And save them in a folder and combine both with ffmpeg But the problem is this is taking too much time Please answer if you have any other way to do it,
But please keep in mind that we need to use PHP for the job done.
-
Reduce FFmpeg CPU Usage with cpulimit and PHP
31 mars 2017, par Matt McManisI run FFmpeg on my server using PHP
exec()
.It currently uses 100% of the cpu thread while encoding.
I followed this gude that uses a program called cpulimit to reduce it to 30%.
PHP
$args = "nice -19 cpulimit -l 30 -- ffmpeg -y -i intput.avi -vcodec libx264 -acodec aac -b:a 192k -threads 1 output.mp4" exec(escapeshellcmd($args));
FFmpeg/PHP works, and it will work with
nice
/cpulimit
through the terminal, but after adding
nice -19 cpulimit -l 30 --
to the PHP script it no longer works withexec()
.
Output
FFmpeg output returns blank. I'm not able to see the full output, I tried using:
$output = shell_exec($args); echo "
$output
"and
file_put_contents("/var/www/mysite/logs/$output.log", $line . PHP_EOL, FILE_APPEND);
But they return 1 empty line.
Solution
My thought is that www-data runs FFmpeg and
nice
/cpulimit
may need root?How can I get PHP
exec()
to work with FFmpeg args and cpulimit?Or is there an alternative way to limit the usage %?