...
> I am new to JMF.
There are a number of tasks that should probably
be considered as suitable only for someone that
is experienced with JMF, and I would consider this
task to be one of them.
> I have been asked to capture both sound and screen as
> a video.
https://screensavers.dev.java.net/issues/show_bug.cgi?id=13
You might adapt the (ant based) screenshot task listed
here. It is designed to get a series of screenshots
of screensavers, but the same principles can be applied
to other components, or to the screen area in general.
Turn the images back into a MOV using JpegImagesToMovie.java
> The source for audio could be from mic or software or
> operating system.
Getting the sounds flowing through the system is a
lot harder than you might expect, here is my best effort..
http://www.physci.org/sound/audiotrace.html
A recent(ish) version of the source can be found
in AudioTrace.java linked from here..
http://www.physci.org/test/oscilloscope/
Note that code just intercepts the sound and draws a
trace on screen. It is left as an exercise for you
to figure how to store it to disk.
Also missing from that explanation, is a way to match
up the movie obtained, with the soundtrack that is
stored. Again - left as an exercise for the reader.
Though it might help to have a little Java based app.
on-screen at the beginning of the 'screen movie capture',
that shows a bright red (shrugs) dot, and simultaneously
plays a sound, so it is easy later, to synchronise the
movie and soundtrack.
> Any help is appreciated.
Dukes speak louder than words.
Hi Andrew
Good stuff.
AudioTrace gives me following exception
javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:494)
at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)
at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:399)
at org.physci.sound.AudioPlotPanel.<init>(AudioPlotPanel.java:102)
at org.physci.sound.AudioTrace.main(AudioTrace.java:246)
I wrote some code to search for usable TargetDataLine I get the same exception
I posted the code in Java Sound Forum
http://forum.java.sun.com/thread.jspa?threadID=5167674&tstart=0
Any help is appreciated.
Thanks
> Hi Andrew
> Good stuff.
No worries.
> AudioTrace gives me following exception
>
> javax.sound.sampled.LineUnavailableException: line
> with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4
> bytes/frame, little-endian not supported.
...
> org.physci.sound.AudioPlotPanel.<init>(AudioPlotPanel.
> java:102)
..at line 102 of the original source*, it is
setting an option on a JSlider, and the code is in
main(), ..
> at
> org.physci.sound.AudioTrace.main(AudioTrace.java:246)
..and line 246 is..
} else {
..so I can only assume the code you are using,
has been altered.
* Source at
http://www.physci.org/test/oscilloscope/AudioTrace.java
> I wrote some code to search for usable TargetDataLine
> I get the same exception
> I posted the code in Java Sound Forum
>
> http://forum.java.sun.com/thread.jspa?threadID=5167674
> &tstart=0
I answered it there.
Hi Andrew,
Thanks
AudioTrace gives the same exception as mentioned in
http://forum.java.sun.com/thread.jspa?threadID=5167674
Regarding ScreenShot.
I compiled ScreenShot but I could not find main method or any documentation on how to run ScreenShot a direction is appreciated.
Thanks.