Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92517 - video encoding broken in mplayer-1.0_pre7
Summary: video encoding broken in mplayer-1.0_pre7
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 09:56 UTC by Jeffrey Gardner (RETIRED)
Modified: 2005-05-16 10:29 UTC (History)
1 user (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 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-13 09:56:49 UTC
Hi folks,
I upgraded from mplayer mplayer-1.0_pre6-r6 to mplayer-1.0_pre7 and found that mencoder no longer encoded video streams using:
mencoder $big_mpeg -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=1:vqmin=2:vqmax=31 $big_mpeg.avi ;
mencoder $big_mpeg -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2:vqmin=2:vqmax=31 $big_mpeg.avi ;

or similar....

downgrading to mplayer-1.0_pre6-r6 fixed the problem.
Comment 1 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-13 09:57:24 UTC
$ emerge info
Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gento                         o-r7 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r7 x86_64 AMD Opteron(tm) Processor 246
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 11 2005, 17:08:21)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=opteron -mtune=opteron -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kd                         e/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/sha                         re/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=opteron -mtune=opteron -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://mirrors.tds.net/gentoo ftp://gentoo.ccccom.com                          http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo ftp://mirror.iaw                         net.sandia.gov/pub/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 3xnowex X acpi alsa apache2 avi berkdb bitmap-fonts bonobo cdr crypt cups curl direc                         tfb dvd dvdr dvdread eds encode esd evo f77 fam fbcon flac font-server foomaticdb fortran gb gd                          gdbm gif gnome gnutls gpm gtk gtk2 gtkhtml guile imagemagick imlib ipv6 ithreads java jce jp2                          jpeg jpg junit ldap libgda live lzw lzw-tiff mad maildir motif mozilla moznomail mp3 mpeg mpi m                         ysql ncurses network nls no_wxgtk1 nptl nptlonly ogg oggvorbis opengl oss pam pda perl plotutil                         s png ppds python readline rtc sasl sdl spell ssl tcltk tcpd tiff truetype truetype-fonts type1                         -fonts unicode usb userlocales vorbis xine xml xml2 xpm xprint xrandr xv xvid zlib userland_GNU                          kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 2 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-13 10:06:13 UTC
oh yeah...I also tried compiling it with -O2 and got the same result.
gmplayer exits with Error 11 and mplayer says "no video stream found" and proceeds to play the audio.
Comment 3 Reimar Döffinger 2005-05-14 01:28:14 UTC
Are you sure you tried to play the video with pre7 and not an older version? Also make sure you have no codecs.conf installed on your system!
I'd also expect that adding e.g. -ffourcc XVID to the mencoder command will fix it.
Comment 4 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-14 02:21:30 UTC
Nope, same error.
In trying to view the video made with:

mencoder $big_mpeg -ffourcc xvid -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=1:vqmin=2:vqmax=31 $big_mpeg.avi ;
mencoder $big_mpeg -ffourcc xvid -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2:vqmin=2:vqmax=31 $big_mpeg.avi ;

Attempting to watch it using gmplayer (same version: MPlayer 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team) I get a "signal 11 in module: key_events" error.

Additionally, Totem reports:

Totem could not play 'file:///home/jeff/hda4/test.avi'.
Video codec 'FMP4' is not handled. You might need to install additional plugins to be able to play some types of movies

Comment 5 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-14 02:25:36 UTC
mplayer output:

 mplayer hda4/test.avi 
MPlayer 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Opteron Sledgehammer (Family: 8, Stepping: 10)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2


Warning unknown option cache_min at line 144
Warning unknown option cache_prefill at line 147

