使用gstreamer和gst-launch循环播放视频? [英] Looping a video with gstreamer and gst-launch?
本文介绍了使用gstreamer和gst-launch循环播放视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用gstreamer的gst-launch
在命令行上播放视频,如下所示:
I am able to play a video on the command line with gstreamer's gst-launch
like this:
gst-launch gnlfilesource location=file:///tmp/myfile.mov start=0 duration=2000000000 ! autovideosink
这将播放/tmp/myfile.mov中文件的前2秒,然后视频播放停止.无论如何,有没有让它反复循环?即将2秒长的gnlfilesource
变成无限长的视频,可以一次又一次地播放那2秒?
This plays the first 2 seconds of the file in /tmp/myfile.mov, afterwards the video playback stops. Is there anyway to get this to loop repeatidly? i.e. turn the 2 second long gnlfilesource
into an infinite length video that plays those 2 seconds again and again and again?
推荐答案
假设bash ...
Assuming bash...
将其包裹在while
循环中?
while true; do [your command]; done
其中true
不能成功执行任何操作,即
where true
does nothing sucessfully, i.e.
true: true
Return a successful result.
Exit Status:
Always succeeds.
它允许您创建无限循环,例如
It allows you to create infinite loops, e.g.
$ while true; do echo "run..."; sleep 1; done
run...
run...
run...
run...
run...
...
这篇关于使用gstreamer和gst-launch循环播放视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文