如何使用gnlcomposition连接视频文件?
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现问题出在合成创建的帧时间戳上。在编码修复问题之前,使用单段设置为 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.
你能发布最终的管道吗?我把身份元素放在所有地方,但没有用。
另外,我在读取 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)
我最终用 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