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

Convert gif to video has back background at the end of the video #143

Closed
noppanit opened this issue Mar 10, 2015 · 3 comments
Closed

Convert gif to video has back background at the end of the video #143

noppanit opened this issue Mar 10, 2015 · 3 comments

Comments

@noppanit
Copy link

I'm using MoviePy to convert gif to mp4 and the result has black background at the end resulting in the video keeps blinking when play in loop. I was thinking of cut the last frame out but I might have missed something obvious here.

Here's the code

        video = VideoFileClip(gif_path)
        video.save_frame(saving_snapshot_filename)

        result = CompositeVideoClip([video])
        result.write_videofile(saving_mp4_filename)
@Zulko
Copy link
Owner

Zulko commented Mar 10, 2015

I am not sure I understand the issue. Have you tried this ?

video = VideoFileClip(gif_path)
video.write_videofile(saving_mp4_filename)

Also, can you describe more precisely that "black background at the end" thing. You have a completely black frame ?

@noppanit
Copy link
Author

I believe that solved the issue.
And here's what I meant if you tried this in HTML

<!doctype>
<html>

<head>
    <title>
    </title>
</head>
<body>
    <video src="https://dl.dropboxusercontent.com/u/27106646/57203191c21df0cacf98f3fa9340f4.mp4" autoplay="" loop=""></video>
</body>
</html>

@Zulko
Copy link
Owner

Zulko commented Mar 13, 2015

Cool, I'm closing the issue. I didn't see any black frame in your linked example btw, I don't understand what was wrong.

@Zulko Zulko closed this as completed Mar 13, 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