Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1006714 // Create an .mp4 spike

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 892K of libraries. Compilation Failed (1766L/12K).

!7
lib 1000278 // jcodec library

import org.jcodec.api.awt.SequenceEncoder;

p {
  SequenceEncoder enc = new SequenceEncoder(prepareProgramFile("1000frames.mp4"));
  
  // GOP size will be supported in 0.2
  // enc.getEncoder().setKeyInterval(25);
  
  int frames = 1000;
  long time = sysNow();
  for (int i = 0; i < frames; i++) {
  	BufferedImage image = shootScreen2();
  	enc.encodeImage(image);
  	long sleepTime = time+frames*50 - sysNow();
    print("Frame " + i + " " + sleepTime);
  	sleep(sleepTime);
  }
  enc.finish();
}

Author comment

Began life as a copy of #1000557

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006714
Snippet name: Create an .mp4 spike
Eternal ID of this version: #1006714/1
Text MD5: 534c09d0977748f0c167661373efefc4
Transpilation MD5: 1843ec84a7f1bab57d6771a1fbc5ec7a
Author: stefan
Category: javax video
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-02 22:15:59
Source code size: 555 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 402 / 470
Referenced in: [show references]