使用videomixer [GStreamer]合并多个图像文件 [英] Combine multiple image files using videomixer [GStreamer]

查看:403
本文介绍了使用videomixer [GStreamer]合并多个图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用videomixer将来自Internet的多个图像文件与Gstreamer 0.10合并. 我在下面编写了命令行:

I want to combine multiple image files from the internet with Gstreamer 0.10 using a videomixer. I wrote the command line below :

gst-launch videomixer name=mixer ! xvimagesink \
    uridecodebin uri=http://www.geocyclab.fr/wp-content/uploads/2011/10/linux_crystalized_tux.jpg ! \
                videoscale ! video/x-raw-yuv,width=200,height=200 ! \
                ffmpegcolorspace ! \
                imagefreeze ! \
                videobox border-alpha=0 top=0 left=0 ! mixer. \
    uridecodebin uri=http://www.thetechherald.com/media/images/201148/Security-vendors-warn-against-leaked-Windows-7-downloads-windowslogo_1.jpg ! \
                videoscale ! video/x-raw-yuv,width=200,height=200 ! \
                ffmpegcolorspace ! \
                imagefreeze ! \
                videobox border-alpha=0 top=-200 left=0 ! mixer. \
    uridecodebin uri=http://www.colins-it.co.uk/images/Apple-App-Store_21.jpg ! \
                videoscale ! video/x-raw-yuv,width=200,height=200 ! \
                ffmpegcolorspace ! \
                imagefreeze ! \
                videobox border-alpha=0 top=0 left=-200 ! mixer.

此命令行有2个问题:

  1. 当我想要合并2个图像文件时,此命令行非常有用,但是当我添加第三个图像文件时,将出现黑屏而不是第一张图片.如果添加更多图片,这些图片将按照我的预期显示,但是在某些时候(我不记得确切的时间,可能是第7或第8张图片),除一张以外的所有图片都将隐藏在黑屏后面.

  1. When I want to combine 2 image files, this command line works great, but when I add the third one, a black screen appears instead of the first picture. If I add more pictures, these pictures will appear as I would expect, but at some point (I don't remember when exactly, maybe at the 7th or 8th picture), all pictures except one will be hiden behind black screens.

仅当我删除"video/x-raw-yuv"命令时我才能使用PNG文件,但是我想调整图片大小...我尝试了汤httpsrc + pngdec而不是uridecodebin,但是我没有不能取得好的结果.

I can use PNG files only if I delete the 'video/x-raw-yuv' command, but I want to resize the picture... I tried souphttpsrc + pngdec instead of uridecodebin, but I didn't succeed in having the good result.

有人可以帮助我吗?谢谢.

Can anyone help me ? Thank you.

如果我以相反的顺序(从右下角到左上角)添加视频框,则大多数图片上都不会再出现黑屏,但第一张图片上仍然有一个黑屏(top = 0,left = 0).

Edit : If I add the videoboxes in the opposite order (from bottom-right corner to upper-left corner), there are no more black screen on most of my pictures, but I still have one on the first picture (top=0 and left=0).

推荐答案

好,尝试一下,告诉我是否可行:

Ok try this and tell me if it works:

gst-launch videomixer2 sink_0::ypos=200 sink_2::xpos=200  name=mixer ! ffmpegcolorspace ! xvimagesink uridecodebin uri=http://www.geocyclab.fr/wp-content/uploads/2011/10/linux_crystalized_tux.jpg ! videoscale ! ffmpegcolorspace ! imagefreeze !  "video/x-raw-yuv, format=(fourcc)AYUV, width=200, height=200" ! mixer. uridecodebin uri=http://www.thetechherald.com/media/images/201148/Security-vendors-warn-against-leaked-Windows-7-downloads-windowslogo_1.jpg ! videoscale ! ffmpegcolorspace ! imagefreeze ! "video/x-raw-yuv, format=(fourcc)AYUV, width=200, height=200" ! mixer. uridecodebin uri=http://www.colins-it.co.uk/images/Apple-App-Store_21.jpg ! videoscale ! ffmpegcolorspace ! imagefreeze ! "video/x-raw-yuv, format=(fourcc)AYUV, width=200, height=200" ! mixer.

如果需要,您可以使用此管道用png替换jpg文件.但是对于位置,您现在应该像在此管道中那样在videomixer2上进行更改.

With this pipeline you should replace the jpg file by a png if you want. But for position now you should change on videomixer2 like in this pipeline.

这篇关于使用videomixer [GStreamer]合并多个图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