66 audio & 176 video codecs
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup                         scripts.
Playing hda4/test.avi.
AVI file format detected.
VIDEO:  [FMP4]  720x480  24bpp  29.970 fps  -17179870.0 kbps (-2097152.0 kbyte/s                        )
Clip info:
 Software: MEncoder 1.0pre7-3.4.3
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
No accelerated IMDCT transform found
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448.0 kbit/s
No accelerated resampler found
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Cannot find codec matching selected -vo and video format 0x34504D46.
Read DOCS/HTML/en/codecs.html! <--hmm, bet this is another great mplayer doc...NOT!
==========================================================================
Checking audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
AF_pre: 48000Hz/2ch/s16le
AO: [oss] 48000Hz 2ch s16le (2 bps)
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
Video: no video
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-05-14 04:43:30 UTC
My experience (confirmed by a few other people) is that whatever encoded with 1.0_pre7 using -lavc cannot be played anywhere by anything except mplayer-1.0_pre7 itself. I
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-05-14 04:43:30 UTC
My experience (confirmed by a few other people) is that whatever encoded with 1.0_pre7 using -lavc cannot be played anywhere by anything except mplayer-1.0_pre7 itself. I´d say that it is a major fault, rendering this version of mencoder almost useless. :-(
Comment 8 Reimar Döffinger 2005-05-14 05:33:13 UTC
> Video codec 'FMP4' is not handled. You might need to install additional plugins to be able to play some types of movies

I am quite certain that you did not encode that video with -ffourcc xvid

> Cannot find codec matching selected -vo and video format 0x34504D46.

0x34504D46 is FMP4
If an MPlayer version from after 2005/02/22 (pre7 is from 2005/04/16) says this, you broke it. Look for an outdated codecs.conf and delete it!

The reason is that lavc encoder has some features that might not be supported by other decoders. So it got a special fourcc. All older players that do not yet know about that won't play it thus. But with -ffourcc you can set one that they know (like xvid, divx, dx50 etc., preferably xvid, since it is closest in features).

P.S.: constructive critizism is more likely to improve the state of the documentation, I'm sure the documentation maintainers on the mplayer-DOCS mailinglist will consider any suggestions...
Comment 9 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-14 12:31:31 UTC
Hmm...
Replacing ~/.mplayer/codecs.conf with /usr/share/mplayer/codecs.conf seems to have fixed it. I can watch the test.avi as it's being made, but I'll have to see if it can be watched by other media players in the house.
bbiab...
Comment 10 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-14 15:19:33 UTC
Almost there...
running:

mencoder $1 -ffourcc xvid -aid 128 -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=1:vqmin=2:vqmax=31 $1.avi ;
mencoder $1 -ffourcc xvid -aid 128 -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2:vqmin=2:vqmax=31 $1.avi ;

it got through pass 1 and at the end of pass 2 threw this error:

mencoder: ratecontrol.c:644: ff_rate_estimate_qscale: Assertion `picture_number<rcc->num_entries' failed.
/home/jeff/fakeroot/bin/mymencoder: line 35: 28461 Aborted                 mencoder $1 -ffourcc xvid -aid 128 -ni -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2:vqmin=2:vqmax=31 $1.avi
Comment 11 Reimar Döffinger 2005-05-16 01:42:48 UTC
Well, it looks to me like the log file from the first pass is incomplete but
1) this has nothing to do with this bug report (it certainly isn't related to adding the -ffourcc, which fixes this bug)
2) I don't know if it makes sense to answer, since you don't seem to listen. I told you to delete the codecs.conf files(or at least move them away), since you didn't do that you will have trouble after every MPlayer upgrade with new features not working!!
Comment 12 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-16 02:14:58 UTC
Hi Reimar
Thanks for your pompous comments.
I removed ~/.mplayer/codecs.conf and that enablec playback with this version of mencoder. Unfortunately, encoding was still broken so I downgraded...
In the future, if you're going to be an ass while responding, I'll thank you to just keep it to yourself.
Okay?
(thanks for the codecs.conf though)
Comment 13 Luca Barbato gentoo-dev 2005-05-16 03:28:42 UTC
je_fro I'm afraid you didn't understand what Reimar wrote.

The newer ffmpeg put as default the FMP4 foucc for MPEG4 video produced for compatibility.

As Reimar stated you need to specify another fourcc (DIVX usually is the one that match better the ffmpeg features) if you want that file to be read by legacy players.

You have another local issue due the codecs.conf mismatch.

All you stated seems more a local problem not related to gentoo.

Closing as INVALID

If you think I should add some warning about those issues please reopen the bug.
Comment 14 Jeffrey Gardner (RETIRED) gentoo-dev 2005-05-16 10:29:32 UTC
No, I totally understood and implemented "-ffourcc xvid" immediately.
For me, that did not fix video encoding in my initial tests. I could be wrong, but I don't have time to fool with it right now. Maybe this weekend.
Thanks!