[FFmpeg-user] ffmpeg transitions not working
iburman at compuscience.com
iburman at compuscience.com
Sat Jun 19 21:50:06 EEST 2021
Correction - adding the pix_fmt worked "Parcially"...
When I checked it further I noticed that in the final video, the first part
(before the transition) had the audio, but the second part had only video
without the audio.
I'm probably missing some parameter here to ask for the audio to be kept,
but I have no clue...
Can somebody please help?
From: iburman at compuscience.com <iburman at compuscience.com>
Sent: Saturday, June 19, 2021 4:58 PM
To: 'FFmpeg user questions' <ffmpeg-user at ffmpeg.org>
Subject: RE: [FFmpeg-user] ffmpeg transitions not working
Yes, adding this parameter worked. Thanks for your suggestion, it allows me
to generate the transitions I need...
But I'm curious to understand why this parameter is required. All samples I
was able to find for transitions, nobody included it.
Also, both videos that I'm using are cut out from a larger video file, so
all their encoding parameters are the same. Shouldn't ffmpeg have all the
parameters it needs?
As for the player, I am not using anything in special, it is the default
that plays an mp4 in Windows 10. In task manager it shows up as Movies & TV
with a process name of Video.Ui.exe and a child process of
RuntimeBroker.exe. It works fine with all my mp4. Also, all videos generated
with ffmpeg, like extracting a video, concatenate videos, etc., show fine
with this player. Just the transition doesn't work.
By the way, I tried to open the bad files with Media Player and it also
shows all black. It doesn't seem to be a player issue.
An additional question - although your suggestion worked, the generation of
the file also took a long time, like with my unsuccessful trials. Are
transitions expected to take so long time? I'm wondering because everything
else I did with ffmpeg so far has been very fast.
Please excuse my questions, the video manipulation is quite new for me...:)
Thanks for your help
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Gyan Doshi
Sent: Saturday, June 19, 2021 3:56 PM
To: ffmpeg-user at ffmpeg.org
Subject: Re: [FFmpeg-user] ffmpeg transitions not working
On 2021-06-19 18:22, iburman at compuscience.com wrote:
> I'm having problems with transitions. To be sure I am not making
> something wrong, I simply copy/paste the example shown in
> https://ffmpeg.org/ffmpeg-filters.html#xfade, adjusted my two video
> file names to comply with the example, and got the same problems as
> with my own commands.
> The example on the site shows this: ffmpeg -i first.mp4 -i second.mp4
> -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
> My first and second files have 1 min each.
> First I run the command without any change; obviously offset 5 isn't
> appropriate but I gave it a try.
> Second I adjusted duration to 10 and offset to 55 to be appropriate
> with my two mp4 files. The result was the same:
> The final output.mp4 has the right duration (1:55) but it is totally
> What I see during execution is that the first video is read/copied to
> output.mp4 quite fast. After that it starts reading second.mp4 and
> works a very long time on it, probably close to one minute.
ffmpeg -i first.mp4 -i second.mp4 -filter_complex
xfade=transition=fade:duration=2:offset=5 -pix_fmt yuv420p output.mp4
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org
with subject "unsubscribe".
More information about the ffmpeg-user