Uses 1860K of libraries. Click here for Pure Java version (2439L/17K/70K).
1 | !7 |
2 | |
3 | import org.jcodec.api.awt.AWTSequenceEncoder8Bit; |
4 | |
5 | static int framesToEncode = 100000; |
6 | |
7 | p { |
8 | inputFilePath("Video to copy", voidfunc(final File video) { |
9 | thread { |
10 | File outFile = prepareProgramFile(addSuffix("reencoded-" + video.getName(), ".mp4")); |
11 | AWTSequenceEncoder8Bit enc = AWTSequenceEncoder8Bit.create25Fps(outFile); |
12 | enc.getEncoder().setKeyInterval(25); |
13 | int n = 0; |
14 | for (BufferedImage img : framesFromVideo_reordering(video)) { |
15 | img = invertedImage(img); |
16 | enc.encodeImage(img); |
17 | |
18 | print("Frames: " + n + "/" + framesToEncode); |
19 | if (++n >= framesToEncode) break; |
20 | } |
21 | |
22 | enc.finish(); |
23 | print("Wrote " + f2s(outFile) + " (" + n + " frames)"); |
24 | } |
25 | }); |
26 | } |
Began life as a copy of #1006825
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: | #1006826 |
Snippet name: | Re-encode video without changes to see how fast that is |
Eternal ID of this version: | #1006826/1 |
Text MD5: | b63fc915aea72ec126c386f3f76e95dd |
Transpilation MD5: | 122ec371b19a84b5aaaf36cedcc0b142 |
Author: | stefan |
Category: | javax video |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-05 05:46:13 |
Source code size: | 771 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 452 / 552 |
Referenced in: | [show references] |