如何使用gnlcomposition连接视频文件?

发布于 2024-08-25 15:59:18 字数 551 浏览 3 评论 0原文

我正在尝试使用 gstreamer 的 gnonlin 组件连接两个视频文件。

我使用的管道是

gst-launch-0.10 gnlcomposition { gnlfilesource name="s1" location="/home/s1.mp4" start=0uration=2000000000 media-start=0 media-duration=2000000000 gnlfilesource name="s2 “位置=“/home/s2.mp4”开始= 2000000000持续时间= 2000000000媒体开始= 0媒体持续时间= 2000000000}!队列 !视频率!进度报告名称=“合并进度” ! ffmpeg颜色空间 ! ffenc_mpeg4 ! ffmux_mp4 ! filesink location="/home/merge.mp4"

因此,在参数中指定的持续时间内我只获得第二个文件。尝试了几件事,也在谷歌上搜索,但我无法找出上述命令的问题。谁能指出我做错了什么?也欢迎任何其他根据时间将多个文件连接成一个文件的方式。

谢谢

I am trying to concatenate two video files with the gnonlin components of the gstreamer.

The pipeline I am using is

gst-launch-0.10 gnlcomposition { gnlfilesource name="s1" location="/home/s1.mp4" start=0 duration=2000000000 media-start=0 media-duration=2000000000 gnlfilesource name="s2" location="/home/s2.mp4" start=2000000000 duration=2000000000 media-start=0 media-duration=2000000000 } ! queue
! videorate ! progressreport name="Merging Progress"
! ffmpegcolorspace
! ffenc_mpeg4
! ffmux_mp4
! filesink location="/home/merge.mp4"

As a result I am getting only the second file for the duration specified in the parameters. Tried several things and also searched on google but I could not figure out the problem with the above command. Can anyone point what i am doing wrong? Any other way of concatenating multiple files into one based on time is welcome too.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

破晓 2024-09-01 15:59:18

我发现问题出在合成创建的帧时间戳上。在编码修复问题之前,使用单段设置为 true 的恒等元素。

I found out the problem was with frame timestamps created by the composition. Using an identity element with single-segment set to true, before the encoding fixed the problem.

疑心病 2024-09-01 15:59:18

你能发布最终的管道吗?我把身份元素放在所有地方,但没有用。
另外,我在读取 mp4 文件时遇到问题(它说此文件不包含可播放的流)

Could you post the final pipeline. I put the identity element in all places but didn't work.
Also, I had problems reading mp4 files(It said This file contains no playable streams)

哥,最终变帅啦 2024-09-01 15:59:18

我最终用 Python 完成了这项工作。查看此处了解详细信息。

http://www.opensource-archive.org/showthread.php?t= 178364

I ended up doing this work in Python. Look here for details.

http://www.opensource-archive.org/showthread.php?t=178364

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文