Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:44:47+00:00 2026-06-14T00:44:47+00:00

If I am embedding a youtube video clip into an iPython notebook: from IPython.display

  • 0

If I am embedding a youtube video clip into an iPython notebook:

from IPython.display import YouTubeVideo
YouTubeVideo("Pi9NpxAvYSs")

Is there a way I can embed this such that it would play from a specific time? So 1:47:03 – 1 hour, 47 minutes and 3 seconds?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:44:48+00:00Added an answer on June 14, 2026 at 12:44 am

    Update

    Now you can use any parameter you like from the youtube player:

    from datetime import timedelta
    
    start=int(timedelta(hours=1, minutes=46, seconds=40).total_seconds())
    
    YouTubeVideo("Pi9NpxAvYSs", start=start, autoplay=1, theme="light", color="red")
    

    Old answer

    The current implementation doesn’t allow it, but it’s pretty easy to extend:

    from datetime import timedelta
    
    class YouTubeVideo(object):
        def __init__(self, id, width=400, height=300, start=timedelta()):
            self.id = id
            self.width = width
            self.height = height
            self.start = start.total_seconds()
    
        def _repr_html_(self):
            return """
                <iframe
                    width="%i"
                    height="%i"
                    src="http://www.youtube.com/embed/%s?start=%i"
                    frameborder="0"
                    allowfullscreen
                ></iframe>
            """%(self.width, self.height, self.id, self.start)
    

    And voilà:

    YouTubeVideo("Pi9NpxAvYSs", start=timedelta(hours=1, minutes=47, seconds=3))
    

    Now we could send a pull request 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am embedding a Youtube video on a website using swfObject so I can
I am embedding a video from my screencast.com account into my weebly website. I
I have an IFrame embedding a youtube video. I want to create a textbox
I was wondering, does embedding a youtube video via iframe expose certain events, like
When embeding an HD video from youtube using the generated iframe, I notice that
I'm having a problem with youtube video embedding; In some places on my site
Im embedding a youtube video in JWPlayer like this: <embed src=fileadmin/templates/web/js/jwplayer/player.swf width=300 height=225 bgcolor=transparent
When embedding JavaFX in javascript, is there a way to base the height and
When embedding a flash object, is there a way to determine when it's fully
Is there any helper (perhaps, an interface to some other video embedding framework) that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.