VIDEO - best codec for minimising processing during playback?

I'm currently using h264 in a .mov wrapper at 10mbs/s and have problems with the videos freezing after about 10 minutes.

These are being used for a light visualisation so need to be played for around 10 hours, no problems! I have a collection of videos that can be overlaid to achieve different effects so I'm hoping to find a better codec but cannot find any information online.

I'm going to try an uncompressed format but any experience or advice would be great as there is a lot of trial and error (and waiting for renders) ahead!

Cheers Rich

Tagged:

Answers

  • Answer ✓

    Just some tips for playback improvements:

    http://forum.processing.org/two/discussion/comment/40848/#Comment_40848

    // forum.processing.org/two/discussion/10541/problems-with-video
    // by GoToLoop (2015/Apr/28)
    
    import processing.video.Movie;
    Movie mv;
    
    void setup() {
      if (mv == null)  (mv = new Movie(this, "cat.mov")).loop();
      while (mv.width == 0)  delay(10);
    
      size(mv.width, mv.height, JAVA2D);
      noLoop();
      frameRate(40);
      background(#FF00FF);
    }
    
    void draw() {
      background(mv);
    }
    
    void movieEvent(Movie m) {
      m.read();
      redraw = true;
    }
    
  • Cheers - theres a lot going on in the program so can't use JAVA2D or background but the noLoop() technique worked a treat!! Nice one

  • edited August 2015

    Also I converted my video files to QT animations (uncompressed) and it helps alot though the file size is ridiculous!

  • edited August 2015 Answer ✓

    ... so can't use JAVA2D...

    In this case, both background() & set() are slower for displaying the Movie/PImage picture.
    That is, for both P2D & P3D renderers, we should use image() instead.

  • got it! nice one :)

  • edited March 13 Answer ✓

    For our 60fps-application we have tested several codecs and recorded automatically the real fps:

    frm = frames per s
    KyF = keyframes
    
    fps = average fps over 600 frames
    min = minimal framerate within the 600 frames
    
    
    
    CodecTest_25frm_H264-10Mbit_KyF-25.mp4
    28MB
    
    56.1fps
    42.0_min
    
    52.5fps
    42.5_min
    
    
    CodecTest_25frm_Qtime-H264_KyF-01.mov  **
    152MB
    
    58.4fps
    45.1_min
    
    52.7fps
    43.4_min
    
    56.5fps
    44.4_min
    
    
    CodecTest_25frm_Qtime-H264_KyF-25.mov *
    65MB
    
    54.1fps
    42.2_min
    
    52.5fps
    42.8_min
    
    53.6fps
    42.4_min
    
    
    CodecTest_25frm_Qtime-mp4_KyF-25.mov ****
    61MB
    
    57.2fps
    48.4_min
    
    57.2fps
    49.0_min
    
    56.5fps
    39.5_min
    
    56.6fps
    43.8_min
    
    
    CodecTest_25frm_Qtime-mp4-70Proz_KyF-12.mov
    23MB
    
    53.5fps
    40.2_min
    
    56.5fps
    43.5_min
    
    
    CodecTest_25frm_Qtime-mp4_KyF-12.mov **********
    65MB
    
    58.8fps
    52.4_min
    
    54.0fps
    43.0_min
    
    53.9fps
    42.8_min
    
    56.8fps
    45.4_min
    
    
    
    ----------------------
    50frames
    
    
    
    CodecTest_50frm_H264-10Mbit_KyF-01.mp4
    26MB
    
    35.6fps
    22.8_min
    
    CodecTest_50frm_H264-10Mbit_KyF-25.mp4
    28MB
    
    32.1fps
    21.4_min
    
    CodecTest_50frm_Qtime-H264_KyF-01.mov
    305MB
    
    32.5fps
    20.5_min
    
    CodecTest_50frm_Qtime-Mjpg_KyF-01.mov
    error
    
    CodecTest_50frm_Qtime-mp4_KyF-01.mov
    324MB
    
    32.3fps
    18.5_min
    
    CodecTest_50frm_Qtime-mp4_KyF-25.mov
    85MB
    
    34.0fps
    21.2_min
    
Sign In or Register to comment.