Bug 262055 - net-im/dino: Add pulseaudio as dependency
Summary: net-im/dino: Add pulseaudio as dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-19 20:45 UTC by Goran Mekić
Modified: 2022-03-11 22:13 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ashish)


Attachments
dino.diff (599 bytes, patch)
2022-02-19 20:45 UTC, Goran Mekić
no flags Details | Diff
Update diff (777 bytes, patch)
2022-02-20 08:58 UTC, Ashish SHUKLA
no flags Details | Diff
Update diff v2 (782 bytes, patch)
2022-02-20 13:21 UTC, Ashish SHUKLA
no flags Details | Diff
pkg info (77.30 KB, text/plain)
2022-02-21 10:16 UTC, Goran Mekić
no flags Details
dino diff (654 bytes, patch)
2022-03-05 18:48 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Goran Mekić 2022-02-19 20:45:34 UTC
Created attachment 231947 [details]
dino.diff

At least pulseaudio is missing from dependencies. I still couldn't make calls with dino, but I hope we can improve it collectively.
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-20 08:58:15 UTC
Created attachment 231952 [details]
Update diff

(In reply to Goran Mekić from comment #0)

Hi,

Thanks for your diff, although I think it needs gstreamer pulseaudio module, instead of pulseaudio itself.

I've updated this diff to include various other GStreamer modules. I've managed to procure a webcam, and has been able to make calls with myself on Conversations (android app). It seems to work fine.

If you could test on your side, that'll be great.

I really appreciate your time helping test it.

Thanks!
Comment 2 Goran Mekić 2022-02-20 10:51:59 UTC
Audio calls work, but dino can not find my webcam, although "mpv av://v4l2:/dev/video0" work and I can use the webcam through browser+jitsi. Great progress!
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-20 13:21:26 UTC
Created attachment 231955 [details]
Update diff v2

Also added dependency on V4L2 gstreamer module.

Could you please give this a shot ?

Thanks!
Comment 4 Goran Mekić 2022-02-20 17:30:56 UTC
I can see other people's camera, but they can't see me and dino says "no camera found". At least now I can see people :o)
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-20 17:35:26 UTC
(In reply to Goran Mekić from comment #4)

Are you using webcamd ? If yes, is your user member of webcamd group ?

Any error/informational/warning messages on console when you start Dino ?

Thanks!
Comment 6 Goran Mekić 2022-02-20 19:12:09 UTC
I installed gstreamer1-plugin-all and this is the output I get during video call. The second warning is what I would suspect, but it's dino -> conversations call.

(dino:38186): rtp-WARNING **: 20:08:33.140: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): xmpp-vala-WARNING **: 20:08:38.193: content_parameters.vala:165: Counterpart's preferred content type doesn't match any of our sent ones

(dino:38186): rtp-WARNING **: 20:08:38.209: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): rtp-WARNING **: 20:08:38.209: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): rtp-WARNING **: 20:08:39.330: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): rtp-WARNING **: 20:08:39.330: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): rtp-WARNING **: 20:08:39.386: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.

(dino:38186): rtp-WARNING **: 20:08:39.386: plugin.vala:397: No preferred device for outgoing video. Media will not be processed.
Comment 7 Goran Mekić 2022-02-20 19:13:46 UTC
Forgot to mention, I am using webcamd and I'm in webcamd group. I know permissions are correct as mpv has no trouble playing webcam as the same user I'm running dino as.
Comment 8 Goran Mekić 2022-02-20 20:19:53 UTC
I reinstalled v4l2 gstreamer plugin from packages and now the error is different:

(dino:40077): libdino-CRITICAL **: 21:17:37.167: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

(dino:40077): rtp-CRITICAL **: 21:17:37.167: dino_plugins_rtp_video_widget_real_display_device: assertion 'media_device != NULL' failed

(dino:40077): xmpp-vala-WARNING **: 21:17:43.376: content_parameters.vala:165: Counterpart's preferred content type doesn't match any of our sent ones

(dino:40077): libdino-CRITICAL **: 21:17:43.391: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

(dino:40077): libdino-CRITICAL **: 21:17:43.391: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

** (dino:40077): CRITICAL **: 21:17:45.146: gst_video_frame_map_id: assertion 'info->height <= meta->height' failed
Comment 9 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-20 22:21:36 UTC
Could you please make sure all your ports are latest, at least the ones involved in Dino, esp. the gstreamer ones and their dependencies ?

It worked fine here when tried with both Dino, and Conversations behind the same NAT, when it Conversations crossed NAT, then there was issue.

Thanks!
Comment 10 Goran Mekić 2022-02-21 09:05:22 UTC
I updated ports from git and updated packages using portmaster -yaG. I still can't transmit my webcam video while I can receive it. The error message is the same:

(dino:7132): libdino-CRITICAL **: 10:02:15.105: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

