Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
error in frame size while using ffmpeg
30 septembre 2016, par Rishabh Mishra -
Combine/Concatenate 3 videos with crossfade
29 septembre 2016, par ZalonI wan't to combine 3 videos using ffmpeg, and have a crossfade between the videos. I've been able to do this with 2 videos using the code below.
What I would like to do is have a end result like this:
intro
video outro Can someone help me convert this code to be used with 3 videos?
ffmpeg -i intro.mp4 -i video.mp4 -an \ -filter_complex \ " [0:v]trim=start=0:end=9,setpts=PTS-STARTPTS[firstclip]; [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc]; [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[fadein]; [fadeoutsrc]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[fadeout]; [fadein]fifo[fadeinfifo]; [fadeout]fifo[fadeoutfifo]; [fadeoutfifo][fadeinfifo]overlay[crossfade]; [firstclip][crossfade][secondclip]concat=n=3[output]; [0:a][1:a] acrossfade=d=1 [audio] " \ -map "[output]" -map "[audio]" result.mp4
-
Capture 2 screens with ffmpeg
29 septembre 2016, par wetjoshI want to capture simultaneous screen recordings of my main display and the connected display and either save them as two different files or a single file with the video side by side.
Can either of these be accomplished? It seems like the latter can but I haven't had success with it. I've tried to follow this but all I've ended up creating with it is a double wide movie (good) with the main display recording twice (bad) and not properly scaled.
Here is my working command that captures just one display:
ffmpeg -capture_cursor 1 -capture_mouse_clicks 1 \ -f avfoundation -pix_fmt uyvy422 -i 1 -pix_fmt yuv420p -r 30 \ -s 1440x900 -preset ultrafast -b:v 5000k -t 60 out.mov
And here is my non-working attempt at capturing both and saving them in one movie:
ffmpeg -capture_cursor 1 -capture_mouse_clicks 1 \ -f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 0 \ -f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 1 \ -pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 5 \ -filter_complex "nullsrc=size=2880x900 [base]; \ [base][0:v] overlay [tmp]; [tmp][1:v] overlay=x=1440" \ out.mov
I did not see anything on the web about saving them as two different files. Is it possible to specify two output files?
-
raspberry pi 3 OpenMax EmptyThisBuffer slow response when transcoding with libav or ffmpeg
29 septembre 2016, par A. H.The context is transcoding on a Raspberry Pi 3 from 1080i MPEG2 TS to 1080p@30fps H264 MP4 using libav avconv or ffmpeg. Both are using almost idenitical omx.c source file and share the same result.
The performance is short of 30fps (about 22fps) which makes it unsuitable for live transcoding without reducing the frame rate.
By timestamping the critical code, I noticed the following:
OMX_EmptyThisBuffer can take 10-20 msec to return. The spec/document indicates that this should be < 5msec. This along would almost account for the performance deficit. Can someone explains why this OMX call is out of spec?
In omx.c, a zerocopy option is used to optimized the image copying performance. But the precondition (contiguous planes and stride alignment) for this code is never satisfied and this the optimization was never in effect. Can someone explain how this zerocopy optimization can be employed?
Additional question on h264_omx encoder: it seems to on accept MP4 or raw H264 output format. How difficult it is to add other format, e.g. TS?
Thanks
-
Convert video as soon as possible to 854x480p and bitrate 1100kb/s [ffmpeg]
29 septembre 2016, par JensejIs any fast solution to convert video file to 854x480p and bitrate 1100kb/s using ffmpeg. because now it goes with speed of 10 kb / s.
I using this command:
ffmpeg -y -threads 8 -i /var/filmy/'.$new_name.' -b 1200k -minrate 1200k -maxrate 1200k -bufsize 1200k -ab 124k -vcodec libx264 -acodec aac -strict -2 -ac 2 -ar 44100 -s 854x480 -y /var/filmy/'.implode('.',array_slice(explode('.',$result['ffilename']), 0, -1)).'.mp4
CPU: model name : Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
RAM: 32 GB
there is a solution?