Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMF cut.java  RSS feed

 
MikeA ThomsonA
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The cut.java example from <a href="http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Cut.html</a>" target="_blank" >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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ali Shan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ali, did you forgot to post your reply, or do you just like quoting posts?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!