Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183584 - media-video/ffmpeg-0.4.9_p20070616-r1 breaks vlc-0.8.6c ffmpeg support
Summary: media-video/ffmpeg-0.4.9_p20070616-r1 breaks vlc-0.8.6c ffmpeg support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 183985 187029 188464 188469 189394 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-29 01:49 UTC by Albert Hopkins (RETIRED)
Modified: 2007-10-09 22:24 UTC (History)
17 users (show)

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


Attachments
output of "vlc -vv test7.avi" (blah.txt,51.14 KB, text/plain)
2007-06-29 19:44 UTC, Albert Hopkins (RETIRED)
Details
mp4 test video file (GirlCaughtCheatingRe.mp4,931.44 KB, video/mp4)
2007-08-11 14:02 UTC, Sylvain BERTRAND
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Hopkins (RETIRED) gentoo-dev 2007-06-29 01:49:45 UTC
With ffmpeg 0.4.9_p20070616-r1 it appears the behavior of it's xvid support has changed.  At least with the ffmpeg command, the previous version (0.4.9_p20070330)  used, e.g. "-vcodec xvid".  This has now apparently changed to "-vcodec -libxvid".

For the vlc player it simply will not play xvid media:

    [00000397] main decoder error: no suitable decoder module for fourcc `XVID'.
    VLC probably does not support this sound or video format.

I have re-emerged vlc (0.8.6c) to resolve the issue, but it does not.
Comment 1 Ben "Diskmaster" Lierman 2007-06-29 09:47:39 UTC
I spotted this warning when running vlc with -vv (with the affected revision of ffmpeg):
[00000001] main private warning: cannot load module `/usr/lib/vlc/codec/libffmpeg_plugin.so' (/usr/lib/vlc/codec/libffmpeg_plugin.so: undefined symbol: img_resample)                                                                   

Hope it helps.
Comment 2 Albert Hopkins (RETIRED) gentoo-dev 2007-06-29 16:07:54 UTC
(In reply to comment #1)
> I spotted this warning when running vlc with -vv (with the affected revision of
> ffmpeg):
> [00000001] main private warning: cannot load module
> `/usr/lib/vlc/codec/libffmpeg_plugin.so'
> (/usr/lib/vlc/codec/libffmpeg_plugin.so: undefined symbol: img_resample)        

I actually do not get that warning.
Comment 3 Alexis Ballier gentoo-dev 2007-06-29 18:16:16 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I spotted this warning when running vlc with -vv (with the affected revision of
> > ffmpeg):
> > [00000001] main private warning: cannot load module
> > `/usr/lib/vlc/codec/libffmpeg_plugin.so'
> > (/usr/lib/vlc/codec/libffmpeg_plugin.so: undefined symbol: img_resample)        
> 
> I actually do not get that warning.
> 


I do get it and it's due to ffmpeg having swscale enabled.
Are you using ffmpeg-0.4.9_p20070616-r1 ?
For now only vlc svn supports ffmpeg with swscale with some hacks.

There is something I don't understand in ffmpeg's code : 

in avcodec.h : 

#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
[...]

attribute_deprecated void img_resample(ImgReSampleContext *s,
                  AVPicture *output, const AVPicture *input);


Thus, since the version is lower, it tells that img_resample is present, however : 
in libavcodec/Makefile 
ifneq ($(CONFIG_SWSCALER),yes)
OBJS += imgresample.o
endif


same goes with img_convert, under versionned ifdefs and  : 

#ifndef CONFIG_SWSCALER
/* XXX: always use linesize. Return -1 if not supported */
int img_convert(AVPicture *dst, int dst_pix_fmt,



So, as vlc builds only shared objects for its plugins, it won't fail at compile time nor link time,  but when it'll try to load the plugin that has unresolvable symbols.
The hack for detecting it in vlc svn is to try to link to libswscale, if found then use swscale api if not then use old img_* api...
anyway, ffmpeg's way of handling that doesn't seem sane to me as when swscaler is enabled, it provides less functions than what it claims in its .h files

btw, swscaler will probably break other packages at link/runtime due to this


@others (esp. lu_zero): is there any better alternative ? I've seen some patches to ffmpeg on other distros repos that just build both img_* api and swsaler
Comment 4 Albert Hopkins (RETIRED) gentoo-dev 2007-06-29 19:43:03 UTC
(In reply to comment #3)

> > I actually do not get that warning.
> > 
> 
> 
> I do get it and it's due to ffmpeg having swscale enabled.
> Are you using ffmpeg-0.4.9_p20070616-r1 ?
> For now only vlc svn supports ffmpeg with swscale with some hacks.

    $ epm -q ffmpeg vlc
    ffmpeg-0.4.9_p20070616-r1
    vlc-0.8.6c

No, no undefined symbol warnings... I can play other codecs, it appears to only be xvid.  I'll attach the output of running "vlc -vv" on a xvid-encoded avi.  Totem (gstreamer) plays the same file but vlc does not.
Comment 5 Albert Hopkins (RETIRED) gentoo-dev 2007-06-29 19:44:58 UTC
Created attachment 123416 [details]
output of "vlc -vv test7.avi"

The output has been truncated because it appears to run forever (loops through the video).  I think that may be do to user preference though.
Comment 6 Alexis Ballier gentoo-dev 2007-06-29 21:03:17 UTC
(In reply to comment #5)
> Created an attachment (id=123416) [edit]
> output of "vlc -vv test7.avi"

and what about 'vlc --reset-plugins-cache -vv test7.avi' ?
Comment 7 Romain Riviere 2007-06-30 17:16:54 UTC
I have had the very same problem with this version of ffmpeg.

Also,

(In reply to comment #6)
> (In reply to comment #5)
> > Created an attachment (id=123416) [edit]
> > output of "vlc -vv test7.avi"
> 
> and what about 'vlc --reset-plugins-cache -vv test7.avi' ?
> 

Same thing, except the undefined symbol here is "img_resample_init". Seems to be the same problem though.

Reverting to 0.4.9_p20070616 for the moment.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-07-02 15:07:30 UTC
*** Bug 183985 has been marked as a duplicate of this bug. ***
Comment 9 Albert Hopkins (RETIRED) gentoo-dev 2007-07-02 15:56:29 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Created an attachment (id=123416) [edit]
> > output of "vlc -vv test7.avi"
> 
> and what about 'vlc --reset-plugins-cache -vv test7.avi' ?
> 

If I had replied to this on 30 June I would have said that "vlc --reset-plugins-cache" fixed the issue and I was able to view xvids.

But today that is not the case.  The only thing I can think of is that on the 1st of the month I do an automatic "emerge -e world".  Today when I tried vlc again I get the following:


[00000001] main private warning: cannot load module `/usr/lib/vlc/codec/libffmpeg_plugin.so' (/usr/lib/vlc/codec/libffmpeg_plugin.so: undefined symbol: img_resample_init)
[00000001] main private warning: cannot load module `/usr/lib/vlc/codec/libquicktime_plugin.so' (/usr/lib/vlc/codec/libquicktime_plugin.so: undefined symbol: NewHandleClear)

I tried re-emerging vlc-0.8.6c but I still get the undefineds.  So now I'm in the same camp as everyone else.
Comment 10 Albert Hopkins (RETIRED) gentoo-dev 2007-07-02 16:17:39 UTC
Ok here's an update (and perhaps why it did work for me before):

ffmpeg-0.4.9_p20070616   : works
ffmpeg-0.4.9_p20070616-r1: undefined symbols 
Comment 11 Le retraité 2007-07-02 16:20:36 UTC
Since this version of ffmpeg is obviously gonna break a lot of packages, shouldn't be hard masked for the moment?
Comment 12 Mark Wagner 2007-07-04 21:09:36 UTC
I have the same experience as marduk in Comment #10.
Comment 13 Brian Johnson 2007-07-16 14:43:19 UTC
Confirmed here. I too have the same problem as Comment #10. However, even after reverting back to the older revision, I had to: rm -rf ~/.vlc
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-07-29 18:49:05 UTC
*** Bug 187029 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-08-11 12:08:15 UTC
*** Bug 188464 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2007-08-11 13:25:03 UTC
*** Bug 188469 has been marked as a duplicate of this bug. ***
Comment 17 Sylvain BERTRAND 2007-08-11 14:02:03 UTC
Created attachment 127750 [details]
mp4 test video file
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-08-18 21:11:44 UTC
*** Bug 189394 has been marked as a duplicate of this bug. ***
Comment 19 Mark Wagner 2007-09-07 07:02:21 UTC
Is anybody working on this? If not might I suggest masking ffmpeg-0.4.9_p20070616-r1? This bug is getting old.
Comment 20 Patrizio Bassi 2007-09-07 07:29:16 UTC
no don't mask this. this is the new interface, apps must be updated to reflect the changes

have you checked vlc svn if they put any patch?
Comment 21 Alexis Ballier gentoo-dev 2007-09-07 07:58:15 UTC
(In reply to comment #20)
> no don't mask this. this is the new interface, apps must be updated to reflect
> the changes

imho the old interface shouldnt have been removed, just the new one added, but that's another story

> have you checked vlc svn if they put any patch?

Yes, I'm working on bumping a snapshot (which supports swscaler), but since vlc 0.9.0 is in developpement, I prefer making sure it will not break first.
Comment 22 Patrizio Bassi 2007-09-07 11:43:52 UTC
>imho the old interface shouldnt have been removed, just the new one added, but
that's another story

totally agree with you, but it's OT as it's not VLC bugzilla and we have no control over it 

ok, Alexis i'll be happy to test on my amd64 profile.

we need linphone update too. should i fill a separate bug for it?
Comment 23 Alexis Ballier gentoo-dev 2007-10-09 22:24:56 UTC
vlc snapshot bumped for unstable users, blocking older versions cause of bug #157746

for linphone, you'll have to open a separate bug if there isn't already one