smizz <[email protected]> added the comment:

Well, bug found, but still I did this analyzation.

G:\temp\ffmpeg testing>ffmpeg -i audio.ac3
FFmpeg version SVN-r26099, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 27 2010 04:07:27 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 2 /  1.70. 2
  libswscale     0.12. 0 /  0.12. 0
[ac3 @ 01c5c110] max_analyze_duration reached
[ac3 @ 01c5c110] Estimating duration from bitrate, this may be inaccurate
Input #0, ac3, from 'audio.ac3':
  Duration: 00:00:41.66, bitrate: 448 kb/s
    Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
At least one output file must be specified

G:\temp\ffmpeg testing>ffmpeg -i video.avi
FFmpeg version SVN-r26099, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 27 2010 04:07:27 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 2 /  1.70. 2
  libswscale     0.12. 0 /  0.12. 0

Seems stream 0 codec frame rate differs from container frame rate: 24.01 (65535/
2730) -> 24.00 (24/1)
Input #0, avi, from 'video.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 00:00:41.66, start: 0.000000, bitrate: 250 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 24 tbr, 24
tbn, 24.01 tbc
At least one output file must be specified

G:\temp\ffmpeg testing>ffmpeg -i video.avi -i audio.ac3 -acodec copy -vcodec cop
y output.avi
FFmpeg version SVN-r26099, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 27 2010 04:07:27 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 2 /  1.70. 2
  libswscale     0.12. 0 /  0.12. 0

Seems stream 0 codec frame rate differs from container frame rate: 24.01 (65535/
2730) -> 24.00 (24/1)
Input #0, avi, from 'video.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 00:00:41.66, start: 0.000000, bitrate: 250 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 24 tbr, 24
tbn, 24.01 tbc
[ac3 @ 02e55fa0] max_analyze_duration reached
[ac3 @ 02e55fa0] Estimating duration from bitrate, this may be inaccurate
Input #1, ac3, from 'audio.ac3':
  Duration: 00:00:41.66, bitrate: 448 kb/s
    Stream #1.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, avi, to 'output.avi':
  Metadata:
    ISFT            : Lavf52.89.0
    Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], q=2-31, 24
tbn, 24 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, 448 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 1000 fps=  0 q=-1.0 Lsize=    3615kB time=41.67 bitrate= 710.7kbits/s

video:1238kB audio:2312kB global headers:0kB muxing overhead 1.821802%

G:\temp\ffmpeg testing>ffmpeg -i output.avi
FFmpeg version SVN-r26099, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 27 2010 04:07:27 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 2 /  1.70. 2
  libswscale     0.12. 0 /  0.12. 0

Seems stream 0 codec frame rate differs from container frame rate: 24.01 (65535/
2730) -> 24.00 (24/1)
Input #0, avi, from 'output.avi':
  Metadata:
    encoder         : Lavf52.89.0
  Duration: 00:00:41.66, start: 0.000000, bitrate: 700 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 24 tbr, 24
tbn, 24.01 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
At least one output file must be specified

Result:

Windows Media Player: No Audio
ffplay: video too fast
VLC: 

No suitable decoder module:
VLC does not support the audio or video format "undf". Unfortunately there is no
way for you to fix this.

MPC-HC: 

G:\temp\ffmpeg testing\output.avi::Audio
Audio Switcher::Out

Media Type 0:
--------------------------
Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 448kbps