(dino:7132): rtp-CRITICAL **: 10:02:15.105: dino_plugins_rtp_video_widget_real_display_device: assertion 'media_device != NULL' failed

(dino:7132): xmpp-vala-WARNING **: 10:02:21.842: content_parameters.vala:165: Counterpart's preferred content type doesn't match any of our sent ones

(dino:7132): libdino-CRITICAL **: 10:02:21.857: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

(dino:7132): libdino-CRITICAL **: 10:02:21.857: dino_plugins_media_device_get_display_name: assertion 'self != NULL' failed

** (dino:7132): CRITICAL **: 10:02:22.908: gst_video_frame_map_id: assertion 'info->height <= meta->height' failed
Comment 11 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-21 10:02:54 UTC
(In reply to Goran Mekić from comment #10)

I'll check it out this evening. Could you please also share the output of `pkg info' in the meantime ? It's fairly possible I just need to add more dependencies to the port.

Thanks!
Comment 12 Goran Mekić 2022-02-21 10:16:56 UTC
Created attachment 231984 [details]
pkg info
Comment 13 Ashish SHUKLA freebsd_committer freebsd_triage 2022-02-22 01:26:51 UTC
Could you share the output of following:

  $ gst-device-monitor-1.0 Video/Source

And does the following work for you:

  $ gst-launch-1.0 -v v4l2src device=/dev/video0 \! videoconvert \! gtksink

It should basically open a Gtk+ window displaying video from your webcam device /dev/video0 in real-time. 

Thanks!
Comment 14 Goran Mekić 2022-02-22 08:11:25 UTC
I do see webcam's video, and here is the output:

gst-device-monitor-1.0 Video/Source
Probing devices...


Device found:

	name  : HD Pro Webcam C920
	class : Video/Source
	caps  : video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)896, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)960, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)800, height=(int)600, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)864, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)800, height=(int)448, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)432, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        video/x-raw, format=(string)YUY2, width=(int)160, height=(int)90, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)1600, height=(int)896, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)960, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)800, height=(int)600, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)864, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)800, height=(int)448, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)432, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	        image/jpeg, width=(int)160, height=(int)90, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };
	properties:
		device.path = /dev/video0
		udev-probed = false
		device.api = v4l2
		v4l2.device.driver = uvcvideo
		v4l2.device.card = "HD\ Pro\ Webcam\ C920"
		v4l2.device.bus_info = usb-/dev/usb-/dev/usb
		v4l2.device.version = 332032 (0x00051100)
		v4l2.device.capabilities = 2225078273 (0x84a00001)
		v4l2.device.device_caps = 69206017 (0x04200001)
	gst-launch-1.0 v4l2src ! ...
Comment 15 Goran Mekić 2022-03-04 13:04:36 UTC
Can we release the patch as is? It already solves the problem with the audio calls, and there's possibility webcam is only a problem on this machine/cam.
Comment 16 commit-hook freebsd_committer freebsd_triage 2022-03-04 17:50:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d21befbec6881100a3a3258acea05d70019bdd3e

commit d21befbec6881100a3a3258acea05d70019bdd3e
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2022-03-04 17:44:11 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2022-03-04 17:49:13 +0000

    net-im/dino: Improve audio/video calling support

    Add couple more dependencies which were missing, but seem to be
    necessary for audio/video calls. Many thanks to Goran for helping
    test this.

    PR:             262055
    Reported by:    Goran Mekić <meka at tilda dot center>
    Tested by:      Goran Mekić <meka at tilda dot center>

 net-im/dino/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 17 Ashish SHUKLA freebsd_committer freebsd_triage 2022-03-04 17:56:11 UTC
(In reply to Goran Mekić from comment #15)

Sorry about that. I've committed the patch as is for now. Hopefully this is better than nothing, and will help other users.

I'll close this PR for now, since I'm not able to reproduce, or rather lack resources to reproduce it. If you figure out the problem on your side, or any other helpful data point, then feel free to re-open this PR, or let me know.

Thank you for your help with testing, and the report.
Comment 18 Ashish SHUKLA freebsd_committer freebsd_triage 2022-03-05 18:48:37 UTC
Created attachment 232270 [details]
dino diff

Hi,

Could you please try this diff ? It's been brought to my attention that I missed setting this. courtesy: bug #262355.

Thanks!
Comment 19 Goran Mekić 2022-03-05 19:48:27 UTC
No luck with this either, but as I see debug info listing VP9 as video I'm receiving from Conversations, I think this patch goes in the right direction.
Comment 20 Ashish SHUKLA freebsd_committer freebsd_triage 2022-03-05 20:17:59 UTC
(In reply to Goran Mekić from comment #19)

I wonder if it's a network problem on your side. By any chance, do you use outbound firewall on your computer/network ?

While a audio/video call is in progress in Dino, could you run following in bash compatible shell (requires lsof, and sudo packages installed): 


    lsof -n -F -p $(pgrep dino) |fgrep -A1 PUDP |sed -n -e 's/^n//p' |grep -v '^[[]' |awk -F: '{ print "(host "$1" and src port "$2") or " }' |xargs |sed -e 's/ or$//' |xargs sudo tcpdump -n -i igb0


Above code captures all IPv4 outbound UDP streams sent by dino. Following is an example excerpt from my side:

01:42:31.799988 IP 172.16.0.41.12131 > 172.16.0.235.45350: UDP, length 1410
01:42:31.799998 IP 172.16.0.41.12131 > 172.16.0.235.45350: UDP, length 1410
01:42:31.800008 IP 172.16.0.41.12131 > 172.16.0.235.45350: UDP, length 1015
01:42:31.803138 IP 172.16.0.41.54767 > 172.16.0.235.45513: UDP, length 182
01:42:31.823201 IP 172.16.0.41.54767 > 172.16.0.235.45513: UDP, length 182
01:42:31.833602 IP 172.16.0.41.12131 > 172.16.0.235.45350: UDP, length 1410
01:42:31.833620 IP 172.16.0.41.12131 > 172.16.0.235.45350: UDP, length 1410

The larger packets are video, and the smaller ones are audio. Do you see such streams on your side, assuming you're also on an IPv4 network ?

And in the Debug Info on the call screen do you see any video traffic going out (i.e. non-zero sent rate) ?

Lastly, I've following gstreamer ports installed: 

gstreamer1-1.16.2              multimedia/gstreamer1
gstreamer1-editing-services-1.16.2 multimedia/gstreamer1-editing-services
gstreamer1-libav-1.16.2        multimedia/gstreamer1-libav
gstreamer1-plugins-1.16.2_3    multimedia/gstreamer1-plugins
gstreamer1-plugins-a52dec-1.16.2 audio/gstreamer1-plugins-a52dec
gstreamer1-plugins-bad-1.16.2  multimedia/gstreamer1-plugins-bad
gstreamer1-plugins-chromaprint-1.16.2 audio/gstreamer1-plugins-chromaprint
gstreamer1-plugins-core-1.16   multimedia/gstreamer1-plugins-core
gstreamer1-plugins-dts-1.16.2  multimedia/gstreamer1-plugins-dts
gstreamer1-plugins-dvdread-1.16.2_2 multimedia/gstreamer1-plugins-dvdread
gstreamer1-plugins-gl-1.16.2_2 graphics/gstreamer1-plugins-gl
gstreamer1-plugins-good-1.16.2 multimedia/gstreamer1-plugins-good
gstreamer1-plugins-gtk-1.16.2  x11-toolkits/gstreamer1-plugins-gtk
gstreamer1-plugins-jpeg-1.16.2 graphics/gstreamer1-plugins-jpeg
gstreamer1-plugins-mpg123-1.16.2 audio/gstreamer1-plugins-mpg123
gstreamer1-plugins-ogg-1.16.2  audio/gstreamer1-plugins-ogg
gstreamer1-plugins-openh264-1.16.2_1 multimedia/gstreamer1-plugins-openh264
gstreamer1-plugins-opus-1.16.2 audio/gstreamer1-plugins-opus
gstreamer1-plugins-pango-1.16.2 x11-toolkits/gstreamer1-plugins-pango
gstreamer1-plugins-png-1.16.2  graphics/gstreamer1-plugins-png
gstreamer1-plugins-resindvd-1.16.2_2 multimedia/gstreamer1-plugins-resindvd
gstreamer1-plugins-soup-1.16.2 devel/gstreamer1-plugins-soup
gstreamer1-plugins-speex-1.16.2 audio/gstreamer1-plugins-speex
gstreamer1-plugins-srtp-1.16.2 net/gstreamer1-plugins-srtp
gstreamer1-plugins-theora-1.16.2 multimedia/gstreamer1-plugins-theora
gstreamer1-plugins-ugly-1.16.2 multimedia/gstreamer1-plugins-ugly
gstreamer1-plugins-v4l2-1.16.2_1 multimedia/gstreamer1-plugins-v4l2
gstreamer1-plugins-vorbis-1.16.2 audio/gstreamer1-plugins-vorbis
gstreamer1-plugins-vpx-1.16.2_1 multimedia/gstreamer1-plugins-vpx
gstreamer1-plugins-x264-1.16.2_3 multimedia/gstreamer1-plugins-x264
gstreamer1-vaapi-1.16.2_2      multimedia/gstreamer1-vaapi
gstreamer1-plugins-pulse-1.16.2 audio/gstreamer1-plugins-pulse

Could you install them, and see if they cause dino problem to be resolved on your side ?

Thanks!
Comment 21 Goran Mekić 2022-03-11 21:15:37 UTC
I just did "pkg upgrade" over these few days and it started working. No idea what changed, but I'm glad it did.
Comment 22 Ashish SHUKLA freebsd_committer freebsd_triage 2022-03-11 22:13:08 UTC
Marking as resolved.