Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
store ffmpeg command output to aws s3
18 mai 2018, par Jinal SomaiyaI run below command that is working perfectly in local file sysytem.
Command:
exec('ffmpeg -i '.config('medialibrary.s3.domain').'/listing_video/intro.mp4'.' -vf "drawtext=fontfile=' . storage_path('assets/video/FutuMd.ttf') . ': text=' . $request->get('intro_text') . ': x=300: y=450: fontsize=65: fontcolor=white: enable=\'between(t,2,5)\'" introfinal.mp4');
but i have to store file direct to s3 so i changed my command that is store file to s3 but filesize is 0B.
exec('ffmpeg -i '.config('medialibrary.s3.domain').'/listing_video/intro.mp4'.' -vf "drawtext=fontfile=' . storage_path('assets/video/FutuMd.ttf') . ': text=' . $request->get('intro_text') . ': x=300: y=450: fontsize=65: fontcolor=white: enable=\'between(t,2,5)\'" '.Storage::put('introfinal.mp4', '').'');
Thanks in advance!
-
fluent-ffmpeg : Unable to remove video screenshot after creation
18 mai 2018, par mirgI've the following code that creates a screenshot for the video I've uploaded;
var thumbFileName = 'tmp_file.jpg'; ffmpegCommand = ffmpeg(videoFile) .on('end', function() { callback(null, tempUploadDir + thumbFileName) }) .on('error', function(err) { callback(err); }) .screenshots({ timestamps: ['50%'], filename: thumbFileName, folder: tempUploadDir });
the code works pretty well and the screenshot is created. The callback read the file stream and store it into the database and eventually try to delete the
thumbFileName
from the filesystem.And here is the issue I'm encountering, basically I'm not able to delete the file, even if I try it manually its say that the file is locked by another process (NodeJS) and I can't download it until I stop the application.
In the callback I've also tried to kill the command with
ffmpegCommand.kill()
before to delete the screenshot but I'm still having the same issue. The file will be removed usingfs.unlink
and its working when the thumbnail is generated for an image (even post-processed with effects, achieved with sharp) but not with ffmpeg. Apparently ffmpeg is still running and that's why I can't delete the thumb. -
Putting two videos next to each other, improving performance
17 mai 2018, par ZurechtweiserI am using this command I put together with quite some effort to put two videos next to each other.
ffmpeg -y -i i1.mov -i i2.mp4 -filter_complex
[0:v]scale=1824:1026,pad=width=1920:height=1080:x=0:y=27:color=black,crop=1641:923:170:79,scale=1920:1080[vl];
[1:v]scale=2016:1134,crop=1759:1080:48:27,pad=width=1920:height=1080:x=161:y=0:color=black,crop=1641:923:170:79,scale=1920:1080[vr];
[vl][vr]hstack=shortest=1 -c:v libx264 -crf 23 -preset veryfast output
It works, but it is not elegant.
How to shorten it and make it more performant?
-
sending command into CMD in c#
17 mai 2018, par ShinoLexTazyI wanna simple send this string into cmd command line
string arg= "ffmpeg.exe - i " + txtInput.Text + " " + txtOutput.Text + "";
I tried this
Process.Start("cmd.exe", arg);
But nothing happen, so how can I execute this command in cmd without showing the cmd to the user?
-
how to get cmsamplebuffer data to avformate_open_input() function in FFMpeg ?
17 mai 2018, par Shahrear Mahmudi want to stream apple mobile camera to a UDP port using FFMPEG. so far i have already done it from a video file. but now i want to do it live from apple mobile camera. some body can give me some clue for this. my head is spining for this solution? Please help me.