Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Easiest way to overlay dynamic text onto a video?


    Hi! I need to do a really simple thing (or so it would seem at first glance) - I have a video which I'd like playing in fullscreen, overlaid with text of my choosing, that changes dynamically, in real-time.

    I wrote a Processing sketch, but that has terrible performance. By rough estimates about .5-1 FPS. I'd guess it's because the video decoding isn't hardware accelerated (it is an old machine after all), although the file plays alright in mpv or others.

    So, leaving the bloat of Processing behind... What other options are there? I'm open to any ideas! Thanks!

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    it seems you have 2 problems here -

    1) your hardware is to weak to play video in hd?
    2) you don't know how to solve a particular task in video editing

    for either problem, you have provided no information at all.

    please do so, in as much detail as possible, in terms that are relevant for computers, preferably in code/output.

    and also rephrase your problem, please.

  3. #3
    Quote Originally Posted by nihili View Post
    1) your hardware is to weak to play video in hd?

    Strictly speaking, it isn't - it's just that the Processing sketch requires more power than just playing does, and significantly so.

    Which sort of answers the second question too:

    Quote Originally Posted by nihili View Post
    2) you don't know how to solve a particular task in video editing
    This is not a question about video editing. I need to play a video file in fullscreen as background, and overlay it with text of my choosing. This text changes in real-time, so it cannot be solved by pre-rendering the video in advance.

    I'm therefore looking for software other than Processing that runs on Linux and allows me to feed it with a text that would be displayed over a video.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by tml View Post
    This is not a question about video editing. I need to play a video file in fullscreen as background, and overlay it with text of my choosing. This text changes in real-time, so it cannot be solved by pre-rendering the video in advance.

    I'm therefore looking for software other than Processing that runs on Linux and allows me to feed it with a text that would be displayed over a video.
    i see.
    some sort of vee-jaying...
    i guess there's software for that.
    or what are you using at the moment?
    from a computer's point of view, you still haven't provided any hard info.

  6. #5
    Really underpowered machines, two oldish netbooks with integrated Intel GMA cards (950, 3150) and a bunch of other I'm not aware of yet. (Sorry for being vague)

    I was hoping the task itself would not that resource intensive, given it's quite limited scope - even VLC has a rudimentary text overlay plugin. (Too rudimentary for my uses though - single line, unchangeable font)

  7. #6
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by tml View Post
    Really underpowered machines, two oldish netbooks with integrated Intel GMA cards (950, 3150) and a bunch of other I'm not aware of yet. (Sorry for being vague)
    i actually meant what software are you using, and what exactly did you create with it.
    i mean in comuter terms, not artistically.

    I was hoping the task itself would not that resource intensive, given it's quite limited scope - even VLC has a rudimentary text overlay plugin. (Too rudimentary for my uses though - single line, unchangeable font)
    to change text dynamically/interactively while the video is running?
    which plugin is that? where and how can we download & install it to understand your demands better?

  8. #7
    i actually meant what software are you using, and what exactly did you create with it.
    Right now I'm not using anything, because I don't know what to use. I tried Processing, literally the Loop example (that just loops a video) with an added line to render a line of text over it:

    Code:
    /**
     * Loop. 
     * 
     * Shows how to load and play a QuickTime movie file.  
     *
     */
    
    import processing.video.*;
    
    Movie movie;
    PFont f;
    
    void setup() {
      size(640, 360);
      background(0);
      // Load and play the video in a loop
      movie = new Movie(this, "transit.mov");
      movie.loop();
      
      f = createFont("SourceCodePro-Regular", 24);
      textFont(f);
    }
    
    void movieEvent(Movie m) {
      m.read();
    }
    
    void draw() {
      //if (movie.available() == true) {
      //  movie.read(); 
      //}
      image(movie, 0, 0, width, height);
      text("Hello, World!", width/2, height/2);
    }
    But that proved too resource intensive, as I mentioned above.

    to change text dynamically/interactively while the video is running?
    No, although that can apparently be achieved with a python script: http-mih.voxindeserto.de/vlc_movieoverlays.html

  9. #8
    -->
    Quote Originally Posted by tml View Post
    Hi! I need to do a really simple thing (or so it would seem at first glance) - I have a video which I'd like playing in fullscreen, overlaid with text of my choosing, that changes dynamically, in real-time.

    I wrote a Processing sketch, but that has terrible performance. By rough estimates about .5-1 FPS. I'd guess it's because the video decoding isn't hardware accelerated (it is an old machine after all), although the file plays alright in mpv or others.

    So, leaving the bloat of Processing behind... What other options are there? I'm open to any ideas! Thanks!
    Mplayer lets you specify a file that contains subtitle text and I believe you can indicate at what elapsed time into the video each subtitle gets displayed. Also where on the screen to do the display.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •