[issue1498] AC3 5.1 breaks ffmpeg

2010-12-30 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

The problem mentioned later in this thread, that high-bitrate AC-3 in avi was
not playable with any player, is fixed in r26167.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-12-21 Thread Roman

Roman bst...@pisem.net added the comment:

I was converting .mkv with h264 and AAC 5.1 to .avi with XviD and AC3 5.1 and
the resulting AVI file had video running twice as fast as it should in WMP. The
audio sounded fine but was out of sync as video playback finished half way
through the audio stream.

I'm too far from this codebase but I've spend a day trying to figure it out what
is going on. I noticed one thing that nobody seems to have mentioned before:
this bug will only manifest itself if the AC3 5.1 stream has bitrate of 448kbps
or greater. Setting it to 384kbps or lower produces a good AVI that plays as
expected in WMP.

Hopefully that helps.

My ffmpeg build:

FFmpeg version SVN-r26061, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 20 2010 08:16:35 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm
--enable-libvorbis --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 -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32
--enable-avisynth --enable-w32threads --cross-prefix=i686-mingw32- --cc='ccache
i686-mingw32-gcc' --enable-memalign-hack
  libavutil 50.35. 0 / 50.35. 0
  libavcore  0.16. 0 /  0.16. 0
  libavcodec52.100. 0 / 52.100. 0
  libavformat   52.88. 0 / 52.88. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.69. 0 /  1.69. 0
  libswscale 0.12. 0 /  0.12. 0

--
status: closed - open
substatus: works_for_me - reproduced


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-12-21 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Please open a new issue for your problem (including full, uncut output 
of the conversion).

--
status: open - closed
substatus: reproduced - works_for_me


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-11-21 Thread Reimar Döffinger

Reimar Döffinger b...@reimardoeffinger.de added the comment:

Note that MPlayer starting with revision 32639 can play the files as well, the
required changes are minimal.
Also the reported sync issues are probably related to -acodec copy and should be
avoidable by -acodec ac3, different -async/-vsync options to ffplay or -mc 100
to MPlayer should work around it, but please open a new bug for those, that is
likely related to the AC3 parser and not to the muxer.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-06-19 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

No audio problems with WMP claimed (MPlayer probably plays fine with -demuxer 
lavf).

If you have a problem with video muxing, please open a new issue.

--
status: open - closed
substatus:  - works_for_me


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-06-18 Thread Gregory

Gregory gringo...@hotmail.com added the comment:

In my test... 

ffmpeg can not mux multi channel (ac3) and mpeg-4 into a useable avi output. The
ac3 codec ID as reported by gspot=0xfffe (Extensible wave format) AC3. (This
should be 0x2000 afaik)

WMP will play the clip with video at aprox 2x speed, however audio playback
speed seems correct. Please see the included sample

MPlayer will play with correct video speed but with broken audio, the audio is
just static.

I can use ffmpeg to encode the streams separately them mux with AVIMux GUI and
get a properly working final result.

Cheers.
File 'test_ac36_mpeg4_ffmpg_ffmux.avi' not attached - you can download it from 
https://roundup.ffmpeg.org/file945.

--
status: closed - 
substatus: invalid - 


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-06-18 Thread Gregory

Gregory gringo...@hotmail.com added the comment:

Here is my command line and console dump to support MSG 10876

C:/ffmpeg/ffmpeg_SVN-r23642-Static.exe -threads 2 -i
C:/Users/Kodiak/test_ac36_mpeg4_ffmpeg_vidout.avi -i
C:/Users/Kodiak/test_ac36_mpeg4_ffmpeg_vidout.ac3 -vcodec copy -acodec copy -y
C:/Users/Kodiak/test_ac36_mpeg4_ffmpeg_ffmux.avi -map 0:0 -map 1:0

FFmpeg version SVN-r23642, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jun 18 2010 12:13:14 with gcc 4.4.2
  configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynt
h --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad
 --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --ena
