Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problems decoding h264 file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Mon Apr 09, 2007 7:27 pm    Post subject: problems decoding h264 file Reply with quote

I've in the middle of copying my movie collection onto hard disk, and on some movies something goes wrong while encoding/decoding the video. When playing the files, around halfway through the movie the image goes crazy and I get the following in xterm:

mplayer:
[h264 @ 0xc4f520]warning: first frame is no keyframe
[h264 @ 0xc4f520]AVC: nal size 15390048
[h264 @ 0xc4f520]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0xc4f520]AVC: nal size 13600
[h264 @ 0xc4f520]no frame!
Error while decoding frame!
[h264 @ 0xc4f520]AVC: nal size 13600
[h264 @ 0xc4f520]no frame!
Error while decoding frame!
[h264 @ 0xc4f520]AVC: nal size 13600
[h264 @ 0xc4f520]no frame!
Error while decoding frame!
[h264 @ 0xc4f520]AVC: nal size 13600
[h264 @ 0xc4f520]no frame!
Error while decoding frame!
[h264 @ 0xc4f520]AVC: nal size 13600
[h264 @ 0xc4f520]no frame!
...etc

ffplay:
[h264 @ 0x2b3d335a8410]AVC: Consumed only 37086 bytes instead of 15390048
[h264 @ 0x2b3d335a8410]Unknown NAL code: 26
[h264 @ 0x2b3d335a8410]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0x2b3d335a8410]AVC: Consumed only 8293 bytes instead of 15390048
[h264 @ 0x2b3d335a8410]Unknown NAL code: 26
[h264 @ 0x2b3d335a8410]illegal short term buffer state detected
[h264 @ 0x2b3d335a8410]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0x2b3d335a8410]AVC: Consumed only 9490 bytes instead of 13600
[h264 @ 0x2b3d335a8410]illegal short term buffer state detected
[h264 @ 0x2b3d335a8410]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0x2b3d335a8410]AVC: Consumed only 4817 bytes instead of 15390048
[h264 @ 0x2b3d335a8410]Unknown NAL code: 26
[h264 @ 0x2b3d335a8410]illegal short term buffer state detected
[h264 @ 0x2b3d335a8410]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0x2b3d335a8410]AVC: Consumed only 8387 bytes instead of 13600
[h264 @ 0x2b3d335a8410]illegal short term buffer state detected
[h264 @ 0x2b3d335a8410]concealing 531 DC, 531 AC, 531 MV errors
[h264 @ 0x2b3d335a8410]AVC: Consumed only 2922 bytes instead of 15390048
....etc

has anyone got any idea whats going on? is it something wrong with the encoding or decoding?
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Mon Apr 09, 2007 8:07 pm    Post subject: Reply with quote

When was the last time you updated x264-svn? If not recently, I would recommend trying that to rule out a decoding issue (the svn-ebuild is the only one in Portage, and it's reasonably stable anyway, never had any issues with it).
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Tue Apr 10, 2007 11:42 am    Post subject: Reply with quote

updating to newest version didnt make a difference
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Tue Apr 10, 2007 11:53 am    Post subject: Reply with quote

And I can't encode with the newest version:

Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0xb95480]SwScaler: using unscaled yuv420p -> yuv420p special converter
x264 [error]: width or height not divisible by 2 (576x1)
x264_encoder_open failed.
FATAL: Cannot initialize video driver.
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Tue Apr 10, 2007 12:00 pm    Post subject: Reply with quote

TheCoop wrote:
And I can't encode with the newest version:


Do you have x264-svn and x264-svn-encoder installed? They separated the enconding/decoding libraries into two ebuilds.
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Tue Apr 10, 2007 2:28 pm    Post subject: Reply with quote

I'm using mencoder, which just has a dependancy on the .so library (which x264-svn provides...)
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Tue Apr 10, 2007 2:39 pm    Post subject: Reply with quote

TheCoop wrote:
I'm using mencoder, which just has a dependancy on the .so library (which x264-svn provides...)


Regardless of what it _says_ the dependencies are, have you tried installing x264-svn-encoder? Otherwise, I'm not sure how mencoder is going to encode something in a format that it doesn't have the encoder for...
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Tue Apr 10, 2007 2:50 pm    Post subject: Reply with quote

x264-svn-encoder has a program that does stand-alone programming. It links against the library in x264-svn that mencoder also links against, that both mencoder and x264 (program) use to encode stuff. I've had a look, and the x264 program takes raw input - since I'm encoding dvds, the size of the raw input would be prohibitively large...
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Tue Apr 10, 2007 4:30 pm    Post subject: Reply with quote

That's strange... I've been using transcode to encode DVDs into H264 with ffmpeg, but it doesn't work without x264-svn-encoder installed (complains about being unable to load a library). I thought that mplayer used ffmpeg where available? Or am I thinking of something else?

In any case, with reference to the original problem, it sounds like the original files weren't encoded correctly, if the latest x264-svn doesn't play them.
Back to top
View user's profile Send private message
meson_ray
n00b
n00b


