On Wed, 29 Jun 2005, Trent Piepho wrote:

> On Wed, 29 Jun 2005, Oliver Seufer wrote:
> > > > 1. sox NAME.wav -t raw -x -s -w -c2 -r48000 NAME.lpcm
> > > > 2. mplex -S 0 -f 8 -V -o NAME.mpg NAME.lpcm NAME.m2v
> > > >    It make no different if I also use "-L 48000:2:16"
> > > > 3. Try to play this file with mplayer and xine. Video is OK, but Sound
> > > >    make just a noise.
> > > 
> > > If you compare the bytes in NAME.wav and NAME.lpcm, are they
> > > byte-swapped?  (They should be).  If not, then you should remove the -x
> > > option to sox.
> > The "-x" option of sox only swaps bytes if nessasary. I started my
> > first test with just cutting of the wav header with dd. The resulting
> > NAME.lpcm was the same. It is also the same if I don't use the "-x"
> > option.o
> 
> I think the question is, are you feeding mplex big-endian data or not?
> 
> Try this:
> 
> sox NAME.wav -t raw -x -s -w -c2 -r48000 NAME1.lpcm
> sox NAME.wav -t raw    -s -w -c2 -r48000 NAME2.lpcm
> 
> hexdump NAME1.lpcm | head -1
> hexdump NAME2.lpcm | head -1
> 
> Are the two lpcm files byteswapped from each other?  I tried this, and it
> worked for me.
> 
> ~$ hexdump foo.raw | head -1
> 0000000 c901 7101 7702 f801 8203 0203 c703 5303
> ~$ hexdump bar.raw | head -1
> 0000000 01c9 0171 0277 01f8 0382 0302 03c7 0353
> 
> In this case, one of these files will work, and one will not.  Are you getting
> both files the same?  Or are you trying both with mplex and getting incorrect
> sounding output from both?

I get the same results. Maybe my version of sox is broken:
$ sox NAME.wav -t raw -x -s -w -c2 -r4800 NAME1.lpcm
$ sox NAME.wav -t raw    -s -w -c2 -r4800 NAME2.lpcm

$ hexdump NAME1.lpcm | head -1
0000000 0071 ffee 00b9 ff4e 00ab fe86 00bc fed5
$ hexdump NAME2.lpcm | head -1
0000000 0071 ffee 00b9 ff4e 00ab fe86 00bc fed5

$ sox -V
sox: Version 12.17.7
 
I now swapped the bytes myself and now the mpeg file is ok. Any
suggestions for the best video rate with pcm audio?
At the moment I use this mpeg2enc options:
-M3 -a2 -q4 -f8 -b8192 -np -F3 -I1 -21 -41 -r16 -N1.0 -Khi-res -D10 -s -c -P

But the burned result skips some video frames when playing it on a
normal dvd player. Ton is ok.

Greatings

Oliver


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to