Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to write infinite looping videos? #206

Closed
t-io opened this issue Sep 8, 2015 · 2 comments
Closed

Is it possible to write infinite looping videos? #206

t-io opened this issue Sep 8, 2015 · 2 comments

Comments

@t-io
Copy link

t-io commented Sep 8, 2015

I'm wondering if something like this is possible somehow. To have a video which loops infinite without specifying a duration or number of loops.
The loop() Function is decorated with @requires_duration but the duration and number of loops also can be empty. So I assume it's technically not possible to force something like an .mp4 to auto-loop.
I tried this:

url = 'http://www.gifbin.com/bin/1236242020_JessicaBielTheTexasChainsaw.gif'
clip = mp.VideoFileClip(url)
cc = clip.fx(vfx.loop)
cc.write_videofile("gif_video.mp4")

but always end up in a ValueError("Attribute 'duration' not set")
Do you know a clever way to loop a .mp4 without bloating the filesize?
By the way thanks for the cool library :)

@Red5d
Copy link

Red5d commented Oct 6, 2015

I don't think the mp4 format allows for looping the video. The software playing the video would have to do that.

@t-io
Copy link
Author

t-io commented Oct 7, 2015

yes, I figured this out by myself. Thanks for your reply. I close this one.

@t-io t-io closed this as completed Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants