This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[libx264][Ubuntu] Another rendering problem ? (stale)

Tags: None
(comma "," separated)
mrdocin
Registered Member
Posts
21
Karma
0
OS
Hello,

I am currently having problems while rendering videos with kdeenlive.
I create a new topic because, it is very strange.

I'm working with two different workstations. As you will see, they differ only by their respective hardware.

1/First WS
Code: Select all
Linux olive 3.13.0-30-generic #52-Ubuntu SMP Wed May 28 12:42:31 UTC 2014 i686 i686 i686 GNU/Linux
Intel(R) Celeron(R) CPU        E3400  @ 2.60GHz (2 cores)


2/Second WS
Code: Select all
Linux tom 3.13.0-30-generic #52-Ubuntu SMP Wed May 28 12:42:31 UTC 2014 i686 i686 i686 GNU/Linux
Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz  (4 cores)


On both of them, here are the versions of the differents packages required:

Code: Select all
frei0r-plugins : 1.4.0+git20140516.fc841214-0ubuntu0~sunab~trusty1
kdenlive : 0.9.8-1ubuntu1~sunab~trusty4
kdenlive-data : 0.9.8-1ubuntu1~sunab~trusty4
libaacs0:i386 : 0.7.0-1
libav-tools : 6:9.13-0ubuntu0.14.04.1
libfaac0:i386 : 1.28-6
libmlt++3 : 0.9.0-3
libmlt6 : 0.9.0-3
libmlt-data : 0.9.0-3
libvo-aacenc0:i386 : 0.1.3-1
libx264-142:i386 : 2:0.142.2389+git956c8d8-2
melt : 0.9.0-3


The video clips used are all from my Sony HDR-AS-100 and are all like this:
Code: Select all
Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9]
Audio: aac, 48000 Hz

They are all playable with any video player. I can run avprobe without error on any of them.

The kdenlive project file is the same on both WS

My problem : on the first workstation, I can render (MPEG-A/AAC, 1 pass) a short 5 min video without any problem (multitracks, speed/sound effects, and usage of two audio tracks)
On the second workstation, the rendering always hangs at the same moment (around 26%).

So i decide to run the corresponding rendering script directly from a shell (I also add the -debug flag to melt) ...and the rendering still crashes.
Just before the script beeing in stuck I notice many repeating errors like:
Code: Select all
[h264 @ 0x41d93b60] Frame num gap 6 3
[h264 @ 0x41d93b60] get_buffer() failed (-1 1 (nil))
[h264 @ 0x41d93b60] decode_slice_header error
[h264 @ 0x41d93b60] no frame!

or
Code: Select all
[filter deinterlace] error 0 deint 1 prog 1 fmt yuv422 method yadif


Then I tried to run it under gdb, to see what's really happens....nothing more than the melt -debug shows

I also tried to get/compile mlt from it's git repo...nothing has changed

Any idea ?

Thank you so much

Last edited by mrdocin on Wed Jun 11, 2014 9:00 pm, edited 2 times in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please try running the render command under a new user to ensure it is not configuration files causing this behaviour (by changing how it reads the source files). Also, please verify that the source files being used are the same - one machine may have a corrupted/damaged file.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mrdocin
Registered Member
Posts
21
Karma
0
OS
Hello bcooksley,
Can you please try running the render command under a new user to ensure it is not configuration files causing this behaviour (by changing how it reads the source files).

--> no changes

Also, please verify that the source files being used are the same - one machine may have a corrupted/damaged file.

--> I just compare the md5sum of each file on each WS : no diff
I also ran avprobe on each file/each side : no diff too
mrdocin
Registered Member
Posts
21
Karma
0
OS
hi guys,
i'm still in stuck
I've notice today, that on both servers, the output of ldd /usr/bin/kdenlive is not the same.
ldd dos not indicate that there is missing libraries, but on the server where rendering is successfull, kdenlive use 11 more librairies:

Code: Select all
   libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb48f6000)
   libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb48f2000)
   libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb48ee000)
   libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb48d6000)
   libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xb48d0000)
   libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xb48cc000)
   libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xb48c8000)
   libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xb48c0000)
   libxshmfence.so.1 => /usr/lib/i386-linux-gnu/libxshmfence.so.1 (0xb48bd000)
   libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb48b7000)
   libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb48aa000)


is it normal ?
mrdocin
Registered Member
Posts
21
Karma
0
OS
After different tests, my pb seems to be libx264 specific

It occurs only when i choose the MP4 predefined profile H.264/AAC
content of this profile :
Code: Select all
acodec=aac ar=48000 ab=%audiobitrate+'k' vcodec=libx264 vb=%bitrate+'k' aspect=%dar pass=%passes


used command line :
Code: Select all
/usr/bin/melt /home/nico/kdenlive/scripts/NYv5.mlt -profile atsc_1080p_2997 -consumer avformat:/home/nico/kdenlive/NY3.mp4 progress=1 acodec=aac ar=48000 ab=192k vcodec=libx264 vb=12000k aspect=@16/9 threads=2 real_time=-1


When choosing MPEG-4/MP3 Profile, the rendering completes successfuly
Then, the command line is:
Code: Select all
/usr/bin/melt /home/nico/kdenlive/scripts/NYv5.mlt -profile atsc_1080p_2997 -consumer avformat:/home/nico/kdenlive/NY3.mp4 progress=1 properties=MPEG-4-ASP ab=128k vb=12000k aspect=@16/9 threads=2 real_time=-1
mrdocin
Registered Member
Posts
21
Karma
0
OS
examining generated core files witch gdb gave me:
backtrace:
Code: Select all
#0  __memcpy_ssse3_rep () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S:181
#1  0xb5bcbd06 in avcodec_decode_audio3 () from /usr/lib/i386-linux-gnu/i686/cmov/libavcodec.so.54
#2  0xb6f37f9b in decode_audio (fps=29,970029970029969, timecode=<optimized out>, samples=1602, channels=2, pkt=..., ignore=0xae608be4, self=0x40d1c60) at producer_avformat.c:2077
#3  producer_get_audio (frame=frame@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608d1c,
    samples=samples@entry=0xae608fb8) at producer_avformat.c:2318
