• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JMF cut.java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic