mp2enc not working for me in jaunty

Asked by Peter

In 8.04 hardy qdvdauthor worked fine.
In 9.04 jaunty qdvdauthor, dvd-slideshow and opnemovieeditor will not work for me so I decided to make my own command line program using commands that worked in 8.04 hardy qdvdauthor.

mplayer "/home/peter/temp/DrawMeClose.wav" -vo null -ao pcm:file="/home/peter/temp/DrawMeClose.mp3"

works okay but

mp2enc -b 192 -r 48000 -o "/home/peter/temp/DrawMeClose.mp2" < "/home/peter/temp/DrawMeClose.wav"

and

mp2enc -o "/home/peter/temp/DrawMeClose.mp2" < "/home/peter/temp/DrawMeClose.wav"

 will not work. See :-

peter@peter-desktop:~$ mp2enc -o "/home/peter/temp/DrawMeClose.mp2" < "/home/peter/temp/DrawMeClose.wav"
   INFO: [mp2enc] Opened WAV file, freq = 44100 Hz, channels = 2, bits = 16
   INFO: [mp2enc] format = 0x1, audio length = 47734272 bytes
Illegal instruction
peter@peter-desktop:~$

Any ideas please or does a different encoder work for anyone?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Peter
Solved:
Last query:
Last reply:
Revision history for this message
Isak Frants (isakfrants) said :
#1

Soundconverter? Lame? There is a bunch of other applications. Why mp2 and not mp3?

Revision history for this message
Peter (nitep) said :
#2

I already have the audio in mp3. Also I have soundconverter which will not produce mp2. Lame produces mp3 not mp2.

I need mp2 to multiplex the sound file into a movie unless you know how to multiplex an mp3 audio into a movie.

Revision history for this message
Isak Frants (isakfrants) said :
#3

http://linux.die.net/man/1/twolame ?

Hm not sure about that multiplex stuff :)

Revision history for this message
Peter (nitep) said :
#4

ffmpeg -loop_input -t time_in_seconds -i "/home/peter/temp/image.jpg" -i "/home/peter/temp/audio.mp3" -y -f vob -r 25 -target dvd "/home/peter/temp/video.VOB"

Does exactly what I want, that is audio with on screen lyrics. Is there a utility that returns the audio length to automatically pop in to the above?

Revision history for this message
Isak Frants (isakfrants) said :
#5

sudo apt-get install mp3info
ffmpeg -loop_input -t "mp3info -p "%S" '/home/peter/temp/audio.mp3'" -i "/home/peter/temp/image.jpg" -i "/home/peter/temp/audio.mp3" -y -f vob -r 25 -target dvd "/home/peter/temp/video.VOB"

?

Revision history for this message
Peter (nitep) said :
#6

Hi Isak,
mp3info -p %S '/home/peter/temp/audio.mp3'

by itself produced the correct time in seconds but in the above format I got

Invalid duration specification for t: mp3info -p %S '/home/peter/temp/audio.mp3'

I am using it in a shell script so will try assigning it to a variable

Revision history for this message
Isak Frants (isakfrants) said :
#7

Yep that should do it.

Or wait, there was a bug:
sudo apt-get install linux-headers-`uname -r`
works sooo we change " ' " into " ` ".

We get:
ffmpeg -loop_input -t `mp3info -p %S '/home/peter/temp/audio.mp3'` -i "/home/peter/temp/image.jpg" -i "/home/peter/temp/audio.mp3" -y -f vob -r 25 -target dvd "/home/peter/temp/video.VOB"

Revision history for this message
Peter (nitep) said :
#8

Yes that works but I discovered that soxi is even better as it works with many audio types :-

ffmpeg -loop_input -t `soxi -d /home/peter/temp/audio` -i "/home/peter/temp/image.jpg" -i "/home/peter/temp/audio" -y -f vob -r 25 -target pal-dvd "/home/peter/temp/video.VOB"

Thanks for your help
Peter

Revision history for this message
Isak Frants (isakfrants) said :
#9

Great :)