使用 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...
将其包裹在 while
循环中?
Wrap it in a while
-loop?
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屋!
查看全文