Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452052 - media-video/mplayer-1.1-r1 with media-video/ffmpeg-1.1: Out of sync audio with AC-3
Summary: media-video/mplayer-1.1-r1 with media-video/ffmpeg-1.1: Out of sync audio wit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-14 15:19 UTC by octoploid
Modified: 2013-01-17 18:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description octoploid 2013-01-14 15:19:29 UTC
Audio is out of sync since I've upgraded to media-video/ffmpeg-1.1
This happens on any movie that uses AC-3 (running mplayer).
It could be a timer problem, because the out-of-sync-ness 
gets bigger and bigger the longer the movie run.

Switching back to ffmpeg-1.0.1 "fixes" the issue. 

Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-01-14 15:29:55 UTC
I can confirm this issue.
Comment 2 Alexis Ballier gentoo-dev 2013-01-16 00:24:11 UTC
got a sample ? did you rebuild mplayer because libavutil abi changed ?
Comment 3 octoploid 2013-01-16 08:53:52 UTC
(In reply to comment #2)
> got a sample ? 

I first noticed this bug while watching the opening of: 
http://thepiratebay.se/torrent/3739423/Out.Of.the.past.DvDrip.Xvid%28Eng%29%281947%29-T3K
But this bug happened on every movie of my collection that I've checked.

> did you rebuild mplayer because libavutil abi changed ?

Yes, sure.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-01-16 14:35:56 UTC
(In reply to comment #2)
> got a sample? 

No need for a sample. Simply try the following:

  mplayer dvd://1 -dumpstream -dumpfile sample.vob

then watch that file

  mplayer sample.vob


> did you rebuild mplayer because libavutil abi changed?

Of course... otherweise mplayer would crap out with a "cannot open shared library yaddayadda..."
Comment 5 Alexis Ballier gentoo-dev 2013-01-17 14:56:43 UTC
Do you get this in the log:
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Unsupported AVSampleFormat 8
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [liba52] AC3 decoding with liba52
No accelerated IMDCT transform found
AUDIO: 48000 Hz, 2 ch, floatle, 384.0 kbit/12.50% (ratio: 48000->384000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================

?

note it fails to use ffmpeg and then uses liba52
Comment 6 Alexis Ballier gentoo-dev 2013-01-17 15:42:37 UTC
I've added a patch to mplayer-1.1-r1 that should fix this, please sync in a few hours and rebuild it. (no revbump since ffmpeg 1.1 is masked)
Comment 7 octoploid 2013-01-17 16:04:00 UTC
(In reply to comment #6)
> I've added a patch to mplayer-1.1-r1 that should fix this, please sync in a
> few hours and rebuild it. (no revbump since ffmpeg 1.1 is masked)

No, unfortunately it doesn't fix the issue.

With ffmpeg-1.1 and mplayer-1.1-r1 I still get e.g.:
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "mp3float" init OK!
Unsupported AVSampleFormat 8
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "mp3" init OK!
Unsupported AVSampleFormat 6
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [libmad] libmad mpeg audio decoder
dec_audio: Allocating 4096 bytes for input buffer.
dec_audio: Allocating 9216 + 131072 = 140288 bytes for output buffer.
XXX initial  v_pts=0.000  a_pos=1920 (0.201) 
AUDIO: 48000 Hz, 1 ch, s16le, 76.5 kbit/9.96% (ratio: 9565->96000)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================

With ffmpeg-1.0.1 (after deleting the epatch libav-9.patch line from the mplayer ebuild):
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "mp3float" init OK!
AUDIO: 48000 Hz, 1 ch, floatle, 76.5 kbit/4.98% (ratio: 9565->192000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================

Without deleting the epatch line "emerge mplayer" fails with ffmpeg-1.0.1:

libvo/vo_png.c: In function 'config':
libvo/vo_png.c:135:9: error: invalid use of undefined type 'enum AVPixelFormat'
         avctx->pix_fmt = imgfmt2pixfmt(format);
         ^
make: *** [libvo/vo_png.o] Error 1
Comment 8 Alexis Ballier gentoo-dev 2013-01-17 16:51:23 UTC
are you sure that this patch is applied : mplayer-1.1-planaraudio.patch ??
Comment 9 octoploid 2013-01-17 18:00:48 UTC
(In reply to comment #8)
> are you sure that this patch is applied : mplayer-1.1-planaraudio.patch ??

It wasn't:

x4 /portage # find . -name mplayer-1.1-planaraudio.patch
x4 /portage # 

Just synced again and now it works fine.

Thanks.