Closed mkarhumaa closed 10 years ago
9d8189184b705d9434673ab5e5e30c14904bf0e2
Now the application is able to capture frames from video by hard coded parameters. Need to add parameters.
For converting time interval to milliseconds: http://stackoverflow.com/q/5351483
Runnable jar file: https://www.dropbox.com/s/i6jgfzo93fszdl8/converter.jar
you can test it for example by following command: $ java -jar converter.jar inputvideo.mp4 inputsrt.srt 1 2 4-10
Requires Java 1.7.
Need to add instructions for command line arguments.
Added instructions and config file.
Latest build: https://www.dropbox.com/s/i6jgfzo93fszdl8/converter.jar
https://www.dropbox.com/sh/j5x2hrrti6x6hbg/uiOpWNaDFZ In shared dropbox folder some example outputs of converter. Now converter creates a directory structure specified earlier today.
Dropbox folder includes also latest build.
Bug found! Negative resize_factor causes infinite loop within the program.
"converter.resize_factor=-1" in converter.config file "java -jar converter.jar input.mp4 input.srt 1-3" - CMD
Oh wow! :D
I'll fix this asap.
2013/11/26 olihub notifications@github.com
Bug found! Negative resize_factor causes infinite loop within the program.
"converter.resize_factor=-1" in converter.config file "java -jar converter.jar input.mp4 input.srt 1-3" - CMD
— Reply to this email directly or view it on GitHubhttps://github.com/mkarhumaa/gifmaker/issues/17#issuecomment-29275222 .
Another cool bug :) "..input.mp4 input.srt 3-1" crashes the program.
Maybe we need a check for invalid parameters? (wrong order in this case)
No bugs this time but is there some easy way to change the speed of the output? Dropping fps down to 1 gave us reasonable file size (1 MB). However, it takes quite long to browse through the images at normal video speed.
Hmm.. The speed of the animation could be configurable too. It should not be very big deal to implement.
Now it (should) automatically adjusts the speed so that the length of the output animation is same than length of input video. Length does not depend on framerate because some of the frames are skipped when using lower framerate. 27.11.2013 17.51 "olihub" notifications@github.com kirjoitti:
No bugs this time but is there some easy way to change the speed of the output? Dropping fps down to 1 gave us reasonable file size (1 MB). However, it takes quite long to browse through the images at normal video speed.
— Reply to this email directly or view it on GitHubhttps://github.com/mkarhumaa/gifmaker/issues/17#issuecomment-29394809 .
The wrong order of the segment numbers-issue is now fixed and updated to the code. Now it just ignores the faulty parameter.
Speed can now be configured from the config file.
I added also the script execution feature to the converter. I dunno if it is really needed, it can be easily removed if needed.
Latest build can be found in dropbox.
"java -jar converter.jar THE_WIRE.mp4 THE_WIRE.srt 3-5 21-22 10 3-107 285-290 429-431 506-527" Unintentional space in parameters crashed the converter.
To Henri:
Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4 at java.util.ArrayList.rangeCheck(ArrayList.java:604) at java.util.ArrayList.get(ArrayList.java:382) at com.gifmakers.Converter.parseSRT(Converter.java:431) at com.gifmakers.Converter.main(Converter.java:156) ... 5 more
Alright. I'll fix that.
I made some big changes to the SRT parser. It should now work without problems. The problem was that it didn't work when the same segment number occured more than once in the parameters.
input: Video file output: GIF animation