Features Download
From: <guzman <at> zalem.net>
Subject: Segmentation fault
Newsgroups: gmane.comp.video.transcode.user
Date: Wednesday 18th January 2006 15:11:02 UTC (over 10 years ago)
hello there,
when I try to transcode video file, I get seg fault. i just try to
change the format of the video. In my example, I have a non-compressed
video coming from a minidv camera, and trying to transcode it to xvid
I've tried other output format like divx, mpeg, even raw video, with or
without sound, never works.
I always get both tcdecode an transcode seg fault.

I'm using transcode 1.0.2, build by ports on a FreeBSD 6.0.
barjack:~$ uname -a
FreeBSD barjack.zalem.net 6.0-RELEASE FreeBSD 6.0-RELEASE #8: Sun Jan 15
10:49:19 CET 2006 [email protected]:/home/src/sys/i386/compile/Barjack
barjack:~$ transcode -v
transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

My computer is a laptop, here is a part of dmesg :
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2390.30-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf24  Stepping = 4
real memory  = 534708224 (509 MB)

Here is output from transcode through gdb :
barjack:~/pub/avi$ gdb transcode
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols
(gdb) run -i incident.avi -o incident.new.avi -y xvid4,lame -q2
Starting program: /usr/local/bin/transcode -i incident.avi -o
incident.new.avi -y xvid4,lame -q2
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...warning: Unable to get location for thread creation
breakpoint: generic error
[New LWP 100109]
(no debugging symbols found)...(no debugging symbols found)...transcode
v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
libdvdread: Using libdvdcss version 1.2.8 for DVD access
libdvdread: Can't open file VIDEO_TS.IFO.
[tcprobe] RIFF data, AVI video
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
(probe.c) V magic=0x17, A magic=0x17, V codec=0x1000, A codec=0x1
(probe.c) V magic=RIFF data, AVI, A magic=RIFF data, AVI, V
codec=Digital Video, A codec=PCM
[transcode] auto-probing source incident.avi (ok)
[transcode] V: import format    | Digital Video RIFF data, AVI
[transcode] V: import frame     | 720x576  1.25:1  
[transcode] V: bits/pixel       | 0.174
[transcode] V: decoding fps,frc | 25.000,3
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x1     PCM          [32000,16,2] 1024
[transcode] A: export format    | 0x55    MPEG layer-3 [32000,16,2]  128
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 5120 (5120.000000)
[transcode] A: adjustment       | [email protected]
[transcode] V: IA32/AMD64 accel | sse2 (sse2 sse mmxext mmx asm C)
tc_memcpy: using sse for memcpy
[transcode] encoder delay = decode=40000 encode=40000 usec
[transcode] V: video buffer     | 10 @ 720x576
[transcode] allocating 10 framebuffer (static)
loading audio import module /usr/local/lib/transcode/import_avi.so
[New Thread 0x80a5000 (LWP 100132)]
loading video import module /usr/local/lib/transcode/import_dv.so
[import_avi.so] v0.4.2 (2002-05-24) (video) * | (audio) *
Audio capability flag 0x233 | 0x1
[import_dv.so] v0.3.1 (2003-10-14) (video) DV | (audio) PCM
Video capability flag 0x32b | 0x2
loading audio export module /usr/local/lib/transcode/export_lame.so
loading video export module /usr/local/lib/transcode/export_xvid4.so
[export_lame.so] v0.0.3 (2003-03-06) (audio) MPEG 1/2
(encoder.c) audio capability flag 0x1 | 0x1
[export_xvid4.so] v0.0.5 (2003-12-05) (video) XviD 1.0.x series (aka API
4.0) | (audio) MPEG/AC3/PCM
(encoder.c) video capability flag 0x21f | 0x2
[transcode] starting 1 frame processing thread(s)
[transcode] starting 1 frame processing thread(s)
[import_avi.so] format=0x1, rate=32000 Hz, bits=16, channels=2,
[import_dv.so] tcextract -x dv -i "incident.avi" -d 3 | tcdecode -x dv
-y yv12 -d 3 -Q 5
[export_xvid4.so] Trying to load shared lib
tc_memcpy: using sse for memcpy
[tcextract] (pid=2234) RIFF data, AVI video
[tcextract] (pid=2234) starting, doing dv
[export_xvid4.so] Loaded /usr/local/lib/transcode/libxvidcore.so.4
[export_xvid4.so] Neither './xvid4.cfg' nor '~/.transcode/xvid4.cfg'
[export_xvid4.so] found. Default settings will be used instead.
[export_xvid4.so] Feature settings
[export_xvid4.so] ----------------------------------------
[export_xvid4.so] quant_type = h263
[export_xvid4.so] motion = 6
[export_xvid4.so] chromame = 1
[export_xvid4.so] vhq = 1
[export_xvid4.so] max_bframes = 1
[export_xvid4.so] bquant_ratio = 150
[export_xvid4.so] bquant_offset = 100
[export_xvid4.so] bframe_threshold = 0
[export_xvid4.so] quarterpel = 0
[export_xvid4.so] gmc = 0
[export_xvid4.so] trellis = 0
[export_xvid4.so] packed = 0
[export_xvid4.so] closed_gop = 1
[export_xvid4.so] interlaced = 0
[export_xvid4.so] cartoon = 0
[export_xvid4.so] hqacpred = 1
[export_xvid4.so] frame_drop_ratio = 0
[export_xvid4.so] stats = 0
[export_xvid4.so] greyscale = 0
[export_xvid4.so] turbo = 0
[export_xvid4.so] Quantizer settings
[export_xvid4.so] ----------------------------------------
[export_xvid4.so] min_iquant = 0
[export_xvid4.so] max_iquant = 0
(decode_dv.c) header parsing failed (1)
[export_xvid4.so] min_pquant = 0
[export_xvid4.so] max_pquant = 0
[export_xvid4.so] min_bquant = 0
(decode_dv.c) PAL video: 720x576 framesize=144000 sampling=2
[export_xvid4.so] max_bquant = 0
[export_xvid4.so] #quant_intra_matrix = 
[export_xvid4.so] #quant_inter_matrix = 
[export_xvid4.so] CBR settings
[export_xvid4.so] ----------------------------------------
[export_xvid4.so] reaction_delay_factor = 0
[export_xvid4.so] averaging_period = 0
[export_xvid4.so] buffer = 0
[export_xvid4.so] VBR settings
[export_xvid4.so] ----------------------------------------
[export_xvid4.so] keyframe_boost = 0
[export_xvid4.so] curve_compression_high = 0
[export_xvid4.so] curve_compression_low = 0
[export_xvid4.so] overflow_control_strength = 0
[export_xvid4.so] max_overflow_improvement = 0
[export_xvid4.so] max_overflow_degradation = 0
[export_xvid4.so] kfreduction = 0
[export_xvid4.so] kfthreshold = 0
[export_xvid4.so] container_frame_overhead = 0
(decoder.c) audio thread id=134896128
(decoder.c) video thread id=134896640
[export_xvid4.so] Using AVI output
[export_lame.so] cmd=lame -x --cbr -b 128 -s 32.000 -m j -
"incident.new.avi.mp3" 2>/dev/null 
(dl_loader.c) video import module error
(decoder.c) video data read failed - end of stream
(encoder.c) import closed - buffer empty (V)
(encoder.c) encoder closed
(decoder.c) import stop requested by client=134893568 (main=134893568)
import status=0
(decoder.c) video thread already terminated
(decoder.c) A/V import canceled (134893568) (134893568)
(decoder.c) video thread exit (ret_code=0) (status_code=13)
(decoder.c) audio thread exit (ret_code=0) (status_code=1)
(decoder.c) vframe_list_lock=0
(decoder.c) aframe_list_lock=0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x80a5000 (LWP 100131)]
0x0807978c in AVI_close ()
(gdb) where
#0  0x0807978c in AVI_close ()
#1  0x283c42de in tc_import (opt=-791621424, para1=0xbfbfddb0,
para2=0x0) at import_avi.c:296
#2  0x0805d9d8 in tca_import ()
#3  0x0805b3b7 in import_close ()
#4  0x080595ed in main ()
(gdb) bt full
#0  0x0807978c in AVI_close ()
No symbol table info available.
#1  0x283c42de in tc_import (opt=-791621424, para1=0xbfbfddb0,
para2=0x0) at import_avi.c:296
        i = 0
        mod = 0
#2  0x0805d9d8 in tca_import ()
No symbol table info available.
#3  0x0805b3b7 in import_close ()
No symbol table info available.
#4  0x080595ed in main ()
No symbol table info available.
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x807976c to 0x80797ac:
0x0807976c :    in     $0x2,%al
0x0807976e :    add    %al,(%eax)
0x08079770 :    incl   0xfffff774(%ebp)
0x08079776 :    cmpl   $0x1f,0xfffff774(%ebp)
0x0807977d :    jg     0x807acc1 
0x08079783 :    mov    0x24(%edx),%eax
0x08079786 :    mov    0xfffff774(%ebp),%edi
0x0807978c :    mov    (%eax,%edi,4),%eax
0x0807978f :    test   %eax,%eax
0x08079791 :    je     0x8079770 
0x08079793 :    mov    0x20(%eax),%eax
0x08079796 :    test   %eax,%eax
0x08079798 :    je     0x8079750 
0x0807979a :    sub    $0xc,%esp
0x0807979d :    push   %eax
0x0807979e :    call   0x8050080 
0x080797a3 :    mov    0x8(%ebp),%eax
0x080797a6 :    add    $0x10,%esp
0x080797a9 :    mov    0x2e4(%eax),%edx
End of assembler dump.

Please ask if I've forget anything.
thanks for help.

CD: 26ms