wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes JMF cut.java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JMF cut.java" Watch "JMF cut.java" New topic
Author

JMF cut.java

MikeA ThomsonA
Greenhorn

Joined: Mar 28, 2008
Posts: 1
The cut.java example from <a href="http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Cut.html</a>" target="_blank" rel="nofollow">http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Cut.html[/url] didnt work.

I got this exception:

- Create processor for: file:/c:/Usher - My Boo.mp3
- Configure the processor for: file:/c:/Usher - My Boo.mp3
Transcode:
from: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
to: LINEAR, 44100.0 Hz, 16-bit, Stereo, BigEndian, Signed
- Realize the processor for: file:/c:/Usher - My Boo.mp3
Failed to build a graph for the given custom options.
Failed to realize: com.sun.media.ProcessEngine@1f03691
Cannot build a flow graph with the customized options:
Unable to transcode format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
to: LINEAR, 44100.0 Hz, 16-bit, Stereo, BigEndian, Signed
outputting to: RAW
Error: Unable to realize com.sun.media.ProcessEngine@1f03691
Failed to realize the processor.
Failed to cut the input

I found this topic http://www.coderanch.com/t/274169/java/java/JMF-Problems-cut-java-sample but the solution that was printed seems to be for an servlet or something.

Can anybody help me i only need to cut 40 seconds from the mp3 file
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42263
    
  64
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Please take a moment to change your diaply name so that it is a proper name, which you can do right here.

As to your question, the only servlet-related thing about that solution is the kind of stream it writes to (which you can easily change to a FileOutputStream) and the setting of the content type (which you can omit). Then it should work in non-servlet environments just fine.


Ping & DNS - my free Android networking tools app
Ali Shan
Greenhorn

Joined: Jul 14, 2008
Posts: 1
Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Please take a moment to change your diaply name so that it is a proper name, which you can do right here.

As to your question, the only servlet-related thing about that solution is the kind of stream it writes to (which you can easily change to a FileOutputStream) and the setting of the content type (which you can omit). Then it should work in non-servlet environments just fine.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

Ali, did you forgot to post your reply, or do you just like quoting posts?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMF cut.java