I created a video clip using ffmpeg (vcodec: mpeg2video, acodec: AC3 5.1).

The file can be played normally on Ubuntu, but when I play it on an XP machine, there is no sound. I can play AC3 files and other movies with AC3 sound. I already tried many codec packs and many players.

When I compare the MediaInfo tab of the Properties window of the file with another playable movie, I see that the Audio Identifier of the audio stream in my file is 0x80 while it is 0x02 in the other movie.

So I guess that's why players on XP can't recognize the audio codec. When I use an MKV container instead of MPEG (still mpeg2video codec), then the result is OK on both Ubuntu and XP (with the correct Audio ID). I really need MPEG though.

Any idea?

This is the command I used:

~/ffmpeg/ffmpeg/ffmpeg -loop_input \
  -t 97 -r 30000/1001 -i v%4d.tga -i final.ac3 \
  -vcodec mpeg2video -qscale 1 -s 400x400 -r 30000/1001 \
  -acodec copy -y out6.mpeg 2

This is the output of mediainfo (on Ubuntu):

Complete name                    : out6.mpeg
Format                           : MPEG-PS
File size                        : 6.86 MiB
Duration                         : 1mn 37s
Overall bit rate                 : 593 Kbps

ID                               : 224 (0xE0)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@Main
Format settings, BVOP            : No
Format settings, Matrix          : Default
Format_Settings_GOP              : M=1, N=12
Duration                         : 1mn 37s
Bit rate mode                    : Variable
Bit rate                         : 122 Kbps
Width                            : 400 pixels
Height                           : 400 pixels
Display aspect ratio             : 1.000
Frame rate                       : 29.970 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.025
Stream size                      : 1.41 MiB (21%)

ID                               : 128 (0x80)
Format                           : AC-3
Format/Info                      : Audio Coding 3
Duration                         : 1mn 36s
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 44.1 KHz
Stream size                      : 5.18 MiB (75%)
  • What players have you tried on Windows? For example in VLC, what does it say in the "Info" window about your file? What do you see under Audio » Audio Track or Channels?
    – slhck
    Nov 22, 2011 at 8:45
  • Hi slhck, I tried VLC, Nero, WMP, WM Classic. The Info window of VLC does not contain anything (except filename). But the Codecs tab shows a long list of 110 streams. The first one is video with MPEG2 codec, second is subtitle, others are audio with different codecs. The Tracks menu shows 18 tracks with a check mark on Track 1.
    – Andy Le
    Nov 22, 2011 at 21:16
  • 110 streams? There's definitely something wrong there. I can't think of anything else to try at the moment though. I wonder if VLC shows the same on Ubuntu?
    – slhck
    Nov 22, 2011 at 21:31
  • To my surprise, on Ubuntu, the Codecs tab shows 37 streams, while Tracks menu shows 22 tracks :) Probably this is a bug of ffmpeg?
    – Andy Le
    Nov 23, 2011 at 4:16
  • Could very well be! Do you have the latest version?
    – slhck
    Nov 23, 2011 at 8:05

1 Answer 1


After long time struggling with the problem, I found a way to work around:

first encode using ffmpeg without sound

ffmpeg -loop_input -t 97 -r 30000/1001 -i v%4d.tga -s 400x400 \
-vcodec mpeg2video -acodec copy -f mpeg -y -r 30000/1001 test7.mpeg

then use mencoder to merge the video and the sound

mencoder -of mpeg -ovc copy test7.mpeg \
-audiofile Final.ac3 -oac copy -o test8.mpeg

The output from mediainfo remains almost the same as before, but the sound is now OK. I don't know why. I tried to compare the two files with cmp, but there are too many differences so I couldn't figure out anything.

I hope in the future I can use ffmpeg to do all in one step.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.