AM_MEDIA_TYPE: 
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {0000FFFE-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 56000
nBlockAlign: 1536
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 0
dwChannelMask: 0x0000060f
SubFormat: {00002000-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 80 bb 00 00 c0 da 00 00 00 06 10 00 þÿ..€»..ÀÚ......
0010: 16 00 00 00 0f 06 00 00 00 20 00 00 00 00 10 00 ......... ......
0020: 80 00 00 aa 00 38 9b 71                         €..ª.8›q


Mediainfo:

General
Complete name                    : G:\temp\ffmpeg testing\output.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 3.95 MiB
Duration                         : 50s 16ms
Overall bit rate                 : 662 Kbps
Writing application              : Lavf52.89.0

Video
ID                               : 0
Format                           : MPEG-4 Visual
Format profile                   : Advanced sim...@l5
Format settings, BVOP            : Yes
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Codec ID                         : XVID
Codec ID/Hint                    : XviD
Duration                         : 41s 667ms
Bit rate                         : 243 Kbps
Width                            : 624 pixels
Height                           : 352 pixels
Display aspect ratio             : 16:9
Frame rate                       : 24.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.046
Stream size                      : 1.21 MiB (31%)
Writing library                  : XviD 1.3.0.dev55

Audio
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : 00001000-0000-0020-8000-00AA00389B71
Duration                         : 50s 16ms
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L, C, R, Middle: L, R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 2.67 MiB (68%)
Interleave, duration             : 27 ms (0.64 video frame)


Fixing attempt:

G:\temp\ffmpeg testing>avifix -i outputfixed.avi -N 0x2000
[avifix] scanning AVI-file outputtofix.avi for header information
[avilib] V: 24.000 fps, codec=XVID, frames=1000, width=624, height=352
[avilib] A: 48000 Hz, format=0xfffe, bits=16, channels=6, bitrate=448 kbps,
[avilib]    1563 chunks, 2800896 bytes, VBR
[avifix] successfully updated AVI file outputtofix.avi
[avilib] V: 24.000 fps, codec=XVID, frames=1000, width=624, height=352
[avilib] A: 48000 Hz, format=0x2000, bits=16, channels=6, bitrate=448 kbps,
[avilib]    1563 chunks, 2800896 bytes, VBR


Result:

General
Complete name                    : G:\temp\ffmpeg testing\outputtofix.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 3.95 MiB
Duration                         : 50s 16ms
Overall bit rate                 : 662 Kbps
Writing application              : Lavf52.89.0

Video
ID                               : 0
Format                           : MPEG-4 Visual
Format profile                   : Advanced sim...@l5
Format settings, BVOP            : Yes
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Codec ID                         : XVID
Codec ID/Hint                    : XviD
Duration                         : 41s 667ms
Bit rate                         : 243 Kbps
Width                            : 624 pixels
Height                           : 352 pixels
Display aspect ratio             : 16:9
Frame rate                       : 24.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.046
Stream size                      : 1.21 MiB (31%)
Writing library                  : XviD 1.3.0.dev55

Audio
ID                               : 1
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : 2000
Duration                         : 50s 16ms
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 2.67 MiB (68%)
Alignment                        : Aligned on interleaves
Interleave, duration             : 27 ms (0.64 video frame)

Players:

MPC-HC: Starts video @ ~10 secs, async, video too fast
VLC: Some sort of audio at the beginning, distorted, video at correct speed
Windows Media Player: Audio and Video start at 0, video too fast
ffplay: video too fast

Perfectly Muxed avi:

eneral
Complete name                    : G:\temp\ffmpeg testing\perfect.avi
Format                           : AVI
Format/Info                      : Audio Video Interleave
File size                        : 3.49 MiB
Duration                         : 41s 667ms
Overall bit rate                 : 703 Kbps
Writing application              : VirtualDubMod 1.5.10.2 (build 2542/release)
Writing library                  : VirtualDubMod build 2542/release

Video
ID                               : 0
Format                           : MPEG-4 Visual
Format profile                   : Advanced sim...@l5
Format settings, BVOP            : Yes
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Codec ID                         : XVID
Codec ID/Hint                    : XviD
Duration                         : 41s 666ms
Bit rate                         : 243 Kbps
Width                            : 624 pixels
Height                           : 352 pixels
Display aspect ratio             : 16:9
Frame rate                       : 24.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.046
Stream size                      : 1.21 MiB (35%)
Writing library                  : XviD 1.3.0.dev55

Audio
ID                               : 1
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : 2000
Duration                         : 41s 667ms
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 2.23 MiB (64%)
Alignment                        : Split accross interleaves
Interleave, duration             : 42 ms (1.01 video frame)
Interleave, preload duration     : 500 ms

Audio only muxing:

G:\temp\ffmpeg testing>ffmpeg -i audio.ac3 -acodec copy audio.avi
FFmpeg version SVN-r26099, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 27 2010 04:07:27 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 2 /  1.70. 2
  libswscale     0.12. 0 /  0.12. 0
[ac3 @ 003ac0e0] max_analyze_duration reached
[ac3 @ 003ac0e0] Estimating duration from bitrate, this may be inaccurate
Input #0, ac3, from 'audio.ac3':
  Duration: 00:00:41.66, bitrate: 448 kb/s
    Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
File 'audio.avi' already exists. Overwrite ? [y/N] y
Output #0, avi, to 'audio.avi':
  Metadata:
    ISFT            : Lavf52.89.0
    Stream #0.0: Audio: ac3, 48000 Hz, 5.1, 448 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=    2315kB time=41.70 bitrate= 454.8kbits/s
video:0kB audio:2279kB global headers:0kB muxing overhead 1.583700%

MPC-HC: Plays fine
ffplay: propably async, audio does not start at zero in visualization window
Windows Media Player: Won't play
VLC:

No suitable decoder module:
VLC does not support the audio or video format "undf". Unfortunately there is no
way for you to fix this.

Conclusion:

One should not use Waveformat Extensible as codec-ID for AC3 as most used
players expect 0x2000 (which is standard as far as I could find out)
One should investigate the muxing bug. (Thanks for opening the issue)

Sorry for not posting output before, I just reproduced the bug earlier with
selurs given example.

Hope there is no needed output missing. I added the files I used to reproduce
and analyse the issue.
File 'ffmpeg_testing.tar' not attached - you can download it from 
https://roundup.ffmpeg.org/file1245.

----------
substatus: open -> analyzed

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2446>
________________________________________________

Reply via email to