I am looking for some type of SWF transcoder so I can convert SWF files to .avi's. Preferably something that we could hook into our Java architecture.
Any suggestions?
this is a bit like: I am looking for some type of java binaries transcoder, that can transcode java binaries to HTML+JS. Preferably something that we could hook into our PHP architecture. :P
let me explain: SWF files are containers to AVM/AVM2 bytecode and different kinds of assets (text, video, audio, raw binary data). It is possible to create SWF files containing ONLY bytecode or SWF files containing only media. Only in the latter case is the course of all playback determined. If there is bytecode included, then the task can be very hard, if not impossible, since any visual changes in the flash application can depend on external data, user input or just be random.
also, please note that the resulting AVI is likely to be orders of magnitude bigger.
I guess the easiest and most accurate way is to run the SWF and capture what the flash player renders.
there is no straight-forward way to achieve what you want to. to my knowledge the tools within the creative suite are the only ones that can convert SWF animation into movies.
Related
I know we can extract text from image using ocr. But I need to extract the text present in video, like those in video lectures. Or in other words is it possible to transcribe a video to text. Is that possible? If so please suggest me how to do it in java or any other language.
My naive linux driven approach would be:
check: does the OCR work in my operating system?
extract some samples from the video using the normal runner. Each runner (for example VLC) has such a functionality.
check: how good is the OCR in extracting text from image files?
check: how good is the OCR in extracting text from image files with the background the video is providing?
get software to extract frames from videos in batch -> there is various software which allows to create contact-sheets, this should also be able to extract images in full resolution at abitrary points in time out of the video. Full resolution might be necessary to allow the OCR to work. Perhaps you can clip the images first, if you know, that the text is positioned in fixed rectangles.
Worst case you let OCR analyse each frame of the movie.
That mostly depends on how good and how fast your OCR is working. Everything else to me is very proven software. The language might be bash-shell-script, since the components will probably be separate linux programs. As I mentioned, it depends on the quality, performance and runtime environment of your OCR.
Yes, You can do that and there are 3 ways you can achieve it.
Split, Classify and train on your own.
Get a performance server,
A. Extract images from the video
B. Develop and Train your machine learning model. You can use tensor flow to do the same.
Note: If you prefer to train models on your own, make sure you have enough time as sometime the developing and training requires few months and you should have data to train them.
Use an OCR framework
USE API(Freemium model). There are many available in the market. Just google them and your will have many in hand.
I have to associate a couple of text parameters (a UUID and a couple of strings representing integers) to a PNG image in a way they can follow the image when the PNG file is passed from an Android device to another through the Net. This is the typical situation in which I would use a couple of custom auxiliary chuncks (similar to EXIF fields ) to store my data inside the PNG image itself.
Maybe it is just me but the only info I was able to find about reading and writing PNG custom metadata from Java code on Android was this SO post:
Writing image metadata in Java, preferably PNG
that even offers some code (quite verbose, as usual with Java).
Those same SO post refers also to PNGJ: http://code.google.com/p/pngj/
To be honest, I would be happy to not use yet another library in this project.
Does anybody know of others ways to write and read text metadata in a PNG file in Android? Maybe a less verbose way... Maybe a way that does not require a separated library....
Any other source of information? Any tutorial? Any example?
I'm open to use a different (but equivalent) image file format, if needed (JPEG, whatever).
A solution working also on iOS and Windows 8 Phone would be a plus but it is not actually required.
I had to do something similar lately, so I had to study the subject.
Android offers you no option of manipulating png metadata. You will have to use an external library (PNGJ seems like a good option).
In my case, since I am making changes to the Android frameworks, I didn't use an external lib, but made changes to skia (the Android graphics library instead).
If you need more info on that I can give you, but I think it's irrelevant in your case.
I've been talking with an artist and she is planning to send me .ai files for a project I'm working on that is using Java for its front end. Unfortunately, I'm having a lot of trouble searching for this issue because search engines are replacing .ai with "a" (even when I specifically say not to) or are searching for artificial intelligence. Obviously neither of those are what I'm looking for.
Is anyone aware of a Java library capable of rendering .ai files as static images?
.ai file are vector graphics, they shouldn't be used in production. When the final copy of your image is ready your artist should be sending you a .png / .jpg or similar end working file.
.ai stands for Adobe Illustrator and are intended for use only by Illustrator. It's like a developer creating .java files and sending them to a client, it's more likely they'd want a executable jar or a program installer.
Worst case scenario you should install CS5.5 (there's a trial version) and exporting the .ai files to a static file type yourself.
We have a requirement where we need to convert from .wav file to .mp3 and we are currently using "Tritonus" library to do that . The concern with that library is that requires "installation" of some "dll" files to the class path.
I am wondering are there any API's those allow better processing without local installation.
And other question is ,having mp3 format files will make it easier to join the files into a single file than having .wav files ?
As a former contributor to the JLayer MP3 Library, I'm fairly sure that it doesn't do WAV to MP3 - just MP3 playback and conversion to WAV. (I spent some time optimizing the decoder :-)
Regarding appending files (and possibly other operations), it is generally better to perform edit operations using the uncompressed format, and compress at the end.
I think the spec allows mp3 files to be concatenated, since they are a series of frames, but behaviour may vary from player to player.
So, to be safe, and maintain quality, I'd concat using WAVs and then compress the final result to MP3. Concating files is not so straightforward - you have to at least make sure they are at the same percieved volume, or you will get a noticible shift in volume from one file to the next. Such operations are definitely best performed on the uncompressed data.
The JLayer MP3 Library appears to support several operations on MP3 and WAV files including conversion, with no native libraries to install.
You can use MP3SPI to do this. This is a java sound plugin, just include the jar into the classpath, and you can use java sound api to convert between wav and mp3.
I wanted to find out how can one capture screencast using java. I know that using Robot class one can get a screenshot but how do I go about capturing it as a video and then uploading it to the server? How exactly would that work?
ideas?
With a pure Java solution, I doubt that it will work, but it depends of course on what your interpretation of "video".
On my desktop with a 1920x1200 resolution, I am able to get about 20 frames per second when using the Java Robot to capture the entire screen. Since each image contains >6 MByte of uncompressed data, I would need more than 1 Gbps bandwidth to transmit the raw data of these images to a server. Most probably, requiring so much bandwidth is not acceptable, so you either have to decrease the number of frames per second or apply some kind of compression to the images.
One possibility is to compress each image using one of the image formats supported by ImageIO. The size of the compressed images will of course depend heavily on what is actually shown on the screen, but the performance of the compressors is not particularly good. Compressing to PNG ought to give the best lossless compression ratio for most desktop content, but at least my computer is only able to process just about 2 frames per second. Using the JPEG compressor with default quality settings reaches about 5 frames per second.
Using common video codecs through an abstraction layer like jffmpeg will probably achieve both better performance and better compression ratio, but I doubt that mainstream video codecs like WMV or H.264 are suitable for common desktop content.
If you really require a pure Java solution (and are not able to use any of the available standalone software, which do what you're asking for), I would make an attempt to implement my own, simple compression algorithm. With common desktop activity, there ought to be very little difference between most consecutive screen shots, so what might work quite well is to transmit the first frame completely and after that implement an algorithm to roughly detect rectangles, in which changes have been made and then transmit only these combined with JPG or preferrably (quality) PNG compression.
Or use Xuggler, a better wrapper for FFmpeg in Java. In fact, the code for capturing the screen and encoding the video is one of the standard tutorials.
I'm also curious about this. https://www.screencast.com/ is currently doing just this with a pure java (or at least straight out of the browser) experience.
You can just use something like Java to a native FFMPEG build, and execute the command line at runtime. Here is an applet that I made that does just that: http://have2chat.net/screencast/
I have downloaded the main capture *.JAR file for the Screencast-O-Matic.com. To download the file:
Go to http://screencast-o-matic.com/jars/ScreencastOMaticRun-1.0.5.jar
Save the file
Extract the contents (I DO NOT intend to use this commercially!)