Home » Desktop Java

Desktop Java

Get Midi audio file properties

With this tutorial we are going to see how to get MIDI audio file properties. This is a useful operation when you want to inform the user about several important properties of the audio files. Basically in order to get MIDI audio file properties one should follow these steps: Obtain the default Sequencer connected to a default device using MidiSystem.getSequencer(). ...

Read More »

Handle Midi playing events

In this tutorial we are going to see how to handle MIDI playing events in a Java Desktop Application. You might find this particularly useful when you want to create a simple media player inside your application and you want to monitor the progress media playing. In short, in order to handle MIDI playing events you should: Obtain the default Sequencer connected ...

Read More »

Play Midi audio

With this example we shall show you how to play MIDI audio files in a Java Desktop Application. This is very useful when you want to embed a simple audio player in your application. In short, playing MIDI audio files requires that you: Obtain the default Sequencer connected to a default device using MidiSystem.getSequencer(). Create a stream from a file to the ...

Read More »

Create video from image frames with Xuggler

Let’s now see how to create a video from scratch. As input, we will use sequential snapshots from our desktop. This can be used for a rudimentary screen recording application. This is very important when you want to make your want to create individual frames and make your own custom video. We are going to use Xuggler for that. In ...

Read More »

Frames capture with Xuggler example

The concept of this tutorial is to open a media file, loop through a specific video stream and at specific intervals capture the corresponding frame, convert it to an image and dump the binary contents into a file. We are going to use Xuggler for that.                   Here is the code that ...

Read More »

Modify video file with Xuggler example

With this example we shall show you how to modify video file using Xuggler in a Java Desktop Application.So, let’s suppose we wish to add a static image to our video and at the same time we wish to reduce the audio volume. Here are the basic steps you need to take: Create a IMediaReader to read the video file. ...

Read More »

Transcode mp4 to flv using Xuggler

This is an example that demonstrates how to transcode mp4 to flv using Xuggler. This is a very easy and common transcoding. To do that, one should follow these basic steps: Create a IMediaReader to read the video file. Create an IMediaWriter using ToolFactory.makeWriter. Add a writer to the reader, to create the output file Create a IMediaViewer with stats enabled Add a viewer to the ...

Read More »

RTMP To RTSP re-stream using wowza and xuggler

With this example we shall show you how to transcode RTMP To RTSP re-stream using wowza and xuggler. These are the basic steps you need to take: Crete an inputStream String "rtmp://wowzahost/live/streamLive3H.263". Create an outputStream String "rtmp://wowzahost/live/streamLive3H.264". Create a string array with “–acodec”, “libfaac”, “–vcodec”, “libx264”, “–vpreset”, “/usr/local/xuggler/share/ffmpeg/libx264-ultrafast.ffpreset”,inputStream, outputStream Create a new Converter. Create new Options calling converter.defineOptions(). Create a ...

Read More »

Inspect a video file with Xuggler

This is an example that shows how to inspect a video file with Xuggler in order to obtain useful information about it. These are the basic steps you need to take: Create a Xuggler IContainer object. Open up the container using container.open(filename, IContainer.Type.READ, null). Query how many streams the call to open found using container.getNumStreams(). Query for the total duration ...

Read More »

Query YouTube videos using YouTube Java API

In this example we are going to demonstrate how to query YouTube videos using YouTube Java API. This is particularly useful when you want to embed YouTube support in your application. In order to query YouTube videos using YouTube Java API you should follows these steps: First we create two model classes which will be used to hold information about ...

Read More »