如何使用gstreamer&smpte将2个视频文件与gst-launch连接起来?

时间:2022-09-08 20:01:41

I have 2 video files (vid1.mov and vid2.mov), both have the same frame size and frame rate. I want to have 1 final video with shows vid1.mov and then vid2.mov, one after the other. I also want there to be a transition from one video to another (rather than an abrupt change of video), and have discovered the smpte plugin for gstreamer, which goes what I want.

我有2个视频文件(vid1.mov和vid2.mov),两者都具有相同的帧大小和帧速率。我希望有一个最后的视频与节目vid1.mov然后vid2.mov,一个接一个。我也希望从一个视频转换到另一个视频(而不是视频的突然改变),并且已经发现了gstreamer的smpte插件,这正是我想要的。

Using gst-launch on the ubuntu linux command line, how can I merge the 2 videos together with a transition?

在ubuntu linux命令行中使用gst-launch,如何将2个视频与转换合并?

(Assume I want to use the same transition as in the smpte example of 2 seconds long and type=234)

(假设我想使用与2秒长的smpte示例相同的转换,并且类型= 234)

I tried modifying the smpte example like this:

我尝试像这样修改smpte示例:

gst-launch filesrc location=vid1.mov ! decodebin ! ffmpegcolorspace ! smpte name=s border=20000 type=234 duration=2000000000 ! ffmpegcolorspace ! ximagesink filesrc location=vid2.MOV ! decodebin ! ffmpegcolorspace ! s.

It starts playing both videos at the same time, then transitioning from one to the other, so it only shows 2sec of vid1.mov, and then plays all of vid2.mov. How can I get it play all of vid1.mov, then 2sec before vid1.mov ends, it starts playing vid2.mov, and starts transitioning, so that it finishs transitioning just as vid1.mov ends, it should then continue to play all of vid2.mov as normal.

它开始同时播放两个视频,然后从一个转换到另一个,所以它只显示2秒的vid1.mov,然后播放所有的vid2.mov。如何让它播放所有vid1.mov,然后在vid1.mov结束前2秒,它开始播放vid2.mov,并开始转换,以便它完成转换,就像vid1.mov结束一样,它应该继续播放所有vid2.mov正常。

1 个解决方案

#1


0  

Someone else has pointed me to GNonLin, for gstreamer non-linear editing stuff, which would be used with this. However I have other problems with it cf. Video Transitions with GStreamer & GNonLin not working

其他人已经指出我的GNONLin,用于gstreamer非线性编辑的东西,将与此一起使用。但是我有其他问题参考。 GStreamer和GNonLin的视频转换不起作用

#1


0  

Someone else has pointed me to GNonLin, for gstreamer non-linear editing stuff, which would be used with this. However I have other problems with it cf. Video Transitions with GStreamer & GNonLin not working

其他人已经指出我的GNONLin,用于gstreamer非线性编辑的东西,将与此一起使用。但是我有其他问题参考。 GStreamer和GNonLin的视频转换不起作用