Transcode can't rip DVD's (in K3b with file type MPEG4)

Bug #1099201 reported by jeroenl
106
This bug affects 23 people
Affects Status Importance Assigned to Milestone
transcode (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In k3b you can rip DVD's. There are two filetypes you can use: MPEG4 (FFMPEG) and XviD. The latter one works, the first NOT.

1) The first error it receives is this:

*** glibc detected *** /usr/bin/transcode: munmap_chunk(): invalid pointer: 0x00007fb245badc25 ***

> See also backtrace 1 below

2) After advice from https://bugs.archlinux.org/task/26208 I created ~/.ffmpeg/medium.ffpreset with one dummy line starting with #.

The video is starting to encode, but there is another error:

*** glibc detected *** /usr/bin/transcode: free(): invalid pointer: 0x00007f5e1e16879a ***

> See also backtrace 2 below

3) When I try to start (on the command line) one of the transcode commands I've found at the end of the log file:

/usr/bin/transcode --nice 19 --log_no_color --progress_meter 2 --progress_rate 272 -i /dev/sr0 -x dvd -T 1,-1,1 -a 0 -j 0,0,0,0 -R 1,/tmp/kde-jeroen/k3b_0.log -y ffmpeg,null -o /dev/null -F mpeg4 -w 1200 -Z 768x576

... it started to encode, but I receives this:

"Segmentatiefout (geheugendump gemaakt)" < Dutch for Segmentation fault (memory/core dumped)

Backtrace 1)

[export_ffmpeg.so] Using FFMPEG codec 'mpeg4' (FourCC 'DIVX', MPEG4 compliant video).
[export_ffmpeg.so] No profile selected
[export_ffmpeg.so] Error opening configuration file ./ffmpeg.cfg: No such file or directory
[export_ffmpeg.so] Starting 1 thread(s)
[export_ffmpeg.so] Set display aspect ratio to input
[export_ffmpeg.so] Parsing ffmpeg preset 'medium'
File for preset 'medium' not found
*** glibc detected *** /usr/bin/transcode: munmap_chunk(): invalid pointer: 0x00007fb245badc25 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fb2582b6b96]
/usr/lib/transcode/export_ffmpeg.so(+0x60ec)[0x7fb245ba80ec]
/usr/lib/transcode/export_ffmpeg.so(+0x85f4)[0x7fb245baa5f4]
/usr/lib/transcode/export_ffmpeg.so(tc_export+0x423)[0x7fb245bab4c3]
/usr/bin/transcode(tcv_export+0x32)[0x412c72]
/usr/bin/transcode(tc_encoder_init+0xbc)[0x413a6c]
/usr/bin/transcode(main+0x296a)[0x40abca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fb25825976d]
/usr/bin/transcode[0x40ce65]

Backtrace 2)

encoding=1 frame=41144 first=0 last=-1 fps=145.989 done=-1.000000 timestamp=1645.760 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
encoding=1 frame=41422 first=0 last=-1 fps=145.924 done=-1.000000 timestamp=1656.880 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
encoding=1 frame=41700 first=0 last=-1 fps=145.965 done=-1.000000 timestamp=1668.000 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
*** glibc detected *** /usr/bin/transcode: free(): invalid pointer: 0x00007f5e1e16879a ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f5e3086fb96]
/usr/lib/x86_64-linux-gnu/libavutil.so.51(av_freep+0xc)[0x7f5e1ce369ec]
/usr/lib/x86_64-linux-gnu/libavutil.so.51(av_opt_free+0x3c)[0x7f5e1ce3706c]
/usr/lib/x86_64-linux-gnu/libavcodec.so.53(avcodec_close+0xf3)[0x7f5e1d32f328]
/usr/lib/transcode/export_ffmpeg.so(tc_export+0x65a)[0x7f5e1e1646fa]
/usr/bin/transcode(tcv_export+0x32)[0x412c72]
/usr/bin/transcode(tc_encoder_stop+0x9b)[0x413f8b]
/usr/bin/transcode(main+0x39af)[0x40bc0f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f5e3081276d]
/usr/bin/transcode[0x40ce65]

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in k3b (Ubuntu):
status: New → Confirmed
Revision history for this message
Twisted Lucidity (lucidlytwisted) wrote :

I'll concur with this. Whether or not the problem is in transcode or ffmpeg is a good question; but wherever it is, it renders k3b inoperative.

Attached is my log after creating "~/.ffmpeg/medium.ffpreset". I think this happens on the second pass.

The details in the ArchLinux bug about MALLOC_CHECK_ seemed like it was going to work, but then is crashed out again. I'll post a send log file.

Revision history for this message
Twisted Lucidity (lucidlytwisted) wrote :

This is the log after setting export MALLOC_CHECK_=0
It failed at 99%

Revision history for this message
Andrey (iloveeclipse) wrote :

