On Sat, Jun 19, 2021 at 8:50 PM <ibur...@compuscience.com> wrote: > 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... >
The xfade filter only process video. For audio you will need to use acrossfade filter, with same offset and transition duration. > > Can somebody please help? > > Thanks! > > -----Original Message----- > From: ibur...@compuscience.com <ibur...@compuscience.com> > Sent: Saturday, June 19, 2021 4:58 PM > To: 'FFmpeg user questions' <ffmpeg-user@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 > > > > -----Original Message----- > From: ffmpeg-user <ffmpeg-user-boun...@ffmpeg.org> On Behalf Of Gyan Doshi > Sent: Saturday, June 19, 2021 3:56 PM > To: ffmpeg-user@ffmpeg.org > Subject: Re: [FFmpeg-user] ffmpeg transitions not working > > > > On 2021-06-19 18:22, ibur...@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 > black. > > > > > > > > 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. > > Which player? > > Try > > ffmpeg -i first.mp4 -i second.mp4 -filter_complex > xfade=transition=fade:duration=2:offset=5 -pix_fmt yuv420p output.mp4 > > > Regards, > Gyan > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org > with subject "unsubscribe". > > > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".