ble-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --
enable-libx264 --extra-libs='-lx264 -lpthread' --enable-libopencore_amrwb --enab
le-libopencore_amrnb --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -
lwinmm' --enable-libvpx --arch=x86 --cross-prefix=i686-mingw32- --cc='ccache i68
6-mingw32-gcc' --enable-memalign-hack
  libavutil 50.19. 0 / 50.19. 0
  libavcodec52.76. 0 / 52.76. 0
  libavformat   52.68. 0 / 52.68. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter1.20. 0 /  1.20. 0
  libswscale 0.11. 0 /  0.11. 0

Seems stream 0 codec frame rate differs from container frame rate: 2997.00 (2997
/1) - 23.98 (24000/1001)
Input #0, avi, from 'C:\Users\Kodiak\test_ac36_mpeg4_ffmpeg_vidout.avi
':
  Metadata:
ISFT: Lavf52.68.0
  Duration: 00:00:08.38, start: 0.00, bitrate: 509 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x288 [PAR 1:1 DAR 20:9], 23.98 fps, 2
3.98 tbr, 23.98 tbn, 2997 tbc
[ac3 @ 03acef40]max_analyze_duration reached
[ac3 @ 03acef40]Estimating duration from bitrate, this may be inaccurate
Input #1, ac3, from 'C:\Users\Kodiak\test_ac36_mpeg4_ffmpeg_vidout.ac3
':
  Duration: 00:00:08.38, bitrate: 448 kb/s
Stream #1.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, avi, to 'C:\Users\Kodiak\test_ac36_mpeg4_ffmpeg_ffmux.avi':

  Metadata:
ISFT: Lavf52.68.0
Stream #0.0: Video: mpeg4, yuv420p, 640x288 [PAR 1:1 DAR 20:9], q=2-31, 23.9
8 tbn, 23.98 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=  201 fps=  0 q=-1.0 Lsize= 990kB time=8.38 bitrate= 967.6kbits/s
video:511kB audio:458kB global headers:0kB muxing overhead 2.142389%

--
status:  - open


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-05-31 Thread Gregory

Gregory gringo...@hotmail.com added the comment:

ffmpeg-r23391-swscale-r31279-mingw32-static sets incorrect audio ID for multi
channel audio.

The output file is not playable by WMP.

This issue and the fix seems to have been forgotten.

Please review this problem.
__

sample.xvid.ac3.51.avi

Audio
ID   : 1
Format   : AC-3
Format/Info  : Audio Coding 3
Codec ID : 2000
Duration : 1mn 0s
Bit rate mode: Constant
Bit rate : 448 Kbps
Channel(s)   : 6 channels
Channel positions: Front: L C R, Surround: L R, LFE


C:/ffmpeg/ffmpeg.exe -threads 2 -i I:/Sample/sample.xvid.ac3.51.avi -vcodec
copy -acodec copy -y I:/Sample/test.ffmpeg.output.avi 
__

Audio
Format   : AC-3
Format/Info  : Audio Coding 3
Codec ID : 1000--0020-8000-00AA00389B71
Duration : 1mn 0s
Bit rate : 448 Kbps
Channel(s)   : 6 channels
Channel positions: Front: L, C, R, Middle: L, R, LFE

--
status: closed - 
substatus: works_for_me - 


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1498



[issue1498] AC3 5.1 breaks ffmpeg

2010-01-26 Thread Jacques

Jacques jacques.h...@credit-suisse.com added the comment:

Hi guys,

I just had a look at SVN-r21465 and this is still an 
issue.  

put_le16(pb, 0xfffe) in riff.c on #334 is not tagging 
the audio stream correctly. VLC (1.0.3) still picks it 
up as undf and breaks and mplayer (dev-SVN-r28227-
4.1.2) does the same.

put_le16(pb, enc-codec_tag) seems to tag it correctly.

--
substatus: works_for_me - open

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2010-01-26 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Did you consider that the problem might be vlc-related?
AFAIK, the relevant application for avi files is WMP, no?

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2010-01-26 Thread Reimar Döffinger

Reimar Döffinger b...@reimardoeffinger.de added the comment:

On Tue, Jan 26, 2010 at 10:03:40PM +, Jacques wrote:
 
 Jacques jacques.h...@credit-suisse.com added the comment:
 
 Hi guys,
 
 I just had a look at SVN-r21465 and this is still an 
 issue.  
 
 put_le16(pb, 0xfffe) in riff.c on #334 is not tagging 
 the audio stream correctly. VLC (1.0.3) still picks it 
 up as undf and breaks and mplayer (dev-SVN-r28227-
 4.1.2) does the same.
 
 put_le16(pb, enc-codec_tag) seems to tag it correctly.

VLC an MPlayer certainly aren't authoritative for RIFF.
The specification and Window Media Player are, and to my
knowledge they agree that FFmpeg generates correct files,
even if other applications lack support for this part of
the format.

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-29 Thread Diego Biurrun

Diego Biurrun di...@biurrun.de added the comment:

This is not the MediaCoder issue tracker. Please don't bother us with MediaCoder
bugs.

--
status: open - closed
substatus: reproduced - works_for_me

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-29 Thread Diego Biurrun

Diego Biurrun di...@biurrun.de added the comment:

Your problems with MediaCoder are not our concern. Do not reopen this issue.

--
status: open - closed
substatus: reproduced - works_for_me

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-17 Thread Jai Menon

Jai Menon jmeno...@gmail.com added the comment:

Yeah, roundup also replicated one of my edits 4 times :)
Is something like the attached patch what you had in mind? It fixes the 
issue in this thread anyway.

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_

wavfmtex.patch
Description: Binary data


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-17 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

Jai Menon wrote:
 Jai Menon jmeno...@gmail.com added the comment:

 Yeah, roundup also replicated one of my edits 4 times :)
 Is something like the attached patch what you had in mind? It fixes the 
 issue in this thread anyway.
   

Looks ok, send patch to mailinglist. Michael needs to ok.

MvH
Benjamin Larsson

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-16 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

Should be fixed in svn now.

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-12-16 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

Benjamin Larsson wrote:
 Benjamin Larsson ba...@ludd.ltu.se added the comment:
 
 Should be fixed in svn now.

Lol :) roundup tricked me here took Jai's last message for some reason.
I did NOT fix this in svn, I wrote that I never wrote the patch (coz I
forgot).

MvH
Benjamin Larsson

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-29 Thread Jacques

Jacques jacques.h...@credit-suisse.com added the comment:

Hi, Benjamin

You're right.  As a test, I've edited 
libavformat/riff.c and 

302: int waveformatextensible=0;
309: /* waveformatextensible = enc-channels  2  
enc-channel_layout; */

Recompiled ffmpeg and it now creates 5.1 AC3 audio 
perfectly.  Thanks for the tip.

Cheers,
Jacques

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-29 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

Ok, I'll try to cook up a patch later today that disables the extended 
header for avi output. Thanks for testing.

MvH
Benjamin Larsson

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-26 Thread Jacques

Jacques jacques.h...@credit-suisse.com added the comment:

Bumping this ticket up to Important.

--
priority: normal - important

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-26 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Please do not raise the priority (unless this is a regression and you can point
to the responsible version).
Banan, is this a reproduced issue?

--
priority: important - normal
status: new - open
substatus: new - open

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-26 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

Carl Eugen Hoyos wrote:
 Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

 Please do not raise the priority (unless this is a regression and you can 
 point
 to the responsible version).
 Banan, is this a reproduced issue?

   

I just assumed based on this line:

 Uncompressed PCM and the FourCC code is the corresponding 0xfffe tag.

If it is true it is caused by channels  2 and channel_layout!=NULL.
The guilty code is here:

http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=libavformat/riff.c;h=74d3908b693a18ed7472d2783e27d2d17fd6d442;hb=HEAD#l298

The line:

waveformatextensible = enc-channels  2  enc-channel_layout;

