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

Fixes the display of minutes in the video player #5140

Merged
merged 2 commits into from Aug 8, 2023
Merged

Fixes the display of minutes in the video player #5140

merged 2 commits into from Aug 8, 2023

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Aug 8, 2023

Tiniest PR ever, just to fix: #5132

Test with:

import gradio as gr

with gr.Blocks() as demo:
    gr.Video("https://kevinqhlin-univtg.hf.space/file=/tmp/gradio/a4dc9029d4e7eb3a2ae7bba8316a4a10ade920a0/youtube.mp4")
    
demo.launch()

Or if you want to create longer local video files:

from moviepy.editor import *

def color_clip(size, duration, fps=25, color=(0,0,0), output='color.mp4'):
    ColorClip(size, color, duration=duration).write_videofile(output, fps=fps)

size = (200, 100)
duration = 2*60*60

color_clip(size, duration)

import gradio as gr

with gr.Blocks() as demo:
    gr.Video("color.mp4")
    
demo.launch()

@vercel
Copy link

vercel bot commented Aug 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gradio ✅ Ready (Inspect) Visit Preview Aug 8, 2023 8:58pm

@gradio-pr-bot
Copy link
Contributor

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/video patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fixes the display of minutes in the video player

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Aug 8, 2023

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-5140-all-demos


You can install the changes in this PR by running:

pip install https://gradio-builds.s3.amazonaws.com/5ff6ae3e23f9d94556ee0ac32c81695969b9eae6/gradio-3.39.0-py3-none-any.whl

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @abidlabs !

@abidlabs
Copy link
Member Author

abidlabs commented Aug 8, 2023

Thanks @freddyaboulton

@abidlabs abidlabs merged commit cd1353f into main Aug 8, 2023
9 checks passed
@abidlabs abidlabs deleted the video-time branch August 8, 2023 21:31
@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Aug 8, 2023

🎉 Chromatic build completed!

There are 0 visual changes to review.
There are 0 failed tests to fix.

@pngwn pngwn mentioned this pull request Aug 9, 2023
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

Successfully merging this pull request may close these issues.

gradio video player: time numbers under 10 are not displayed properly as :01
3 participants