[FFmpeg-user] hstack with one video offset in time?

Michael Koch astroelectronic at t-online.de
Sat Mar 6 00:00:17 EET 2021


Am 05.03.2021 um 20:33 schrieb Steven Kan:
>>>> I’d like to assemble these videos, side-by-side, but synced in time, which
>>>> means the TrailDown video needs to start 50 seconds after the TrailUp
>>>> video. The TrailDown side can be black/blank, or it can be stuck on the
>>>> first frame of its video while the right side plays for the first 50
>>>> seconds; it doesn’t matter to me.
>>>>
>>>> I’ve tried all of the following:
>>>>
>>>> -itsoffset 50 -i TrailDown.mp4 -i TrailUp.mp4
>>>> -itsoffset 50 -i TrailDown.mp4 -itsoffset 0 -i TrailUp.mp4
>>>> -i TrailDown.mp4 -itsoffset -50 -i TrailUp.mp4
>>>>
>>> see tpad filter, need recent version.
>> Thanks! I have figured out the syntax to pad a single video with tpad, e.g.:
>>
>> ffmpeg -i /Users/steven/Downloads/Record/DownLoad/TrailDown_ch1_20210304010952_20210304011838.mp4 -filter_complex "tpad=start_duration=50" tPadOut.mp4
>>
>> but I’m having trouble with the syntax to delay only one of two videos in an hstack filter:
>>
>> ffmpeg -i /Users/steven/Downloads/Record/DownLoad/TrailDown_ch1_20210304010952_20210304011838.mp4 -i /Users/steven/Downloads/Record/DownLoad/TrailUp_ch1_20210304010838_20210304011506.mp4 -filter_complex "tpad=start_duration=50[v0];hstack=inputs=2” Coyote2Up.mp4

try this command line:

ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0]tpad=start_duration=50[a];[a][1]hstack" out.mp4


Michael



More information about the ffmpeg-user mailing list