有没有 gstreamer 插件可以扩展视频流?

发布于 2024-10-14 14:27:51 字数 201 浏览 3 评论 0原文

我的 gstreamer 版本是 0.10,我想通过在顶部和底部插入空白将 16:9 视频扩展为 4:3。

我用 gst-inspect 搜索了插件列表。有“videoscale”和“videocrop”,但没有“videoexpand”。

有没有直接完成这项工作的插件?

编辑:问题已经解决。 “videobox”过滤器正好满足我的需求。

My gstreamer version is 0.10 and I want to expand a 16:9 video to 4:3 by inserting blanks at top and bottom.

I searched the plugin list with gst-inspect. There're "videoscale" and "videocrop", but no "videoexpand".

Are there any plugins that directly do the job?

Edit: The problem has been solved. The "videobox" filter just fit my demand.

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

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

发布评论

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

评论(4

此生挚爱伱 2024-10-21 14:27:51

查看 videobox 过滤器。它可以生成任何宽高比的信箱视频。通过添加透明边框以匹配较大视频的大小,将较小的视频合成在较大的视频之上也很有用(请参阅 http://www.oz9aec.net/index.php/gstreamer/347-more-gstreamer-tips-picture-in-picture-合成)。

Check out the videobox filter. It can produce letterboxed video for any aspect ratio. It's also useful for compositing a smaller video on top of a larger one by adding a transparent border to match the larger video's size (see http://www.oz9aec.net/index.php/gstreamer/347-more-gstreamer-tips-picture-in-picture-compositing).

我的黑色迷你裙 2024-10-21 14:27:51

由于我是 stackoverflow 的新手,因此不允许我发布两个链接。您可能还想检查

Since I am new to stackoverflow, I wasn't allowed to post two links. You might like to check this as well.

oО清风挽发oО 2024-10-21 14:27:51

我将在这里放下我的两分钱,因为这篇文章引导我找到了我认为相关问题的解决方案(将不确定分辨率和宽高比的输入视频缩放到具有固定分辨率的显示器):

添加< code>add-borders=true 添加到 videoscale 元素将通过根据需要填充字母/支柱框来保留宽高比。

对我来说有一个小警告,因为我的项目是使用静态定义 AR 会出现问题的动态输入,确保在我的管道中包含包含 pixel-aspect-ratio=1/1 的 caps 过滤器,以定义输出 AR(与 < code>height 和 width 参数与 pixel-aspect-ratio 一起指定)。

** 尽管即使不缩放,您仍然可以从 add-borders 中受益,但文档指出“将此元素插入管道中是安全的 [...],无需任何成本如果不需要缩放。”

I'll drop my two cents here as this post lead me to the solution for what I think is a related problem (scaling** input video of indeterminate resolution and aspect ratio to a display with a fixed resolution):

Adding add-borders=true to the videoscale element will preserve aspect ratio by padding letter/pillar -boxes as necessary.

One minor caveat for me, as my project was working with dynamic input for which statically defining AR would be problematic, was ensuring a caps filter containing pixel-aspect-ratio=1/1 was in my pipeline, to define the output AR (in concert the height and width params specified alongside pixel-aspect-ratio).

** Though you can still benefit from add-borders even when not scaling—the documentation calls out that it is "safe to insert this element in a pipeline [...] without any cost if no scaling is needed."

梦纸 2024-10-21 14:27:51

我认为你应该使用 ffmpeg 。

检查下面的链接

http://www.ffmpeg.org/ffmpeg-doc.html

I think you should use ffmpeg for that.

Check below link

http://www.ffmpeg.org/ffmpeg-doc.html

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