should include a check for the output format also so that 
waveformatextensible is only true when the output format is wave.
And this is most likely a regression in avi muxing, it would have worked 
before.

MvH
Benjamin Larsson

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-25 Thread Jacques

New submission from Jacques jacques.h...@credit-suisse.com:

Hi there,

Overview:  Encoding AC3 5.1 is broken when selecting all 6 channels.  AC3 
stereo encoding works fine.
SVN Rel: 20371
Config: --prefix=/app/local --extra-cflags=-I/app/local/include 
--extra-ldflags=-L/app/local/lib --enable-gpl --
enable-libxvid --enable-pthreads --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libfaad --enable-
nonfree --enable-shared

Descr:  I've tested this on several VOBs.  FFMPEG encodes stereo AC3 streams 
correctly, but not 5.1 channels.  The 
audio stream gets tagged as Uncompressed PCM and the FourCC code is the 
corresponding 0xfffe tag.  It should be 
AC3-A52 tagged as 0x2000.

Cmd and output:

##

# ffmpeg -v 9 -loglevel 99 -y -t 00:00:10 -i file.vob -vcodec libxvid -b 2000k 
-acodec ac3 -ac 6 -ab 448k -f avi 
out.avi
FFmpeg version SVN-r20371, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Oct 25 2009 20:26:03 with gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
  configuration: --prefix=/app/local --extra-cflags=-I/app/local/include 
--extra-ldflags=-L/app/local/lib --enable-
gpl --enable-libxvid --enable-pthreads --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libfaad --
enable-nonfree --enable-shared
  libavutil 50. 3. 0 / 50. 3. 0
  libavcodec52.37. 1 / 52.37. 1
  libavformat   52.39. 2 / 52.39. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale 0. 7. 1 /  0. 7. 1
[NULL @ 0x1d8543c0]Probed with size=8192 and score=52
[mpeg @ 0x1d8543c0]Probe with size=2012, packets=1 detected mpegvideo with 
score=25
[mpeg @ 0x1d8543c0]max_analyze_duration reached

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) 
- 25.00 (25/1)
Input #0, mpeg, from 'file.vob':
  Duration: N/A, start: 0.287267, bitrate: N/A
Stream #0.0[0x1e0], 1/9: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 
DAR 4:3], 1/50, 9800 kb/s, 25 tbr, 
90k tbn, 50 tbc
Stream #0.1[0x80], 1/9: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.2[0x81], 1/9: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.3[0x82], 1/9: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Output #0, avi, to 'out.avi':
Stream #0.0, 1/25: Video: libxvid, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 
1/25, q=2-31, 2000 kb/s, 25 tbn, 25 tbc
Stream #0.1, 4/125: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream mapping:
  Stream #0.0 - #0.0
  Stream #0.1 - #0.1
Press [q] to stop encoding
frame=  258 fps= 21 q=2.0 Lsize=2459kB time=10.02 bitrate=2011.1kbits/s 
dup=0 drop=0
video:1888kB audio:548kB global headers:0kB muxing overhead 0.955214%

##

Media players like VLC, complains about the audio stream (also checked in GSpot 
and VideoSpec).  If the above cmd 
only encodes 2 channels on stream 0.1 (-ac 2) it's fine.

I've attached the out.avi vid.

Cheers,
Jacques
File 'out.avi' not attached - you can download it from 
https://roundup.ffmpeg.org/roundup/ffmpeg/file585.

--
files: out.avi
messages: 7622
priority: normal
status: new
substatus: new
title: AC3 5.1 breaks ffmpeg
type: bug

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_


[issue1498] AC3 5.1 breaks ffmpeg

2009-10-25 Thread Benjamin Larsson

Benjamin Larsson ba...@ludd.ltu.se added the comment:

To the one who investigates further, this is most likely caused by the
wavformatextensible patches. Proposed solution is, when the outformat is
avi don't write the wavfmtext header.

MvH
Benjamin Larsson

_
FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1498
_