This bug affects me too, 64 bit Kubuntu 14.04.
I found relatives:
Bug reported in debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697558
which points to the bug at transcode, where a patch is proposed:
https://bitbucket.org/france/transcode-tcforge/issue/4/segfault-at-end-of-pass-1-ffmpeg-mpeg4

Anybody here capable of verifying if this fixes the issue?

Revision history for this message
derek kelly (isopropanol) wrote :

It still has this bug.

I worked around it by using k3b to Copy Disc to the hard drive as an iso.
Then mounted the iso and used HardBrake to rip the contents.

Log info, in case it helps:

System
-----------------------
K3b Version: 2.0.2
KDE Version: 4.13.2
QT Version: 4.8.6
Kernel: 3.13.0-30-generic

Used versions
-----------------------
transcode: 1.1.7

transcode
-----------------------
transcode v1.1.7 (C) 2001-2003 Thomas Oestreich, 2003-2010 Transcode Team
[dvd_reader.c] DVD title 1/8: 8 chapter(s), 1 angle(s), title set 2
[dvd_reader.c] title playback time: 00:44:01.11 2642 sec
[dvd_reader.c] DVD title 1/8: 8 chapter(s), 1 angle(s), title set 2
[dvd_reader.c] title playback time: 00:44:01.11 2642 sec
[transcode] V: auto-probing | /dev/sr0 (OK)
...
[decode_mpeg2.c] libmpeg2 acceleration: mmxext
[export_ffmpeg.so] Using FFMPEG codec 'mpeg4' (FourCC 'DIVX', MPEG4 compliant video).
[export_ffmpeg.so] No profile selected
[export_ffmpeg.so] Error opening configuration file ./ffmpeg.cfg: No such file or directory
[export_ffmpeg.so] Starting 1 thread(s)
[export_ffmpeg.so] Set display aspect ratio to input
libdvdread: Attempting to retrieve all CSS keys
...
encoding=1 frame=62186 first=0 last=-1 fps=78.197 done=-1.000000 timestamp=2593.674 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
encoding=1 frame=62713 first=0 last=-1 fps=78.354 done=-1.000000 timestamp=2615.655 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
[dvd_reader.c] warning: Can't read pid from lock file /tmp/LCK..dvd
encoding=1 frame=63240 first=0 last=-1 fps=78.567 done=-1.000000 timestamp=2637.635 timeleft=-1 decodebuf=0 filterbuf=9 encodebuf=11
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007f1d35162e7a ***

I was ripping multiple videos, so I noticed that the address changes slightly each time.

...
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007fc249971e7a ***
...
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007f4871affe7a ***
...
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007fd9e72d2e7a ***
...
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007f2dd0340e7a ***
...
*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007fd5f2472e7a ***
...
transcode command:
-----------------------
/usr/bin/transcode --nice 19 --log_no_color --progress_meter 2 --progress_rate 527 -i /dev/sr0 -x dvd -T 1,-1,1 -a 0 -j 0,0,0,0 -R 1,/tmp/kde-username/k3b_0.log -y ffmpeg,null -o /dev/null -F mpeg4 -w 1200 -Z 640x480
/usr/bin/transcode --nice 19 --log_no_color --progress_meter 2 --progress_rate 231 -i /dev/sr0 -x dvd -T 2,-1,1 -a 0 -j 0,0,0,0 -R 1,/tmp/kde-username/k3b_0.log -y ffmpeg,null -o /dev/null -F mpeg4 -w 1200 -Z 640x480
...

Revision history for this message
Tiago Peralta (tperalta82) wrote :

Tested the patch, works for me

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debian-bug-697558-" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Sam Rog (samrog131) wrote :

The k3b is using the transcode - changing this as a transcode target

affects: k3b (Ubuntu) → transcode (Ubuntu)
Revision history for this message
Sam Rog (samrog131) wrote :
Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

I rebuilt k3b (https://bugs.launchpad.net/ubuntu/+source/k3b/+bug/1686089) and transcode with this patch for Ubuntu 17.04, and that resolved those particular problems.
The k3b bug is a very new one, however this one is from 2014 so I'm wondering that patch hasn't made it into packages yet.

Revision history for this message
Scott Deagan (scott-deagan) wrote :

Are there instructions anywhere on how to use/install the patch attached to post #6?

Revision history for this message
ALU (c-launchpadmail) wrote :

Got this same error with Ubuntu 17.10 and k3b.

The k3b debug window shows

----------
/usr/bin/transcode --log_no_color --progress_meter 2 --progress_rate 551 -i /dev/sr0 -x dvd -T 1,-1,1 -a 0 -j 0,0,0,0 -R 0,/tmp/k3b_0.log -y ffmpeg -N 0x2000 -A -o /tmp/foobar.avi -F mpeg4 -Z 848x480

...

*** Error in `/usr/bin/transcode': munmap_chunk(): invalid pointer: 0x00007efd97e43f3a ***
Aborted (core dumped)
------------------

However: If I run that same command in bash it creates an ok file. It appears that this error message from transcode causes k3b to delete the file even though it appears the file was created ok by transcode.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.