The-Mad-Pirate / webcamstudio

Automatically exported from code.google.com/p/webcamstudio
GNU General Public License v3.0
0 stars 0 forks source link

Webcamstudio can't open any live source. Error attached. #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open WebcamStudio 0.64 (r515)
2. Add a webcam or desktop
3. Start the source

What is the expected output?
To have my video in the preview for both the input itself and the channel mixer.

What do you see instead?
All previews being blank, as if it isn't activated, as well as an error when 
run in a terminal.

The Operating system you are using (Linux, Windows etc)?
Ubuntu 13.10 64-bit

What version of WebcamStudio are you using?
0.64 (r515)

What version of Java are you using?
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4ubuntu3)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

What is your Webcamera vendor, model and version?
Logitech Webcam Pro 9000

For *nix users please enter the output from "sudo lsusb"?
Bus 002 Device 003: ID 0cf3:3008 Atheros Communications, Inc. Bluetooth (AR3011)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 1532:010e Razer USA, Ltd 
Bus 005 Device 002: ID 2109:0811  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:0809 Logitech, Inc. Webcam Pro 9000
Bus 003 Device 002: ID 1532:0002 Razer USA, Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additional details:
When attempting to start any live source (video), I get this error:
Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: 1
    at webcamstudio.streams.Stream.initAudioSource(Stream.java:628)
    at webcamstudio.externals.ProcessRenderer.setParameters(ProcessRenderer.java:275)
    at webcamstudio.externals.ProcessRenderer.access$100(ProcessRenderer.java:31)
    at webcamstudio.externals.ProcessRenderer$1.run(ProcessRenderer.java:327)
    at java.lang.Thread.run(Thread.java:724)

The Thread-11 can be a different number, but everything else is exactly the 
same every time, and this is with both gstreamer and avconv, in both cases.

There are a lot more errors on closing, but I suspect that's just errors trying 
to close a source that isn't open in the first place.

It happens regardless of if skycam is activated or not, whether or not it is 
streaming to an output, or if v4l2loopback is enabled. Everything is up to date.

I had tried reinstalling, rebooting, everything, but no dice. I am using the 
launchpad ubuntu daily build source.

This does not affect text, and it also partially affects videos. Tested this 
with only one type of encoder, using a .flv and a .mp4.

Original issue reported on code.google.com by andrew.s...@gmail.com on 23 Nov 2013 at 3:18

GoogleCodeExporter commented 9 years ago
Hi,
 can you please try installing:
- pulseaudio-utils
 and re-test Webcamstudio playback?
Seems i miss this dependency.
Thanks for the feedback.
karl.

Original comment by soylent...@gmail.com on 23 Nov 2013 at 7:02

GoogleCodeExporter commented 9 years ago
That is already installed, so no dice.

Original comment by andrew.s...@gmail.com on 23 Nov 2013 at 7:04

GoogleCodeExporter commented 9 years ago
Ok,
 you got the issue only starting a single Webcam stream or you run also Microphone or SoundMonitor stream?
can you also post me the output of:

$ pactl list

Thanks.

Original comment by soylent...@gmail.com on 23 Nov 2013 at 11:04

GoogleCodeExporter commented 9 years ago
I have never had microphone work in the first place, so that is a separate 
issue, happening before this one arose.
I am using SSH for my machine at home, as I am not home right now, and won't be 
for a while, so it isn't running.
It happens when starting any video source, such as desktop, webcam or a video.

Here is the output normally (without WebcamStudio running):
Module #0
    Name: module-device-restore
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Automatically restore the volume/mute state of devices"
        module.version = "4.0"

Module #1
    Name: module-stream-restore
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Automatically restore the volume/mute/device state of streams"
        module.version = "4.0"

Module #2
    Name: module-card-restore
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Automatically restore profile of cards"
        module.version = "4.0"

Module #3
    Name: module-augment-properties
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Augment the property sets of streams with additional static information"
        module.version = "4.0"

Module #4
    Name: module-switch-on-port-available
    Argument: 
    Usage counter: n/a
    Properties:

Module #5
    Name: module-alsa-card
    Argument: device_id="2" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
    Usage counter: 0
    Properties:
        module.author = "Lennart Poettering"
        module.description = "ALSA Card"
        module.version = "4.0"

Module #6
    Name: module-alsa-card
    Argument: device_id="1" name="usb-046d_0809_0DD6FE93-02-U0x46d0x809" card_name="alsa_card.usb-046d_0809_0DD6FE93-02-U0x46d0x809" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
    Usage counter: 0
    Properties:
        module.author = "Lennart Poettering"
        module.description = "ALSA Card"
        module.version = "4.0"

Module #7
    Name: module-alsa-card
    Argument: device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
    Usage counter: 2
    Properties:
        module.author = "Lennart Poettering"
        module.description = "ALSA Card"
        module.version = "4.0"

Module #8
    Name: module-udev-detect
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Detect available audio hardware and load matching drivers"
        module.version = "4.0"

Module #9
    Name: module-bluetooth-policy
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Frédéric Dalleau"
        module.description = "When a bluetooth sink or source is added, load module-loopback"
        module.version = "4.0"

Module #10
    Name: module-bluetooth-discover
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Joao Paulo Rechi Vita"
        module.description = "Detect available bluetooth audio devices and load bluetooth audio drivers"
        module.version = "4.0"

Module #11
    Name: module-native-protocol-unix
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Native protocol (UNIX sockets)"
        module.version = "4.0"

Module #12
    Name: module-default-device-restore
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Automatically restore the default sink and source"
        module.version = "4.0"

Module #13
    Name: module-rescue-streams
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "When a sink/source is removed, try to move their streams to the default sink/source"
        module.version = "4.0"

Module #14
    Name: module-always-sink
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Colin Guthrie"
        module.description = "Always keeps at least one sink loaded even if it's a null one"
        module.version = "4.0"

Module #15
    Name: module-intended-roles
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Automatically set device of streams based of intended roles of devices"
        module.version = "4.0"

Module #16
    Name: module-suspend-on-idle
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "When a sink/source is idle for too long, suspend it"
        module.version = "4.0"

Module #17
    Name: module-systemd-login
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Create a client for each login session of this user"
        module.version = "4.0"

Module #18
    Name: module-position-event-sounds
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Lennart Poettering"
        module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
        module.version = "4.0"

Module #19
    Name: module-filter-heuristics
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Colin Guthrie"
        module.description = "Detect when various filters are desirable"
        module.version = "4.0"

Module #20
    Name: module-filter-apply
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Colin Guthrie"
        module.description = "Load filter sinks automatically when needed"
        module.version = "4.0"

Module #21
    Name: module-equalizer-sink
    Argument: 
    Usage counter: 0
    Properties:
        module.author = "Jason Newton"
        module.description = "General Purpose Equaliser"
        module.version = "4.0"

Module #22
    Name: module-dbus-protocol
    Argument: 
    Usage counter: n/a
    Properties:
        module.author = "Tanu Kaskinen"
        module.description = "D-Bus interface"
        module.version = "4.0"

Sink #0
    State: SUSPENDED
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
    Description: GF110 High Definition Audio Controller Digital Stereo (HDMI)
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 5
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "2"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 17"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0e09"
        device.product.name = "GF110 High Definition Audio Controller"
        device.string = "hdmi:2"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "GF110 High Definition Audio Controller Digital Stereo (HDMI)"
        alsa.mixer_name = "Nvidia GPU 18 HDMI/DP"
        alsa.components = "HDA:10de0018,10de0101,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        hdmi-output-0: HDMI / DisplayPort (priority: 5900, not available)
    Active Port: hdmi-output-0
    Formats:
        pcm

Sink #1
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    Description: Built-in Audio Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 7
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "VT2020 Analog"
        alsa.id = "VT2020 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7510000 irq 47"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "1e20"
        device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analogue Stereo"
        device.description = "Built-in Audio Analogue Stereo"
        alsa.mixer_name = "VIA VT2020"
        alsa.components = "HDA:11060441,1458a014,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-output: Analogue Output (priority: 9900)
        analog-output-headphones: Headphones (priority: 9000, not available)
    Active Port: analog-output
    Formats:
        pcm

Sink #2
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
    Description: FFT based equalizer on Built-in Audio Analogue Stereo
    Driver: module-equalizer-sink.c
    Sample Specification: float32le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 21
    Mute: no
    Volume: 0: 100% 1: 100%
            balance 0.00
    Base Volume: 100%
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HW_MUTE_CTRL LATENCY 
    Properties:
        device.description = "FFT based equalizer on Built-in Audio Analogue Stereo"
        device.master_device = "alsa_output.pci-0000_00_1b.0.analog-stereo"
        device.class = "filter"
        device.icon_name = "audio-card"
    Formats:
        pcm

Source #0
    State: SUSPENDED
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
    Description: Monitor of GF110 High Definition Audio Controller Digital Stereo (HDMI)
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 5
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor of Sink: alsa_output.pci-0000_01_00.1.hdmi-stereo
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.description = "Monitor of GF110 High Definition Audio Controller Digital Stereo (HDMI)"
        device.class = "monitor"
        alsa.card = "2"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 17"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0e09"
        device.product.name = "GF110 High Definition Audio Controller"
        device.string = "2"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Formats:
        pcm

Source #1
    State: SUSPENDED
    Name: alsa_input.usb-046d_0809_0DD6FE93-02-U0x46d0x809.analog-mono
    Description: Webcam Pro 9000 Analogue Mono
    Driver: module-alsa-card.c
    Sample Specification: s16le 1ch 48000Hz
    Channel Map: mono
    Owner Module: 6
    Mute: no
    Volume: 0: 100%
            0: 0.00 dB
            balance 0.00
    Base Volume:  30%
                 -31.00 dB
    Monitor of Sink: n/a
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "USB Audio"
        alsa.id = "USB Audio"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "1"
        alsa.card_name = "USB Device 0x46d:0x809"
        alsa.long_card_name = "USB Device 0x46d:0x809 at usb-0000:00:14.0-4, high speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:4:1.2"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.2/sound/card1"
        udev.id = "usb-046d_0809_0DD6FE93-02-U0x46d0x809"
        device.bus = "usb"
        device.vendor.id = "046d"
        device.vendor.name = "Logitech, Inc."
        device.product.id = "0809"
        device.product.name = "Webcam Pro 9000"
        device.serial = "046d_0809_0DD6FE93"
        device.form_factor = "webcam"
        device.string = "hw:1"
        device.buffering.buffer_size = "192000"
        device.buffering.fragment_size = "96000"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-mono"
        device.profile.description = "Analogue Mono"
        device.description = "Webcam Pro 9000 Analogue Mono"
        alsa.mixer_name = "USB Mixer"
        alsa.components = "USB046d:0809"
        module-udev-detect.discovered = "1"
        device.icon_name = "camera-web-usb"
    Ports:
        analog-input-microphone: Microphone (priority: 8700)
    Active Port: analog-input-microphone
    Formats:
        pcm

Source #2
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Description: Monitor of Built-in Audio Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 7
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor of Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.description = "Monitor of Built-in Audio Analogue Stereo"
        device.class = "monitor"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7510000 irq 47"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "1e20"
        device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "0"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Formats:
        pcm

Source #3
    State: SUSPENDED
    Name: alsa_input.pci-0000_00_1b.0.analog-stereo
    Description: Built-in Audio Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 7
    Mute: no
    Volume: 0:  12% 1:  12%
            0: -56.25 dB 1: -56.25 dB
            balance 0.00
    Base Volume:  10%
                 -60.75 dB
    Monitor of Sink: n/a
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "VT2020 Analog"
        alsa.id = "VT2020 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7510000 irq 47"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "1e20"
        device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analogue Stereo"
        device.description = "Built-in Audio Analogue Stereo"
        alsa.mixer_name = "VIA VT2020"
        alsa.components = "HDA:11060441,1458a014,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-input-microphone-front: Front Microphone (priority: 8500, not available)
        analog-input-microphone-rear: Rear Microphone (priority: 8200, available)
        analog-input-linein: Line In (priority: 8100, not available)
    Active Port: analog-input-microphone-rear
    Formats:
        pcm

Source #4
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
    Description: Monitor of FFT based equalizer on Built-in Audio Analogue Stereo
    Driver: module-equalizer-sink.c
    Sample Specification: float32le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 21
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor of Sink: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.description = "Monitor of FFT based equalizer on Built-in Audio Analogue Stereo"
        device.class = "monitor"
        device.icon_name = "audio-input-microphone"
    Formats:
        pcm

Sink Input #0
    Driver: module-equalizer-sink.c
    Owner Module: 21
    Client: n/a
    Sink: 1
    Sample Specification: float32le 2ch 44100Hz
    Channel Map: front-left,front-right
    Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
    Corked: yes
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Buffer Latency: 0 usec
    Sink Latency: 0 usec
    Resample method: copy
    Properties:
        media.name = "Equalized Stream"
        media.role = "filter"
        module-stream-restore.id = "sink-input-by-media-role:filter"

Sink Input #3
    Driver: protocol-native.c
    Owner Module: 11
    Client: 4
    Sink: 1
    Sample Specification: float32le 2ch 44100Hz
    Channel Map: front-left,front-right
    Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
    Corked: no
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Buffer Latency: 51156 usec
    Sink Latency: 0 usec
    Resample method: copy
    Properties:
        media.role = hex:
        phonon.streamid = hex:
        media.name = "Playback Stream"
        application.name = "Blender 2.69+svn61239+git201311190616.1968612"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "28"
        application.process.id = "2202"
        application.process.user = "silvea"
        application.process.host = "Andrew-PC"
        application.process.binary = "blender"
        application.language = "C"
        application.process.machine_id = "630c9fc7d0bc21c85f1e23f4526a5d8c"
        application.process.session_id = "c2"
        application.icon_name = "blender"
        module-stream-restore.id = "sink-input-by-application-name:Blender 2.69+svn61239+git201311190616.1968612"

Client #4
    Driver: protocol-native.c
    Owner Module: 11
    Properties:
        application.name = "Blender 2.69+svn61239+git201311190616.1968612"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "28"
        application.process.id = "2202"
        application.process.user = "silvea"
        application.process.host = "Andrew-PC"
        application.process.binary = "blender"
        application.language = "C"
        application.process.machine_id = "630c9fc7d0bc21c85f1e23f4526a5d8c"
        application.process.session_id = "c2"
        application.icon_name = "blender"

Client #5
    Driver: module-systemd-login.c
    Owner Module: 17
    Properties:
        application.name = "Login Session 1"
        systemd-login.session = "1"

Client #7
    Driver: protocol-native.c
    Owner Module: 11
    Properties:
        application.name = "pactl"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "28"
        application.process.id = "3244"
        application.process.user = "silvea"
        application.process.host = "Andrew-PC"
        application.process.binary = "pactl"
        application.language = "en_AU.UTF-8"
        application.process.machine_id = "630c9fc7d0bc21c85f1e23f4526a5d8c"
        application.process.session_id = "1"

Card #0
    Name: alsa_card.pci-0000_01_00.1
    Driver: module-alsa-card.c
    Owner Module: 5
    Properties:
        alsa.card = "2"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 17"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0e09"
        device.product.name = "GF110 High Definition Audio Controller"
        device.string = "2"
        device.description = "GF110 High Definition Audio Controller"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Profiles:
        output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5400)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 300)
        output:hdmi-stereo-extra1: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5200)
        output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 100)
        output:hdmi-stereo-extra2: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5200)
        output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 100)
        output:hdmi-stereo-extra3: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5200)
        output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 100)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: output:hdmi-stereo
    Ports:
        hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo, output:hdmi-surround
        hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-surround-extra1
        hdmi-output-2: HDMI / DisplayPort 3 (priority: 5700, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2
        hdmi-output-3: HDMI / DisplayPort 4 (priority: 5600, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3

Card #1
    Name: alsa_card.usb-046d_0809_0DD6FE93-02-U0x46d0x809
    Driver: module-alsa-card.c
    Owner Module: 6
    Properties:
        alsa.card = "1"
        alsa.card_name = "USB Device 0x46d:0x809"
        alsa.long_card_name = "USB Device 0x46d:0x809 at usb-0000:00:14.0-4, high speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:4:1.2"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.2/sound/card1"
        udev.id = "usb-046d_0809_0DD6FE93-02-U0x46d0x809"
        device.bus = "usb"
        device.vendor.id = "046d"
        device.vendor.name = "Logitech, Inc."
        device.product.id = "0809"
        device.product.name = "Webcam Pro 9000"
        device.serial = "046d_0809_0DD6FE93"
        device.form_factor = "webcam"
        device.string = "1"
        device.description = "Webcam Pro 9000"
        module-udev-detect.discovered = "1"
        device.icon_name = "camera-web-usb"
    Profiles:
        input:analog-mono: Analogue Mono Input (sinks: 0, sources: 1, priority. 1)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: input:analog-mono
    Ports:
        analog-input-microphone: Microphone (priority: 8700, latency offset: 0 usec)
            Properties:
                device.icon_name = "audio-input-microphone"
            Part of profile(s): input:analog-mono

Card #2
    Name: alsa_card.pci-0000_00_1b.0
    Driver: module-alsa-card.c
    Owner Module: 7
    Properties:
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7510000 irq 47"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "1e20"
        device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "0"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Profiles:
        input:analog-stereo: Analogue Stereo Input (sinks: 0, sources: 1, priority. 60)
        output:analog-stereo: Analogue Stereo Output (sinks: 1, sources: 0, priority. 6000)
        output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (sinks: 1, sources: 1, priority. 6060)
        output:analog-surround-40: Analogue Surround 4.0 Output (sinks: 1, sources: 0, priority. 700)
        output:analog-surround-40+input:analog-stereo: Analogue Surround 4.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
        output:analog-surround-41: Analogue Surround 4.1 Output (sinks: 1, sources: 0, priority. 800)
        output:analog-surround-41+input:analog-stereo: Analogue Surround 4.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
        output:analog-surround-50: Analogue Surround 5.0 Output (sinks: 1, sources: 0, priority. 700)
        output:analog-surround-50+input:analog-stereo: Analogue Surround 5.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
        output:analog-surround-51: Analogue Surround 5.1 Output (sinks: 1, sources: 0, priority. 800)
        output:analog-surround-51+input:analog-stereo: Analogue Surround 5.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
        output:analog-surround-71: Analog Surround 7.1 Output (sinks: 1, sources: 0, priority. 700)
        output:analog-surround-71+input:analog-stereo: Analog Surround 7.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
        output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority. 5500)
        output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 5560)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: output:analog-stereo+input:analog-stereo
    Ports:
        analog-input-microphone-front: Front Microphone (priority: 8500, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "audio-input-microphone"
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-input-microphone-rear: Rear Microphone (priority: 8200, latency offset: 0 usec, available)
            Properties:
                device.icon_name = "audio-input-microphone"
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-input-linein: Line In (priority: 8100, latency offset: 0 usec, not available)
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-output: Analogue Output (priority: 9900, latency offset: 0 usec)
            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo, output:analog-surround-71, output:analog-surround-71+input:analog-stereo
        analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "audio-headphones"
            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
        iec958-stereo-output: Digital Output (S/PDIF) (priority: 0, latency offset: 0 usec)
            Part of profile(s): output:iec958-stereo, output:iec958-stereo+input:analog-stereo

Original comment by andrew.s...@gmail.com on 23 Nov 2013 at 11:11

GoogleCodeExporter commented 9 years ago
Thanks,
 can you tell me your audio output configuration?
Do you use hdmi sound output?

It is very strange that you cannot use streams like video or webcam or desktop, 
because the given error can appears only if you select to add streams like 
Microphone or sound monitor (the last two icons on the top).

Even if the audio fails, in theory you could be able to load and stream any 
other sources.

We can focus for example on Desktop and avconv backend ...

If you run this command:

avconv -s 1024x768 -r 25 -f x11grab -i :0.0+0,0 -f rawvideo -pix_fmt rgb24 -b 
1200k -ac 2 -ar 44100 -ab 128k -f mp4 -y DesktopTest.mp4

after few second running, stop it with ctrl-c and see if the DesktopTest.mp4 
contains any video data, or send me the output error if any.

Thanks.

Original comment by soylent...@gmail.com on 23 Nov 2013 at 12:04

GoogleCodeExporter commented 9 years ago
Sure seems that way. I can't load any video sources, and audio has never shown 
an output from WebcamStudio. I can tell you that normally I can use avconv to 
record my desktop, as well as my webcam, and sound. Even during this, I managed 
to record. I can't test with the login window, so that's a no-go, at least for 
now, but I did record the desktop successfully with this (part of an extensive 
recording and livestreaming script):

topX=0
topY=0
width=1680
height=1050
avconv \
-f x11grab -s "$width"x"$height" -r 40 -i :0.0+$topX,$topY \
-f pulse -name x11grab -async 40 -i default \
-vcodec libx264 -preset "slow" \
-acodec libmp3lame -ar 44100 \
"record-$(date +%s).flv"

That works perfectly for me. I could also have it apply to the webcam 
(/dev/video0), and it would still work perfectly. I just can't test if it will 
work right now, as I can't log in (I am doing a blender cycles render for the 
third time, last render took on and off a month or so, and died).

I just can't seem to load any sort of sources with WebcamStudio.
Also, this has actually happened before, for absolutely no reason. It fixed 
itself after a reboot though.

Oh, and I can use an mp4 format if I wish, I even have a nautilus script to 
batch convert files into mp4 format.

Original comment by andrew.s...@gmail.com on 23 Nov 2013 at 12:15

GoogleCodeExporter commented 9 years ago
This issue need more deep studies ...
I'm editing the code on a Ubuntu 13.10 x64 machine like yours, and everything 
works well.
Maybe some kind of HW configuration that i can't catch ... or maybe a 
WebcamStudio bug that i can't reproduce on my machines (due to some kind of 
customization or avconv/gstreamer compiling version) ... or simply i didn't 
foresee this scenario ...
Just few question:
- With the previous version of WebcamStudio you experienced same issues or this 
one appears from r515?
- Can you post me your HW specs like MB, Graphic card etc.?
I will try to build a jar with more debugging messages as possible, but i can't 
do so much because i'm the only "developer" of WS 0.64 version ...
My knowledge is very limited ...
Good luck for your render work :)
karl

PS: You can also try to compile the WebcamStudio code via NetbeansIDE doing a 
checkout from the sources, maybe some error comes up in the IDE pointing us in 
the right way.

Original comment by soylent...@gmail.com on 23 Nov 2013 at 12:39

GoogleCodeExporter commented 9 years ago
I'll try these tomorrow afternoon, as it just hit midnight over here. When 
debugging, I am known to add debugging messages literally on every line of the 
code, to pinpoint the exact line that had a problem. I will see if I can get 
it, assuming it doesn't mysteriously fix itself for no reason by the time I get 
to it.

Original comment by andrew.s...@gmail.com on 23 Nov 2013 at 1:03

GoogleCodeExporter commented 9 years ago
Hi Andrew,
 maybe i find something ...
Try to go to PAVControl and under the "Configuration" Tab, set the "GF110 High 
Definition Audio Controller to "OFF".
Hope this helps.
Thanks.
karl

Original comment by soylent...@gmail.com on 23 Nov 2013 at 1:48

GoogleCodeExporter commented 9 years ago
This is a post typed as I was doing stuff, over a period of about half an hour 
or so. That's why it may seem a little jumbled in parts.

By the way, about your previous post... http://paste.ubuntu.com/6467020/ is the 
output from sudo lshw. I am currently redownloading netbeans, having a rough 
start with it (it's just crashing right now. I wonder if that is related to 
this...)

Reinstalling it quickly from the software centre, it gives me this output:
http://paste.ubuntu.com/6467083/

This is with Netbeans 7.0.1 from the ubuntu software center.

When trying to install netbeans 7.4 from the website, the installer says "No 
compadable JDK found" I'm going to install jdk from the webupd8team's ppa.

Installed that. That doesn't fix webcamstudio straight away, so it's not the 
version of java, but netbeans seems to like it.

I think I found our issue.

In ProcessRender, I added System.out.println(line); to line 115. This was the 
output:

Name:alsa_output.pci-0000_00_1b.0.analog-stereo
MonitorSource:alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Name:alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
MonitorSource:alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
device.master_device="alsa_output.pci-0000_00_1b.0.analog-stereo"

The error is java.lang.ArrayIndexOutOfBoundsException: 1
In the final line, there is no :, therefore no index 1.
That would be our issue, I believe.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 5:01

GoogleCodeExporter commented 9 years ago
Oh, and also...

silvea@Andrew-PC:~$ sh .webcamstudio/SetAudioSrc.sh | grep alsa_output.pci
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
        device.master_device = "alsa_output.pci-0000_00_1b.0.analog-stereo"
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Monitor of Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
    Monitor of Sink: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer

I managed to fix WebcamStudio for desktop by replacing line 109, converting it 
from:
if(line.contains("alsa_output.pci")) {
to
if(line.contains(": alsa_output.pci")) {

This started the desktop nicely.

I tested the webcam, and I had success with that too.

There is one more issue though, which I have always had, that WebcamStudio 
never deactivates the webcam after it is turned off, with either gstreamer or 
avconv, causing the webcam to be in a state of being unusable unless it is 
unplugged and plugged back in. If I try to reactivate it, it turns off, and 
doesn't work for anything, including external applications. The output from the 
webcam is:

gst-launch-0.10 v4l2src device=/dev/video0 ! videorate ! 
video/x-raw-yuv,framerate=30/1 ! videoscale ! ffmpegcolorspace ! 
video/x-raw-rgb,width=768,height=480,depth=24,bpp=24,blue_mask=255,green_mask=65
280,red_mask=16711680 ! ffmpegcolorspace ! tcpclientsink port=54734 
Start Webcam Video.
UVC Camera (046d:0809) (0) Video Cleared ...
avconv -v 0 -an -f video4linux2 -s 768x480 -r 30 -i /dev/video0 -f rawvideo 
-pix_fmt rgb24 -s 768x480 -r 30 tcp://127.0.0.1:36140 
Start Webcam Video.
UVC Camera (046d:0809) (0) Video Cleared ...
avconv -v 0 -an -f video4linux2 -s 768x480 -r 30 -i /dev/video0 -f rawvideo 
-pix_fmt rgb24 -s 768x480 -r 30 tcp://127.0.0.1:55476 
UVC Camera (046d:0809) (0) Video Cleared ...
Nov 24, 2013 4:21:55 PM webcamstudio.media.renderer.Capturer$1 run
SEVERE: null
java.net.SocketException: Socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
    at java.net.ServerSocket.implAccept(ServerSocket.java:530)
    at java.net.ServerSocket.accept(ServerSocket.java:498)
    at webcamstudio.media.renderer.Capturer$1.run(Capturer.java:74)
    at java.lang.Thread.run(Thread.java:744)

avconv -v 0 -an -f video4linux2 -s 768x480 -r 30 -i /dev/video0 -f rawvideo 
-pix_fmt rgb24 -s 768x480 -r 30 tcp://127.0.0.1:34500 
UVC Camera (046d:0809) (0) Video Cleared ...
Nov 24, 2013 4:21:56 PM webcamstudio.media.renderer.Capturer$1 run
SEVERE: null
java.net.SocketException: Socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
    at java.net.ServerSocket.implAccept(ServerSocket.java:530)
    at java.net.ServerSocket.accept(ServerSocket.java:498)
    at webcamstudio.media.renderer.Capturer$1.run(Capturer.java:74)
    at java.lang.Thread.run(Thread.java:744)

And the output from avconv after having this happen is:

silvea@Andrew-PC:~$ avplay -f video4linux2 /dev/video0
avplay version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2003-2013 the 
Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
[video4linux2 @ 0x7f8ea40008c0] ioctl(VIDIOC_STREAMON): Invalid argument
/dev/video0: Invalid argument

silvea@Andrew-PC:~$ 

This doesn't happen if I haven't tried to open it in WebcamStudio yet, and it 
works fine with the same command.

This is only for the webcam, and only for its video. The audio still works just 
fine from it after this.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 5:25

GoogleCodeExporter commented 9 years ago
Also, about the last comment, the webcam does work the first time I try to open 
it, and it works beautifully. It's just after I try to reopen it again, if I 
haven't actually unplugged it from the machine and plugged it back in.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 5:27

GoogleCodeExporter commented 9 years ago
It is strange that you can't install NetBeansIDE from the installer ... The one 
shipped with Ubuntu is a mess :(
By the way Thanks for your great work !!!
In processrender i trim the String line containing "alsa_output.pci" and i 
split it at ":" ... 
it is strange that you have to change:

if(line.contains("alsa_output.pci")) {
to
if(line.contains(": alsa_output.pci")) { ...

Because i used this technique in many parts of the code (get a command output 
and then looking for the needed results), i think is something related to 
format of the outputs commands you get in you environment ... maybe you output 
commands are localized in another language than english, or you use some other 
non-standard character codification ... or something in the JDK is missing ... 
but i can't figure out what ...
I think is this the reason because at the stop of the webcam stream you get it 
busy the next time you open it ... We have to look in ProcessExecutor.java in 
the part related to the killing AV or GS command that started the webcam ...

getUnixPid and killUnixProcess.

Those look for the process pids and kill them when the stream is stopped.

It is also strange that initAudioSource is called for the Desktop stream ...

Try latest WS code r516, i put a fix in Processrenderer for the hdmi, but i 
can't put you fix, because seems working only for your envoirment.
I also moved the initAudioSource from Streams.java to Processrenderer.java ...

When you have time can you try running WS in a VM machine? In virtualbox 
Webcams are not displayed, but you can see all the outputs.

Thanks again for your precious and big help.
karl.

Original comment by soylent...@gmail.com on 24 Nov 2013 at 9:22

GoogleCodeExporter commented 9 years ago
The issue I'm having is to do with this:

Sink #2
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
    Description: FFT based equalizer on Built-in Audio Analogue Stereo
    Driver: module-equalizer-sink.c
    Sample Specification: float32le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 21
    Mute: no
    Volume: 0: 100% 1: 100%
            balance 0.00
    Base Volume: 100%
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HW_MUTE_CTRL LATENCY 
    Properties:
        device.description = "FFT based equalizer on Built-in Audio Analogue Stereo"
        device.master_device = "alsa_output.pci-0000_00_1b.0.analog-stereo"
        device.class = "filter"
        device.icon_name = "audio-card"
    Formats:
        pcm

It's the Pulseaudio Equalizer module. It's basically the output of it. Maybe 
just try to ensure its not a property or something.

And thanks, I will.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 9:28

GoogleCodeExporter commented 9 years ago
Also, I believe I either uses us english or gb english, or something like that. 
It's all english, and I don't have this kind of issue with other software. It's 
just the parameters for that module pretty much.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 9:42

GoogleCodeExporter commented 9 years ago
Seems yours outputs are correct ... so i agree with you this is not the point.
Do you use Jack Server or something like that?
I know that catch the information from the systems with the commands outputs 
can lead to this kind of bugs ... but it was the first simply way i got it work 
in the code ...
Seems i don't have in my system:

alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer

have to investigate ...
karl.

Original comment by soylent...@gmail.com on 24 Nov 2013 at 10:10

GoogleCodeExporter commented 9 years ago
I don't use jack server or anything like that, I could never get it to work 
nicely with pulseaudio in the way that I wanted, so I just create null sinks, 
listeners, combine sinks, etc to replicate the behaviour, and use pavucontrol 
to map applications correctly.
Just google around for "PulseAudio Equalizer", you will find it easily. It used 
to be separately downloadable, but now it comes preinstalled (but not 
activated) in pulseaudio by default. I just enabled it in my 
/etc/pulse/default.pa (I think that was it), and use qpaeq as a front-end for 
it (it's a pulseaudio equalizer frontend written in python). 

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 10:41

GoogleCodeExporter commented 9 years ago
I will take a look at qpaeq.
I think that using and combining sinks using pavcontrol is not the cause of 
your WebcamStudio issues ... there must be some other reason ...
karl

Original comment by soylent...@gmail.com on 24 Nov 2013 at 7:01

GoogleCodeExporter commented 9 years ago
I believe the issue is specifically with pulseaudio equalizer, like I said 
before. I believe it is just because of the fact that in the properties, it 
contains what output it connects to, which just so happens to match the string 
that webcamstudio is looking for. Basically, just ensure it looks for the root 
source/sink details, and not look at separate properties (maybe ensure it 
doesn't have an = in it, but that may break some setups...)

Maybe ensure that the source/sink name/property isn't ENTIRELY enclosed in 
double quotes. This will allow for sources/sinks to have quotes in them, but 
will not be picked up if they are properties.

Has quotes:

    Properties:
        device.description = "FFT based equalizer on Built-in Audio Analogue Stereo"
        device.master_device = "alsa_output.pci-0000_00_1b.0.analog-stereo"
        device.class = "filter"
        device.icon_name = "audio-card"

Doesn't have quotes:

    Name: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer
    Description: FFT based equalizer on Built-in Audio Analogue Stereo
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.equalizer.monitor

Basically, looks like strings in properties are always enclosed in double 
quotes, while details about the sink itself are not. If you look in the earlier 
post, this applies in EVERY SOURCE AND SINK AVAILABLE. Maybe just filter out 
properties that are entirely enclosed in them.

I am skilled with javascript regexp, and sed regexp, but usually start off with 
javascript and go from there. In js regexp, try filtering out like this:

Matching ones that shouldn't be detected:
/^\s*?\S+\.\S+ = "[^"]+"$/g
Match start of string, then 0-? space/tab (lazy match), then at least 1 
non-space/tab, then a single . character, than again at least 1 non-space/tab, 
then a space, then an =, then another space, then a ", than at least 1 
character that isn't a " (never match "'s), then a ", then end of string.

Matching only ones that will work:
/^\s*?\S[^:]+: \S.+$/g

Match start of string, then as many spacing characters as it can (lazy match), 
then one non-spacing character, then at least one of any character other than 
:, then a :, then a space, then one non-spacing character, then as many of any 
character as possible, then end of string.

If you don't want to match with regexp, I guess one way that may work is just 
checking if:
If there is an =, ensure that the character 2 characters after it is NOT a ", 
AS WELL AS
ensure that the last character is NOT a ".
If there is no =, just allow it through as a valid, usable property.

That may work, but I have no idea if this may filter out needed details in 
other setups. I may be wr

Shouldn't be too hard to translate into sed, or whatever you use in java 
instead (sed is a bash regexp utility)

If you can try to filter this out, that will probably solve not only this 
issue, but any others with other software that causes similar symptoms.

If you would like me to clarify on anything, no problem.

Also, I am happy to send you my default.pa for setting up the equalizer as I 
have, and I believe I modified qpaeq slightly in some way, can't remember how, 
but I can send that too, using ubuntu pastebin. I am happy to send any files, 
and any command output. I do really want to get this working nicely.

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 10:38

GoogleCodeExporter commented 9 years ago
IN FACT, I know why it picked it up.
It will also explain why this was in there in the first place. And if this is 
true, if I set up some devices (mostly combine sinks), this WILL stop those 
causing the exact same problem as this.

Let me show you a script I made, the one that makes all of these devices.
http://paste.ubuntu.com/6471121/

Let's say the first combine sink is enabled, and say that I was to make it 
listen to my PC audio by default (this script isn't set to do that by default, 
as I like to manually connect stuff up myself).
I believe doing that may cause similar data in the properties of the sink, 
under a different parameter name, but still enclosed in quotes, along with 
another sink in the same string (due to it being combined).

This is in theory, and may not actually affect it, at least not in this case. 
But the point still stands.
Basically, just filter out options that are entirely enclosed in "'s (the 
property values, not the entire line).

Original comment by andrew.s...@gmail.com on 24 Nov 2013 at 10:52

GoogleCodeExporter commented 9 years ago
Also, another way to fix it could be making the if line as follows:
if(line.contains("alsa_output.pci") && !line.contains("\"alsa_output.pci")) {

or something similar to that.

Original comment by andrew.s...@gmail.com on 25 Nov 2013 at 8:01

GoogleCodeExporter commented 9 years ago
Found the solution to our issue with the webcam being locked out.

In ProcessExecutor.java, lines 138-139, change it to:
    Runtime.getRuntime().exec("kill -6 " + pid).waitFor();
    Runtime.getRuntime().exec("kill -6 " + childPids).waitFor();

kill -4 tells it to kill at the speed we want, while allowing cleanup, such as 
actually releasing the lock on the webcam.

Signal 6 is SIGABRT. This gives us a much more desired behaviour, telling it to 
quit urgently and clean up behind it, like hitting ctrl-c. This signal also 
stops apport from reporting that gstreamer/avconv crashed (it showed when I 
tried -4).

http://manpages.ubuntu.com/manpages/dapper/man1/kill.1posix.html#contenttoc3 - 
for signals

Original comment by andrew.s...@gmail.com on 25 Nov 2013 at 8:15

GoogleCodeExporter commented 9 years ago
Thanks for all the good work Andrew, sorry, but i try to convert gstlaunch-0.10 
pipes to 1.0 in the meanwhile and i'm stuck.
I'm a little bit tired (hard work today.)
I will take a look at all your interesting post as soon as possible.
I will also try to implements your brilliant modifications to test it on my 
machines.
Thanks again.
karl.

Original comment by soylent...@gmail.com on 25 Nov 2013 at 4:18

GoogleCodeExporter commented 9 years ago
Hi Andrew,
 i try the modifications of your post #22 and the fist times i run and stop the camera i got a gstreamer/avconv crash.
When monitoring the commands in system-monitor they are killed and cleared 
correctly.
The next times i try run the camera i never get the GS/AV crash anymore ... 
(leaving -6).
I also try -4 with the same results ...
Now i don't know if there is a standard to do such things ...
With -9 i never got crashes or webcams locks.
I'm using two logitec c615 ... it is webcam related?
About the "alsa_output.pci" my goal is to know the exact standard device name a 
system use for output. (0000_00_1b.0) in you case.

If you look in ProcessRenderer line 323:

case AUDIOSRC:
                    command = command.replaceAll(Tags.AUDIOSRC.toString(), "" + initAudioSource());
                    break;

I will use AUDIOSRC in the composition of the command line to get the audio 
source:

In monitor.properties (webcamstudio.externals.linux.sources)

#GStreamer back-end
audio=avconv -v 0
GSaudio=gst-launch-0.10 pulsesrc device="@AUDIOSRC.analog-stereo.monitor" ! 
audioconvert ! 
audio/x-raw-int,rate=@FREQ,channels=2,signed=true,width=16,depth=16,endianness=4
321 ! tcpclientsink port=@APORT

#AVCONV Back-end
AVaudio=avconv -v 0 -f pulse -i @AUDIOSRC.analog-stereo.monitor -ss @SEEK -ar 
@FREQ -ac @CHANNELS -f s@BITSIZEbe tcp://127.0.0.1:@APORT

I think you do an advanced use of sinks and pavcontrols that a user normally 
doesn't.
Maybe i'm wrong, but i can't do modifications on the code for one particular 
envoirment or maybe i miss something.
Thanks.
karl

Original comment by soylent...@gmail.com on 25 Nov 2013 at 6:01

GoogleCodeExporter commented 9 years ago
My environment is quite particular, but with these issues, I'm sure I'm not the 
only one. With the webcam not starting at all due to matching, crashing with an 
ArrayIndexOutOfBoundsException, I am sure I am not alone with this issue, and 
something should be put in place in my opinion.
With it not cleaning up, I like to call signal 9 "KillWithFire" for a reason. 
It kills everything instantly. It is probably that my webcam ALWAYS needs 
initilization, and can only be used by one source at a time, requiring it to 
free its lock on it afterwards. If it never frees the lock, it gets locked out. 
Applications take full control of it, and lock out all other applications in 
the process (video only, audio is unaffected here)

Also, to test with the equalizer, here is the modified end of my default.pa:

### Load pulseaudio equalizer
load-module module-equalizer-sink
load-module module-dbus-protocol

Try enabling the equalizer sink when you test things, you should run into the 
same issues I am with it never starting.
You probably only need to do the equalizer sink, I can't remember what dbus 
protocol was for.

Also, for the correct signal, just look for what signal ctrl-c sends. That is 
the signal that you probably want to send, killing it quickly, while still 
allowing some essential cleanup.

Original comment by andrew.s...@gmail.com on 25 Nov 2013 at 9:42

GoogleCodeExporter commented 9 years ago
I quickly googled the actual signal ctrl-c sends, which is SIGINT, or signal 2. 
That may be the signal we want, possibly.

Original comment by andrew.s...@gmail.com on 25 Nov 2013 at 9:48

GoogleCodeExporter commented 9 years ago
Sorry, -2 causes the same problem, at least with gstreamer. So definately not 
-2.

Original comment by andrew.s...@gmail.com on 26 Nov 2013 at 2:07

GoogleCodeExporter commented 9 years ago
Hi Andrew,
 i will try to tests -6 in r517 for a much longer time on my machine. I have only two machines to test on ...
I think you're right about killing with -6, but without others users feedbacks, 
i can't be sure ...
I don't really know how many people use WS, and maybe this is the reason 
because i get few feedbacks.
On my machine i have to leave the ubuntu standard installation to try to be 
more compatible with the standard users configurations.
I'm a newbie in Java coding and sometimes i have to put sleeps states between 
the commands because (I suppose) the faster machines seems to read the code 
faster ... maybe is this the reason of our not equal results:

In ProcessExecutor.java, something like:
    Tools.sleep(50);
    Runtime.getRuntime().exec("kill -9 " + pid).waitFor();
    Tools.sleep(50);
    Runtime.getRuntime().exec("kill -9 " + childPids).waitFor();
    Tools.sleep(50);

I know that is my fault because the code i add to Patrick's base is not clean 
at all.

I also think that sometimes in a multi-threaded program like WS, can occur that 
some data is passed too late from a thread to another, causing "null pointer 
exceptions" or "array out of index".

Definitely i will try your -6 implementation, maybe i have to remove some 
sleeps state (and that it would be good.)

Thanks.
karl.

Original comment by soylent...@gmail.com on 26 Nov 2013 at 12:55

GoogleCodeExporter commented 9 years ago
Hi Andrew,
 i try -6, but gstreamer crash on my machine:

gst-launch-0.10 crashed wit SIGBRT in poll()

but the webcam works well, and the process is killed correctly ...
I don't know ...
I agree with -2 because the gst process stay alive ..

I will try on an UbuntuStudio 13.10 32bit ...

karl.

Original comment by soylent...@gmail.com on 26 Nov 2013 at 5:44

GoogleCodeExporter commented 9 years ago
With UbuntuStudio 13.10 32bit running on a dual core laptop i get the same gst 
crash ...
I think i can't modify that part of code with -6.
I leave the code with -9, but thanks Andrew for this deep and interesting 
conversation.

Any other suggestion is very welcome.
karl. 

Original comment by soylent...@gmail.com on 26 Nov 2013 at 6:42

GoogleCodeExporter commented 9 years ago
Actually, why didn't we just leave it at nothing? so just "kill $procid"
No errors reported, cleans up nicely, and exits quickly.

Original comment by andrew.s...@gmail.com on 27 Nov 2013 at 6:15

GoogleCodeExporter commented 9 years ago
Thanks Andrew, i will give it a try and let you know.
Maybe the simplest the better :)
karl.

Original comment by soylent...@gmail.com on 27 Nov 2013 at 4:17

GoogleCodeExporter commented 9 years ago
Ok, i tested it, and monitoring the processes, seems they are (soon or later) 
killed correctly. There are some delays on killing, but this may be the idea 
you intend to pass me.
I give it a try testing on my site (more than 60 Movies Streams in 57 
temporized channels) for WS r517.
I also want to try switching between different streams playing.
Thanks, i think you got it :)
If you like to join the team (actually we are only in two that had made some 
works over the good Patrick 0.6x code, me and PhobosK) just send me a mail.
cheers.
karl.

Original comment by soylent...@gmail.com on 27 Nov 2013 at 7:31

GoogleCodeExporter commented 9 years ago
Custom audio-sinks configuration.

Original comment by soylent...@gmail.com on 9 Dec 2013 at 8:14