ffmpeg multiplex pcm audio
I try to multiplex a mpeg2 video with a wav-audio file.
The command I use is
ffmpeg.exe -y -i "video.mpg" -f wav -i "audio.wav" -vcodec copy -acodec pcm_s16be "video-mux.mpg"
The multiplex seems to succeed, I can play it with MS Media player, however with a lot of other players (incl Nero and VLC) the sound doesn't play. When i use spumux to multiplex subtitles, I get error messages:
WARN: Incorrect pack header
WARN: Unknown header 01 bb 00 0c
INFO: Skipped 42994 bytes of garbage
So I assume that multiplex is wrong.
Can anybody help me please?
****please post more information****
A header read on the output (ffmpeg -i video-mux.mpg) as well as the relevant stream mapping info from the encode run would be helpful.
thx for your reply.
the captured info of the encoding command:
and header on the output:
The encoded file plays with no problem on Windows Media Player (perfect quality), video OK but no sound on VLC MediaPlayer, Nero ShowTime,
Output from Mediainfo 0.7.15:
When I do a demux of the muxed file I get
When I open the resulting wav-file in Cool Edit 2000, I have about 10ms valid audio.
I hope you can help!
some more info: when I multiplex with a mp3 file (instead of uncompressed audio) everything works fine.
A little bit of research shows that PCM is not supported in the mpg container format.
Can you use another type of container? what is your purpose?
I'm sorry to disagree, I read in row "MPEG Video File (.mpg, .mpeg)": Audio Formats supported "MPEG-1 Layers I, II, III (mp3), other formats only in private streams: LPCM"
LPCM is Linear Pulse Code modulation, that is uncompressed audio. Private stream ID: 0xA0.
On http://dvd.sourceforge.net/dvdinfo/dvdmpeg.html you can read:
Private stream 1 (Audio and subpictures)
sub-stream 0x20 to 0x3f are subpictures
sub-stream 0x80 to 0x87 are audio (AC3, DTS, SDDS)
sub-stream 0xA0 to 0xA7 are LPCM audio
I am able to multiplex the MPEG2 videofile and the wav-file with Womble MPEG Video Wizard 5.0 and the file plays without problem on Win Media Player, VLC player, Nero Show Time and stand-alone DVD player.
I also tried Muxman 0.16 and this works for some MPEG2 videofiles, but not all (it complains about being the GOP too long (>36), although Womble MPEG GOP fixer says that all is OK).
I am trying to write a "granny proof" application (wizard) to burn automatically a DVD with MPEG2 video and uncompressed audio with DVD-subtitles. So I need a command line multiplexer. My application runs OK for MP2 and MP3 audio.
Some more info: when I use the ffmpeg ... -f dvd option, I can play the file in WMP and Nero Showtime, NOT VLC player
I had the same error so I tried different pcm codecs "pcm_alaw" gave me the result I wanted with no errors & quality was great!
Hope this helps!