Full screen smooth looping video possible?

Help
cian
2005-09-29
2013-05-13
  • cian
    cian
    2005-09-29

    I'd like to build a page for mplayerplug-in that when loaded plays a movie automatically, and in full screen, and loops (smoothly) indefinitiely.
    Now my understanding from previous posts is that using loop="yes" in the embed tag is the way to get smooth looping. But after experimenting, and then looking at the code, it seems like one cannot specify fullscreen="yes" in the embed tag, it has to be set afterwards. The problem with this is that once the movie loops, it is no longer in fullscreen mode.
    I've tried using onMediaComplete instead of the loop option, but it causes a small jump between loops.
    So before I write a small patch to add fullscreen to the embed tag, I just wanted to check if anyone has a better way of doing this?

    Cian

     
    • Kevin DeKorte
      Kevin DeKorte
      2005-09-29

      Currently what you want to do is not in the code. However, I would take a patch for it.

      You'll have to edit plugin-setup.cpp to add the embed tag

      You'll have to edit plugin-thread.cpp to only call the SetFullScreen = 0 in the loop if the embed loop and embed fullscreen tags are present

      This is gonna be kinda of a tricky problem to solve.

      Have you thought about trying to solve this problem at the browser level. of course that would still leave you with the window boarder. at minimum

       
    • cian
      cian
      2005-09-29

      OK, will have a poke at the code over the weekend.
      Could you explain what you mean by solving "the problem at the browser level"?

      Cheers,
      Cian

       
    • cian
      cian
      2005-09-30

      Did a very quick alteration to plugin-setup.cpp to add the embed fullscreen tag, haven't changed anything else yet, but setting fullscreen="true" crashes the browser with a segfault. This happens in the SetFullscreen method in plugin.cpp when it calls:

      XReparentWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window),
      GDK_WINDOW_XWINDOW(gtkwidget->window),
      GDK_WINDOW_XWINDOW(fs_window->window), 0,
      0);

      Any pointers (no pun intended) appreciated.

      Cian

       
      • Kevin DeKorte
        Kevin DeKorte
        2005-09-30

        I would guess you are switching to fullscreen mode prior to SetWindow being run and so gtkwidget has not yet been initialized.

         
    • cian
      cian
      2005-09-30

      Managed to cobble something together at the browser level like you mentioned before, using large "height" and "width" values and the autohide plugin for firefox to hide all menus.
      It's not pretty though, especially the grey box at the bottom of mplayerplug-in which is where the controls would normally go I guess?

      Cian

       
      • Kevin DeKorte
        Kevin DeKorte
        2005-09-30

        Did you set showcontrols='0' in the embed tag?

         
        • cian
          cian
          2005-09-30

          Yup, there's no sign of the controls, just a narrow grey box below the video.

          Cian

           
          • Kevin DeKorte
            Kevin DeKorte
            2005-09-30

            Try adding this to the HTML

            <body style="background:#000000; background-color:#000000;">

            See if that helps

            Kevin

             
            • cian
              cian
              2005-09-30

              Thanks for all the help :)
              It looks like it's a scaling issue, if I have a movie of size 720x480 for example, I have to specify height and width embed values in the ratio of 1.5, otherwise mplayerplug-in pads the bottom of the movie with a grey box so as to maintain the movie scale, but still give me the output size I asked for. If I do my sums right then I can get rid of this grey box, and things look quiet nice. The nice thing about the fullscreen option though is that "it just works".
              Thanks again,
              Cian

               
    • cian
      cian
      2005-09-30

      Nope, it actually plays for about a second before segfaulting, and the debug output shows two pairs of

      *****SetWindow Callback Enter************

      (debugging output)

      ***********SetWindow Callback Exit**************

      Cian

       
      • cian
        cian
        2005-10-02

        OK, the problem was with fs_window not being initialised. Now I need to figure out how to make fullscreen persistent across loops....

         
    • cian
      cian
      2005-10-02

      On a related note, I'm currently seeing a "blip" between loops of the video (looks like a quick flash of a white screen), and I'm not sure why this is happening.
      With debugging turned on, I get the message:

      "Starting: mplayer -wid 0x3c00127 -xy 1000 -vo x11 -zoom -user-agent NSPlayer -osdlevel 0 -nojoystick -noconsolecontrols -cookies -slave -loop 0 -fixed-vo -rtsp-stream-over-tcp -nomouseinput -cache 512 /home/cian/movies/theshapeofdays/ww_H.264_768_audio.mov"

      And running this from the command line (without "-wid 0x3c00127") plays the movie in a loop without any blip.
      I've tried with xv, and x11 video output, but with similar results, am I missing something obvious?

      Cian