Linux CLI - Segmentation fault (using -a -E ac3 -S)

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
faluby

Linux CLI - Segmentation fault (using -a -E ac3 -S)

Post by faluby »

HandBrakeCLI crashes with Segmentation fault if these 3 options are used at the same time:

Code: Select all

-a <string> 
-E ac3
-S <MB>
If I use only two of them (in any combination) it works, independent from which other options are used.

With lame, vorbis or faac instead of ac3 as audio encoder it works with all 3 options!

OS = Arch Linux
HandBrake Version = 0.7.1 compiled from source

Same with MediaFork-0.8.0b1 (Linux binary, downloaded today)

No error messages, just Segmentation fault.
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

Could you post an example command line that is giving you the segfault, and also the output with the -v option enabled? Also, what architecture, i686 or x86_64?
faluby

Post by faluby »

ok,
arch is i686.

example command line:

Code: Select all

 handbrake -v -t 1 -a 81bd -E ac3 -S 700 -2 -w 640 -i /dev/hdc -o test.avi
the verbose output:

Code: Select all

[08:52:00] hb_init: checking cpu count
[08:52:00] hb_init: starting libhb thread
[08:52:00] thread -1222874224 started ("libhb")
HandBrake 0.7.1 (2006022400) - http://handbrake.m0k.org/
1 CPU detected
Opening /dev/hdc...
[08:52:00] hb_scan: path=/dev/hdc, title_index=1
[08:52:00] thread -1231266928 started ("scan")
[08:52:00] scan: trying to open with libdvdread
[08:52:00] scan: DVD has 4 title(s)
[08:52:00] scan: scanning title 1
[08:52:00] scan: opening IFO for VTS 1
[08:52:01] scan: vts=1, ttn=1, cells=0->7, blocks=0->813718, 813719 blocks
[08:52:01] scan: duration is 00:42:26 (2546280 ms)
[08:52:01] scan: checking audio 1
[08:52:01] scan: id=80bd, lang=English (AC3)
[08:52:01] scan: checking audio 2
[08:52:01] scan: id=81bd, lang=Deutsch (AC3)
[08:52:01] scan: checking audio 3
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking audio 4
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking audio 5
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking audio 6
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking audio 7
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking audio 8
[08:52:01] scan: audio channel is not active
[08:52:01] scan: checking subtitle 1
[08:52:01] scan: id=20bd, lang=English
[08:52:01] scan: checking subtitle 2
[08:52:01] scan: id=21bd, lang=Deutsch
[08:52:01] scan: checking subtitle 3
[08:52:01] scan: id=22bd, lang=Nederlands
[08:52:01] scan: checking subtitle 4
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 5
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 6
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 7
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 8
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 9
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 10
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 11
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 12
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 13
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 14
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 15
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 16
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 17
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 18
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 19
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 20
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 21
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 22
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 23
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 24
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 25
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 26
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 27
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 28
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 29
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 30
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 31
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: checking subtitle 32
[08:52:01] scan: subtitle channel is not active
[08:52:01] scan: title 1 has 8 chapters
[08:52:01] scan: chap 1 c=0->0, b=0->88396 (88397), 273381 ms
[08:52:01] scan: chap 2 c=1->1, b=88397->215220 (126824), 398386 ms
[08:52:01] scan: chap 3 c=2->2, b=215221->340382 (125162), 381710 ms
[08:52:01] scan: chap 4 c=3->3, b=340383->514394 (174012), 547863 ms
[08:52:01] scan: chap 5 c=4->4, b=514395->571439 (57045), 174490 ms
[08:52:01] scan: chap 6 c=5->5, b=571440->683283 (111844), 323467 ms
[08:52:01] scan: chap 7 c=6->6, b=683284->749214 (65931), 221453 ms
[08:52:01] scan: chap 8 c=7->7, b=749215->813718 (64504), 225527 ms
[08:52:01] scan: aspect = 16
[08:52:01] scan: decoding previews for title 1
[08:52:01] scan: preview 1
Scanning title 1...

*** libdvdread: CHECK_VALUE failed in nav_read.c:207 ***
*** for dsi->dsi_gi.zero1 == 0 ***


*** libdvdread: CHECK_VALUE failed in nav_read.c:207 ***
*** for dsi->dsi_gi.zero1 == 0 ***
then lots of

*** libdvdread: CHECK_VALUE failed in nav_read.c:207 ***
*** for dsi->dsi_gi.zero1 == 0 ***


and then

Code: Select all

*** libdvdread: CHECK_VALUE failed in nav_read.c:207 ***
*** for dsi->dsi_gi.zero1 == 0 ***

[08:59:20] scan: 720x576, 25.000 fps, autocrop = 0/0/0/0
[08:59:20] thread -1230877808 exited ("scan")
[08:59:20] thread -1230877808 joined ("scan")
[08:59:20] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 1, ttn 1, cells 0->7 (813719 blocks)
  + duration: 00:42:26
  + size: 720x576, aspect: 1.78, 25.000 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 88397 blocks, duration 00:04:33
    + 2: cells 1->1, 126824 blocks, duration 00:06:38
    + 3: cells 2->2, 125162 blocks, duration 00:06:22
    + 4: cells 3->3, 174012 blocks, duration 00:09:08
    + 5: cells 4->4, 57045 blocks, duration 00:02:54
    + 6: cells 5->5, 111844 blocks, duration 00:05:23
    + 7: cells 6->6, 65931 blocks, duration 00:03:41
    + 8: cells 7->7, 64504 blocks, duration 00:03:46
  + audio tracks:
    + 80bd, English (AC3) (3 ch), 48000Hz, 320000bps
    + 81bd, Deutsch (AC3) (2 ch), 48000Hz, 192000bps
  + subtitle tracks:
    + 20bd, English
    + 21bd, Deutsch
    + 22bd, Nederlands
Segmentation fault
I used the PKGBUILD from Arch's AUR and makepkg to build it.

more examples:

these are working (working means the encoding is starting, I don't checked the results; cause I aborted if encoding started):
handbrake -t 1 -a 81bd -E ac3 -i /dev/hdc -o test.avi
handbrake -t 1 -a 81bd -S 700 -i /dev/hdc -o test.avi
handbrake -t 1 -E ac3 -S 700 -i /dev/hdc -o test.avi
handbrake -t 1 -a 81bd -E lame -S 700 -i /dev/hdc -o test.avi

and this not:
handbrake -t 1 -a 81bd -E ac3 -S 700 -i /dev/hdc -o test.avi


I just noticed an other Problem. I encoded a video with:

Code: Select all

nice -n 19 handbrake -i /dev/hdc -t 1 -e ffmpeg -a 81bd -E ac3 -2 -q 0.5 -b 3400 -w 640 -f avi -o S02-D2-1.avi
but the final file is without audio, and only at 200kbps
This is from MPlayer output playing the file:

Code: Select all

Playing S02-D2-1.avi.
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
AVI: No audio stream found -> no sound.
VIDEO:  [DX50]  640x368  24bpp  25.000 fps  200.3 kbps (24.4 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

Ok, the problem seems to be the audio id. These are actually numbered starting at 1. This has been changed in the subversion source, so that it actually prints that instead of the audio id from the DVD, but for now just use

Code: Select all

handbrake -v -t 1 -a 2 -E ac3 -S 700 -2 -w 640 -i /dev/hdc -o test.avi
for your example.

This may not be the whole problem, but that's probably what is causing the segfaults. Although, I'm not entirely sure why it's only showing up with ac3. Let me know if that fixes it, or not.
faluby

Post by faluby »

Yes, using -a 2 instead of -a 81bd the encoding starts.

Will this also be fixed if I use -a 2 ?
I just noticed an other Problem. I encoded a video with:

Code: Select all

nice -n 19 handbrake -i /dev/hdc -t 1 -e ffmpeg -a 81bd -E ac3 -2 -q 0.5 -b 3400 -w 640 -f avi -o S02-D2-1.avi
but the final file is without audio, and only at 200kbps
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

Yes, it will fix the audio problem. The bitrate, however seems to be caused by using -q 0.5 you're specifying both a quality and a bitrate, and that's why you get such a low bitrate. You should only use one or the other.
faluby

Post by faluby »

ah, ok.
Thanks!
faluby

Post by faluby »

Just one more question:

Can I set quality AND target size?
Or should I use only one of these three:

Code: Select all

quality
bitrate
target size 
?
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

faluby wrote:Can I set quality AND target size?
?
No. Target size is functionally equivalent to target bitrate. Both are mutually exclusive from constant quality. Two different rate control methods.
Post Reply