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).

1  
!7
2  
lib 1000278 // jcodec library
3  
4  
import org.jcodec.api.awt.SequenceEncoder;
5  
6  
p {
7  
  SequenceEncoder enc = new SequenceEncoder(prepareProgramFile("1000frames.mp4"));
8  
  
9  
  // GOP size will be supported in 0.2
10  
  // enc.getEncoder().setKeyInterval(25);
11  
  
12  
  int frames = 1000;
13  
  long time = sysNow();
14  
  for (int i = 0; i < frames; i++) {
15  
  	BufferedImage image = shootScreen2();
16  
  	enc.encodeImage(image);
17  
  	long sleepTime = time+frames*50 - sysNow();
18  
    print("Frame " + i + " " + sleepTime);
19  
  	sleep(sleepTime);
20  
  }
21  
  enc.finish();
22  
}

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: 468 / 554
Referenced in: [show references]