Joined: 25 Oct 2006
Posts: 8

PostPosted: Thu May 31, 2007 3:49 pm    Post subject: Reply with quote

TheCoop wrote:
And I can't encode with the newest version:

Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0xb95480]SwScaler: using unscaled yuv420p -> yuv420p special converter
x264 [error]: width or height not divisible by 2 (576x1)
x264_encoder_open failed.
FATAL: Cannot initialize video driver.


I've got a similar problem with the newest version 20070325 (masked ~x86), which worked fine on the first DVD I tried encoding, but not the second one so far:

[swscaler @ 0x8600508]SwScaler: BICUBIC scaler, from yuv420p to yuv420p using MMX2
[swscaler @ 0x8600508]SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0x8600508]SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0x8600508]SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
[swscaler @ 0x8600508]SwScaler: 720x480 -> 752x320
x264 [error]: width or height not divisible by 2 (320x1)

I don't really know what to tell you about the other problem though, just to say that you're not alone in problems with the newer driver.
Back to top
View user's profile Send private message
fsteinel
n00b
n00b


Joined: 19 Jan 2006
Posts: 3
Location: Germany

PostPosted: Sat Jun 02, 2007 9:10 pm    Post subject: Reply with quote

Update to ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20070601-2245.tar.bz2 and remerge mplayer.
x264-svn-20070601.ebuild:
Code:
--- /usr/portage/media-libs/x264-svn/x264-svn-20070325.ebuild   2007-03-25 21:38:52.000000000 +0200
+++ /usr/portage/media-libs/x264-svn/x264-svn-20070601.ebuild   2007-06-02 23:05:31.000000000 +0200
@@ -8,7 +8,7 @@ IUSE="debug threads"
 
 DESCRIPTION="A free library for encoding X264/AVC streams."
 HOMEPAGE="http://developers.videolan.org/x264.html"
-SRC_URI="mirror://gentoo/${P}.tar.bz2"
+SRC_URI="mirror://gentoo/${P/svn/snapshot}-2245.tar.bz2"
 
 SLOT="0"
 LICENSE="GPL-2"
@@ -21,7 +21,7 @@ DEPEND="${RDEPEND}
        x86? ( dev-lang/nasm )
        x86-fbsd? ( dev-lang/nasm )"
 
-S="${WORKDIR}/${PN}"
+S="${WORKDIR}/${P/svn/snapshot}-2245"
 
 src_unpack() {
        unpack ${A}


x264-svn-encoder-20070601.ebuild:
Code:
--- /usr/portage/media-video/x264-svn-encoder/x264-svn-encoder-20070325.ebuild  2007-03-25 21:40:48.000000000 +0200
+++ /usr/portage/media-video/x264-svn-encoder/x264-svn-encoder-20070601.ebuild  2007-06-02 22:06:33.000000000 +0200
@@ -6,7 +6,8 @@ inherit multilib eutils toolchain-funcs
 
 IUSE="debug mp4 gtk threads"
 
-X264_SVN_P=${P/-encoder/}
+X264_SVN_P1=${P/-encoder/}
+X264_SVN_P=${X264_SVN_P1/svn/snapshot}-2245
 
 DESCRIPTION="A free library for encoding X264/AVC streams."
 HOMEPAGE="http://developers.videolan.org/x264.html"
@@ -18,20 +19,20 @@ KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~spa
 
 RDEPEND="mp4? ( >=media-video/gpac-0.4.1_pre20060122 )
        gtk? ( >=x11-libs/gtk+-2.6.10 >=dev-libs/glib-2.10.3 )
-       ~media-libs/${X264_SVN_P}"
+       ~media-libs/${X264_SVN_P1}"
 
 DEPEND="${RDEPEND}
        amd64? ( >=dev-lang/yasm-0.6.0 )
        x86? ( dev-lang/nasm )
        x86-fbsd? ( dev-lang/nasm )"
 
-S=${WORKDIR}/${PN/-encoder/}
+S=${WORKDIR}/${X264_SVN_P}
 
 src_unpack() {
        unpack ${A}
        cd "${S}"
        epatch "${FILESDIR}/${P}-nostrip.patch"
-       epatch "${FILESDIR}/${P}-nolib.patch"
+       epatch "${FILESDIR}/${PN}-20070325-nolib.patch"
 }
 
 src_compile() {

x264-svn-encoder-20070601-nostrip.patch
Code:
--- x264-snapshot-20070601-2245/configure.orig  2007-06-01 22:45:02.000000000 +0200
+++ x264-snapshot-20070601-2245/configure       2007-06-02 21:44:13.000000000 +0200
@@ -375,11 +375,6 @@ if [ "$pic" = "yes" ] ; then
     ASFLAGS="$ASFLAGS -D__PIC__"
 fi
 
-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
-    CFLAGS="$CFLAGS -s -fomit-frame-pointer"
-    LDFLAGS="$LDFLAGS -s"
-fi
-
 if [ "$debug" = "yes" ]; then
     CFLAGS="-O1 -g $CFLAGS"
 else
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum