jmf

How to load media resources from the classpath in JMF

喜夏-厌秋 提交于 2019-12-06 07:24:17
问题 So, I have a Java application that I want to turn into an executable jar. I am using JMF in this application, and I can't seem to get the sound files working right... I create the jar using jar cvfm jarname.jar manifest.txt *.class *.gif *.wav So, all the sound files get put inside the jar, and in the code, I am creating the Players using Player player = Manager.createPlayer(ClassName.class.getResource("song1.wav")); The jar is on my desktop, and when I attempt to run it, this exception

Capture live video from webcam using Java an jmf

我怕爱的太早我们不能终老 提交于 2019-12-05 22:54:49
For capture the live video from web using java and jmf i have written the below code , I plugin the usb webcam also but it gives java.util.NoSuchElementException anyone please help me import java.util.Vector; import javax.media.*; import javax.media.format.AudioFormat; import javax.media.format.VideoFormat; import javax.media.protocol.DataSource; import javax.media.CaptureDeviceInfo; import javax.media.format.YUVFormat; import javax.media.protocol.FileTypeDescriptor; public class CamRecorder { static VideoFormat videoFormat; static AudioFormat audioFormat; static CaptureDeviceInfo videoDevice;

Android Video Streaming

元气小坏坏 提交于 2019-12-05 05:06:28
问题 I need HTTP/RTSP Video Streaming with Android. Any Ideas ? Is that possible to go with JMF with Android ? Any Working examples ? Already tried with http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/ Its not working with my case. Are there any specific types of videos that Android can stream ? Thanks. 回答1: You don't necessarily need JMF. Android has built in support for HTTP/RTSP video streaming . Try this: String LINK = "type_here

Problem in java programming on windows7 (working well in windows xp)

十年热恋 提交于 2019-12-04 15:45:29
I am capturing video from webcam connected to pc.I am using the following code to do so: import java.util.*; import javax.media.*; import javax.media.protocol.*; import javax.media.control.*; import javax.media.format.*; import java.awt.*; /** * This is the primary class to run. It gathers an image stream and drives the processing. * */ public class jmfcam05v { DataSource dataSource; PushBufferStream pbs; Vector camImgSize = new Vector(); Vector camCapDevice = new Vector(); Vector camCapFormat = new Vector(); int camFPS; int camImgSel; Processor processor = null; DataSink datasink = null; /**

Make a seek bar for media player.

若如初见. 提交于 2019-12-04 13:39:35
I am making a media player using JMF, I want to use my own control components Can anyone please help me in making a seek bar for media player so that it can play song according to the slider position. Just suggest me some logic, I can figure out the coding part afterwards if(player!=null){ long durationNanoseconds = (player.getDuration().getNanoseconds()); durationbar.setMaximum((int) player.getDuration().getSeconds()); int duration=(int) player.getDuration().getSeconds(); int percent = durationbar.getValue(); long t = (durationNanoseconds / duration) * percent; Time newTime = new Time(t);

How to load media resources from the classpath in JMF

半城伤御伤魂 提交于 2019-12-04 13:07:11
So, I have a Java application that I want to turn into an executable jar. I am using JMF in this application, and I can't seem to get the sound files working right... I create the jar using jar cvfm jarname.jar manifest.txt *.class *.gif *.wav So, all the sound files get put inside the jar, and in the code, I am creating the Players using Player player = Manager.createPlayer(ClassName.class.getResource("song1.wav")); The jar is on my desktop, and when I attempt to run it, this exception occurs: javax.media.NoPlayerException: Cannot find a Player for :jar:file:/C:/Users/Pojo/ Desktop/jarname

Android Video Streaming

给你一囗甜甜゛ 提交于 2019-12-03 22:09:03
I need HTTP/RTSP Video Streaming with Android. Any Ideas ? Is that possible to go with JMF with Android ? Any Working examples ? Already tried with http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/ Its not working with my case. Are there any specific types of videos that Android can stream ? Thanks. You don't necessarily need JMF. Android has built in support for HTTP/RTSP video streaming . Try this: String LINK = "type_here_the_link"; setContentView(R.layout.mediaplayer); VideoView videoView = (VideoView) findViewById(R.id.video);

Combine Audio with Video(without ffmpeg) - Java

好久不见. 提交于 2019-12-03 15:02:35
I am building an applet to capture screen and microphone input (audio). I am able to record these files separately but could not find a way to combine these files to make a new video with audio. Video file is in .mov format and audio is in .wav format. They have exact same length. Is there any way to combine these files? I have tried Java but could not find a way to combine two files. Also I have to do it without ffmpeg since it needs to be installed on client side. private void mergeFiles() { try { DataSource videoDataSource = javax.media.Manager.createDataSource(oml.getURL()); //your video

Painting over JMF component

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm capturing the Stream from a webcam and would like to draw something on top of the video image. I try that in the example below, the problem is that the other component is always in the background no matter how I arrange the components. Is there a way do solve this? public class SwingCapture extends JPanel { private static final long serialVersionUID = -1284686239737730338L; private static Player player = null; public static final int WIDTH = 640; public static final int HEIGHT = 480; private MediaLocator ml = null; public SwingCapture()

Video Processing Library for Java

让人想犯罪 __ 提交于 2019-12-03 03:19:57
I want to extract frames from a video and apply some filters on it such as gabor/hough etc. Which Java library would be perfect for handling all kinds of video encodings? I have been looking at GStreamer, JMF, Xuggler etc. but am unable to decide which one would be the best. I'm also looking to edit the frames and make the video with the new frames. If you're looking to do low level operations such as extracting frames and manipulating them, then Xuggler would be the best choice, because the APIs are geared around this low level. It works on ffmpeg so can handle all types of video encodings.