Hallo,

I think there has to be a bug in the mplex tool with lpcm. That is what I have
done:

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.

Now I tried to figure out what the problem is:

1. mplayer -dump NAME.mpg 
result: stream.dump is the same as NAME.lpcm

2. mplayer -ao pcm:file=stream.wav NAME.mpg
result: stream.wav difference NAME.wav

Now let us compare the beginning of the files with hexdump:
hexdump -C NAME.wav  | head -n 5
00000000  52 49 46 46 24 ea 12 21  57 41 56 45 66 6d 74 20  |RIFF$..!WAVEfmt |
00000010  10 00 00 00 01 00 02 00  80 bb 00 00 00 ee 02 00  |................|
00000020  04 00 10 00 64 61 74 61  00 ea 12 21 de 00 c4 ff  |....data...!....|
00000030  dd 00 c4 ff e9 00 c0 ff  d1 00 c8 ff c9 00 d0 ff  |................|
00000040  c2 00 b6 ff b9 00 de ff  88 00 b0 ff 96 00 64 ff  |..............d.|

hexdump -C stream.wav | head -n 5
00000000  52 49 46 46 24 ea 12 21  57 41 56 45 66 6d 74 20  |RIFF$..!WAVEfmt |
00000010  10 00 00 00 01 00 02 00  80 bb 00 00 00 ee 02 00  |................|
00000020  04 00 10 00 64 61 74 61  00 ea 12 21 00 de ff c4  |....data...!....|
00000030  00 dd ff c4 00 e9 ff c0  00 d1 ff c8 00 c9 ff d0  |................|
00000040  00 c2 ff b6 00 b9 ff de  00 88 ff b0 00 96 ff 64  |...............d|

As you can see the byte order of the audio data is swapped after the 
end of the wave header.

You can now think this is a bug with mplayer or xine, but a 'real' DVD with
lpcm audio has not this problem.

I now tried to see what the difference is:

1. mplayer -dump VTS_01_1.VOB 
2. sox -t raw -x -s -w -c2 -r48000 stream.dump stream_convert.wav
3. mplayer -ao pcm:file=stream.wav VTS_01_1.VOB

hexdump -C stream.wav | head -n 10
00000000  52 49 46 46 24 00 e5 0e  57 41 56 45 66 6d 74 20  |RIFF$...WAVEfmt |
00000010  10 00 00 00 01 00 02 00  80 bb 00 00 00 ee 02 00  |................|
00000020  04 00 10 00 64 61 74 61  00 00 e5 0e 00 00 00 00  |....data........|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000bfd0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 01 00  |................|
0000bfe0  ff ff 00 00 00 00 01 00  ff ff 01 00 ff ff 00 00  |................|
0000bff0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000c020  00 00 00 00 00 00 00 00  00 00 00 00 01 00 ff ff  |................|

hexdump -C stream_convert.wav | head -n 10
00000000  52 49 46 46 6c 61 e5 0e  57 41 56 45 66 6d 74 20  |RIFFla..WAVEfmt |
00000010  10 00 00 00 01 00 02 00  80 bb 00 00 00 ee 02 00  |................|
00000020  04 00 10 00 64 61 74 61  48 61 e5 0e 00 00 00 00  |....dataHa......|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000bfd0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 01  |................|
0000bfe0  ff ff 00 00 00 00 00 01  ff ff 00 01 ff ff 00 00  |................|
0000bff0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000c020  00 00 00 00 00 00 00 00  00 00 00 00 00 01 ff ff  |................|

As you can the the byte order is the same.

Mplayer says for both files:
Trying to force audio codec driver family libmad...
Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16be, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [dvdpcm] afm:dvdpcm (Uncompressed DVD/VOB LPCM)

When you need any further information to track down then problem please 
contact me.

I tried version mjpegtools-1.6.2 and mjpegtools-1.6.3-rc1. Both have this 
problem.

After searching in mail archive I found: -W mplayer_hdr
But this options results only in a segfault.

Kind regards

Oliver Seufer



-------------------------------------------------------
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