#4  0xb77109d9 in mlt_frame_get_audio (self=self@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608d1c,
    samples=samples@entry=0xae608fb8) at mlt_frame.c:711
#5  0xb43e4ff6 in filter_get_audio (frame=frame@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at filter_audiochannels.c:33
#6  0xb77109d9 in mlt_frame_get_audio (self=self@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at mlt_frame.c:711
#7  0xb652ad93 in resample_get_audio (frame=frame@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at filter_resample.c:54
#8  0xb77109d9 in mlt_frame_get_audio (self=self@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at mlt_frame.c:711
#9  0xb6526d84 in filter_get_audio (frame=frame@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at filter_volume.c:192
#10 0xb77109d9 in mlt_frame_get_audio (self=self@entry=0x6bbea530, buffer=buffer@entry=0xae608fa0, format=format@entry=0xae609320, frequency=frequency@entry=0xae608fa8, channels=channels@entry=0xae608fb0,
    samples=samples@entry=0xae608fb8) at mlt_frame.c:711
#11 0xb43f3cb7 in combine_audio (samples=0xae6090cc, channels=0xae6090c4, frequency=0xae6090bc, format=0xae609320, buffer=0xae6090b4, that=0x6bbea530, this=0xadbc1370) at transition_mix.c:114
#12 transition_get_audio (frame=frame@entry=0xadbc1370, buffer=buffer@entry=0xae6090b4, format=format@entry=0xae609320, frequency=frequency@entry=0xae6090bc, channels=channels@entry=0xae6090c4,
    samples=samples@entry=0xae6090cc) at transition_mix.c:197
#13 0xb77109d9 in mlt_frame_get_audio (self=self@entry=0xadbc1370, buffer=buffer@entry=0xae6090b4, format=format@entry=0xae609320, frequency=frequency@entry=0xae6090bc, channels=channels@entry=0xae6090c4,
    samples=samples@entry=0xae6090cc) at mlt_frame.c:711
#14 0xb43f3ce9 in combine_audio (samples=0xae60932c, channels=0xae609324, frequency=0xae609328, format=0xae609320, buffer=0xae609330, that=0x392ede10, this=0xadbc1370) at transition_mix.c:115
#15 transition_get_audio (frame=frame@entry=0xadbc1370, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at transition_mix.c:197
#16 0xb77109d9 in mlt_frame_get_audio (self=0xadbc1370, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at mlt_frame.c:711
#17 0xb7727f0e in producer_get_audio (self=self@entry=0x25dce1f0, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at mlt_tractor.c:296
#18 0xb77109d9 in mlt_frame_get_audio (self=0x25dce1f0, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at mlt_frame.c:711
#19 0xb7727f0e in producer_get_audio (self=self@entry=0xadba0130, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at mlt_tractor.c:296
#20 0xb77109d9 in mlt_frame_get_audio (self=self@entry=0xadba0130, buffer=buffer@entry=0xae609330, format=format@entry=0xae609320, frequency=frequency@entry=0xae609328, channels=channels@entry=0xae609324,
    samples=samples@entry=0xae60932c) at mlt_frame.c:711
#21 0xb7724dc9 in consumer_read_ahead_thread (arg=0xb929a958) at mlt_consumer.c:861
#22 0xb76f3f70 in start_thread (arg=0xae609b40) at pthread_create.c:312
#23 0xb762970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hmm. As threads are probably involved could you try generating a backtrace for all threads?
See https://wiki.debian.org/HowToGetABacktrace for more information on this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mrdocin
Registered Member
Posts
21
Karma
0
OS
Hi bcooksley,

bcooksley wrote:Hmm. As threads are probably involved could you try generating a backtrace for all threads?
See https://wiki.debian.org/HowToGetABacktrace for more information on this.


I pass the "thread apply all bt full" command to gdb and got many lines of debug. Where can I put them, to make them viewable here ?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You can use the pastebin at paste.kde.org.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mrdocin
Registered Member
Posts
21
Karma
0
OS
bcooksley wrote:You can use the pastebin at paste.kde.org.

ok.


here it is : http://paste.kde.org/pnf0hrzxp/iv74gn
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hmm, unfortunately that is truncated before it reaches the necessary point in the trace. However it did reveal:
Code: Select all
warning: .dynamic section for "/usr/lib/i386-linux-gnu/i686/cmov/libavcodec.so.54" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib/i386-linux-gnu/libjack.so.0" is not at the expected address (wrong library or version mismatch?)

Can you please ensure Kdenlive, MLT, Jack, libx264 and ffmpeg/avconv are all installed from the same repository (or from repositories that are compatible with each other)? Based on the above, it seems unlikely that is the case - something is built against a different version of Jack and ffmpeg/avconv at least.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mrdocin
Registered Member
Posts
21
Karma
0
OS
hello,
Indeed, there was a mismatch for libx264.
now it' is still crashing, but for other reasons (I suppose)
Here is details of my latest core file
http://paste.kde.org/pp3pgknvq/7n9cxz
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Yep, that is a different crash - this time within MLT. You'll need to report a bug in their bug tracker concerning that i'm afraid.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft