teltek / Galicaster

The Galicaster Project is an open initiative to provide flexible, state-of-the-art solutions for recording educational multimedia contents like lectures and conferences
galicaster.teltek.es
Other
35 stars 31 forks source link

blackmagic bin - pipeline continues to record when stopped. #220

Closed andiempettJISC closed 8 years ago

andiempettJISC commented 8 years ago

manual or opencast scheduled recordings. No video feed connected to blackmagic card. When recording and recording is stopped the blackmagic bin continues the gst pipeline recording and does not stop. with a manual recording, if the 'stop' button is pressed a second time it will stop the pipeline.

http://imgur.com/S95Bvq8

error after 1 stop:

Traceback (most recent call last):
  File "/usr/share/galicaster/galicaster/classui/recorderui.py", line 276, in on_ask_stop
    self.recorder.stop()
  File "/usr/share/galicaster/galicaster/recorder/service.py", line 159, in stop
    self.recorder.stop(force)
  File "/usr/share/galicaster/galicaster/recorder/recorder.py", line 201, in stop
    bin.send_event_to_src(event)
  File "/usr/share/galicaster/galicaster/recorder/bins/blackmagic.py", line 314, in send_event_to_src
    src.send_event(event)
AttributeError: 'NoneType' object has no attribute 'send_event'

log

galicaster      2016-05-16 12:54:48,593 INFO    recorderui      Recording
galicaster      2016-05-16 12:54:48,593 INFO    service Recording (current status: preview)
galicaster      2016-05-16 12:54:49,537 INFO    scheduler       Set status capturing to server
galicaster      2016-05-16 12:54:49,537 INFO    client  Sending state capturing
galicaster      2016-05-16 12:54:49,660 DEBUG   heartbeat       galicaster-notify-short in 60
galicaster      2016-05-16 12:54:58,893 INFO    service Stopping the capture
galicaster      2016-05-16 12:54:58,893 DEBUG   recorder        Stopping recorder, sending EOS event 
to sources
galicaster      2016-05-16 12:55:04,250 INFO    service Stopping the capture
galicaster      2016-05-16 12:55:04,331 INFO    service Adding new mediapackage (1b4a91fa-22d5-46bb-b
bc5-e866b75277a4) to the repository
galicaster      2016-05-16 12:55:04,332 INFO    worker  Creating Ingest Job for MP 1b4a91fa-22d5-46bb
-bbc5-e866b75277a4
galicaster      2016-05-16 12:55:04,334 INFO    worker  Executing Ingest for MP 1b4a91fa-22d5-46bb-bb
c5-e866b75277a4
galicaster      2016-05-16 12:55:04,335 INFO    service Starting recording service in the preview sta
tus
galicaster      2016-05-16 12:55:04,336 DEBUG   service Using Blackmagic Split Audio profile
galicaster      2016-05-16 12:55:04,336 DEBUG   recorder        Init bin Blackmagic galicaster.record
er.bins.blackmagic
galicaster      2016-05-16 12:55:04,336 DEBUG   utils   Video sink: sink-Blackmagic -> xvimagesink
galicaster      2016-05-16 12:55:04,337 DEBUG   utils   Audio sink: sink-audio-Blackmagic -> pulsesink
galicaster      2016-05-16 12:55:04,337 INFO    worker  Zipping MP 1b4a91fa-22d5-46bb-bbc5-e866b75277a4 to /tmp/tmpqIa33f
galicaster      2016-05-16 12:55:04,337 DEBUG   serializer      Using System Zip
galicaster      2016-05-16 12:55:04,348 DEBUG   client  Looking up Opencast endpoint for org.opencastproject.ingest
galicaster      2016-05-16 12:55:04,357 DEBUG   recorder        Init bin AudioSource galicaster.recorder.bins.pulse
galicaster      2016-05-16 12:55:04,357 DEBUG   utils   Audio sink: sink-AudioSource -> autoaudiosink
galicaster      2016-05-16 12:55:04,360 DEBUG   recorder        recorder preview
galicaster      2016-05-16 12:55:04,408 DEBUG   recorder        on sync message 'prepare-window-handle' 'sink-Blackmagic'
galicaster      2016-05-16 12:55:04,775 INFO    client  Ingesting MP 1b4a91fa-22d5-46bb-bbc5-e866b75277a4 to Server http://ingest.x.x.x.x
galicaster      2016-05-16 12:55:06,873 INFO    worker  Finalized Ingest for MP 1b4a91fa-22d5-46bb-bbc5-e866b75277a4

profile:

[data]
name = Blackmagic Split Audio

[track1]
name = Blackmagic
file = presentation.avi
input = hdmi
input-mode = 720p60
location = /dev/blackmagic/card0
device = blackmagic
subdevice = 0
audio-input = none
flavor = presenter
audiosink = pulsesink

[track2]
name = AudioSource
active = true
flavor = presenter
device = pulse
location = alsa_input.pci-0000_00_1b.0.analog-stereo
file = presenter.mp3
amplification = 1.0
vumeter = true

setup: No HDMI feed is connected to the HDMI of the blackmagic intensity pro card. latest apt-release of GC

bleedinge commented 8 years ago

Hi Andy,

Thanks for the detailed issue report.

I just tested this profile with the 2.0.x branch in Ubuntu 16.04 and it worked ok. I tested it using a blackmagic card with no input and could stop the recording every time .

Could you please confirm what code you used and if you were running it in Ubuntu 16.04?

andiempettJISC commented 8 years ago

hi!

so i used the latest alpha via teltek apt repo + small code change to change a spelling mistake :wink: latest full desktop x64 16.04 latest blackmagic driver

bleedinge commented 8 years ago

The issue mentioned here was fixed in b8a2a537fb33d07abc8845776ef75a71ff329e90.

I've tagged a new alpha3 and created the associated deb package. Please, test it as this issue should be fixed there.

andiempettJISC commented 8 years ago

tested and working, thanks!