jibri icon indicating copy to clipboard operation
jibri copied to clipboard

Jibri Video Issue

Open nightstryke opened this issue 6 years ago • 39 comments

So I have an issue with the video, I'm not sure where to look to fix this issue, but when I live stream to youtube. Jibri only sends partial video, it cuts half of the video off to the right. (see image below) Another problem is the video is recording in 1280x738 instead of 1280x720.

problem

Anyone have an idea of how I can go about trying to fix this problem?

nightstryke avatar May 15 '18 21:05 nightstryke

This looks a little to me like the issues we had when we weren't running with a window manager. We ended up using icewm as a lightweight windowmanager to assist both chrome and ffmpeg to play nicely in full-screen modes. Are you running a window manager, or just launching chrome directly into X11?

aaronkvanmeerten avatar May 15 '18 21:05 aaronkvanmeerten

@aaronkvanmeerten I'm doing everything via command line in a vmware vm 4 vcpus and 8gb of ram. I've followed the install instructions to the best of my abilities, if there were more configurations that I needed to do that I wasn't aware of they were not listed in the install instructions. So as far as i know whatever the jibri package from the unstable repository auto-installed is on my system.

nightstryke avatar May 15 '18 21:05 nightstryke

@bbaldino can you weigh in about why ffmpeg might be recording 1280x738? We haven't tested this in VMWare so it may be something to do with how it handles video devices (even the dummy X11 one we're using)?

This is an interesting one and I don't have a good answer yet, but I'll keep thinking on it too, and if I get vmware set up I can try to duplicate as well.

aaronkvanmeerten avatar May 15 '18 21:05 aaronkvanmeerten

No idea on the weird resolution, we tell ffmpeg to do 720.

bbaldino avatar May 15 '18 21:05 bbaldino

Alright apparently the 1280x738 isn't a bug, it's YouTube that does that to videos streamed to YouTube. So ignore that part. The cutoff of the video is the major problem though.

nightstryke avatar May 15 '18 22:05 nightstryke

can you load an interactive desktop session or something to get more information on the cutoff? it sounds like something at a layer below selenium, we tell chrome to maximize.

bbaldino avatar May 20 '18 05:05 bbaldino

@bbaldino Unfortunately no. I don't have a gui installed on the machine so everything is done via command line/shell.

nightstryke avatar May 22 '18 03:05 nightstryke

there must be some x server or something on this machine, right? chrome must be launching on some display

bbaldino avatar May 22 '18 04:05 bbaldino

@bbaldino Since i'm running Ubuntu 16.04 is there a specific gui I can install to get around this problem? Like gnome, kde, or openbox that wouldn't interfere?

nightstryke avatar May 22 '18 05:05 nightstryke

Your best route for success will be to follow the installation we lay out in the README. This uses ubuntu and icewm. You can read through the pre-reqs and then install Jibri via the debian package (which will install the icwem config file).

bbaldino avatar May 22 '18 17:05 bbaldino

@bbaldino Yeah I followed that and that's what got me the problem in the first post. Which is why I was asking if using a gui would help try and resolve the error, but I guess I'm the only one who's ever had this issue then.

nightstryke avatar May 22 '18 17:05 nightstryke

Ah I see. What's your /home/jibri/scripts/xorg-video-dummy.conf look like?

We might also be able to launch ffmpeg directly to capture the display which could give you a peek at things. The command to run manually is below. This captures from display 0 and streams it to a youtube url (will have to paste in your own youtube stream key). Make sure you run it as the jibri user.

ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i hw:0,1,0 -acodec aac -strict -2 -ar 44100 -c:v libx264 -preset veryfast -maxrate 2976k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f flv rtmp://a.rtmp.youtube.com/live2/YOUR_STREAMKEY_HERE

bbaldino avatar May 22 '18 17:05 bbaldino

@bbaldino I'm running ubuntu server 16.04, does that matter?

nightstryke avatar May 22 '18 17:05 nightstryke

@nightstryke I'm not sure, server installs typically come with fewer default-installed packages I think--but maybe it's also affecting the X environment in some way since server installs wouldn't normally use that. Could you try with the desktop 16.04 version?

bbaldino avatar May 22 '18 17:05 bbaldino

@bbaldino I could, could you direct me as to which desktop 16.04 image you have used to get Jibri running properly?

nightstryke avatar May 22 '18 17:05 nightstryke

I'd think it'd be the desktop image here but @aaronkvanmeerten could say for certain.

bbaldino avatar May 22 '18 17:05 bbaldino

@bbaldino Correct me if I'm wrong, but the 64-bit desktop image right? Not the 32-bit. @aaronkvanmeerten Can you clarify for us?

nightstryke avatar May 22 '18 17:05 nightstryke

We are using 16.04 server, based initial on an AWS AMI of Xenial server. The AMI ID is ami-5c66ea23, and contains the basic Xenial server and nothing else. So no need for a desktop install, server should do fine. I suggest following brian's ideas around using ffmpeg to record your desktop directly, and see what results from that.

aaronkvanmeerten avatar May 22 '18 17:05 aaronkvanmeerten

Ah thanks @aaronkvanmeerten. So much for that path then, but yeah let's give the ffmpeg thing a shot.

bbaldino avatar May 22 '18 18:05 bbaldino

@bbaldino Ok so I ran the ffmpeg line like you said. Using my youtube stream key. Got this as the output: https://pastebin.com/0ufmK9BX

Here's my xorg conf: https://pastebin.com/wrAdvyHE But it's in /etc/jitsi/jibri not in the jibri user home folder.

nightstryke avatar May 22 '18 20:05 nightstryke

Not sure why that is happening, do you have a .asroundrc in /home/jibri? But either way, we don't need audio for this test. Try this command, I think this should do it without capturing audio:

ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -c:v libx264 -preset veryfast -maxrate 2976k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f flv rtmp://a.rtmp.youtube.com/live2/YOUR_STREAMKEY_HERE

bbaldino avatar May 22 '18 21:05 bbaldino

@bbaldino Yes that file is present. Results of that command: https://pastebin.com/DpKaAV4Z

nightstryke avatar May 22 '18 22:05 nightstryke

So how did it look in youtube?

bbaldino avatar May 22 '18 23:05 bbaldino

@bbaldino It didn't, youtube said I was live for a second and then said I was offline eventhough I was clearly still connected.

nightstryke avatar May 22 '18 23:05 nightstryke

Ok, let's try this. Record it to a file instead of youtube:

ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -c:v libx264 -preset veryfast -maxrate 2976k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f mp4 /tmp/recordings/test.mp4

bbaldino avatar May 23 '18 00:05 bbaldino

@bbaldino Alright here's the text results: https://pastebin.com/pXPbidx1 Visual Results: Video was black with nothing being shown.

nightstryke avatar May 24 '18 20:05 nightstryke

Hello guys, I've reached the state were @nightstryke is seems that there is no much more info on the matter, Here the versions I have running,

  • *buntu Xenial
  • Google Chrome - 68.0.3440.84
  • ChromeDriver - 2.41.578700
  • jibri - 5.0.57-1
  • icewm - 1.3.8+githubmod+20150914+fa3fdef-2

@bbaldino Seems like xorg-video-dummy.conf (md5sum) has moved to,

095543e2c3474de2064d9aeb2b6b1e0d /etc/jitsi/jibri/xorg-video-dummy.conf

The content is, https://paste.ubuntu.com/p/ZZBCZxTFyN/ And for icewm:

cat /home/jibri/.icewm/preferences 
ShowTaskBar = 0

Thanks for your attention :-) Cheer!

Ark74 avatar Aug 06 '18 14:08 Ark74

@Ark74 Thank you, so now you also know that there is an issue!

nightstryke avatar Aug 06 '18 16:08 nightstryke

@bbaldino hi ,bro , i have created a new issus #142 about jibri and SIP server ,because i have found your docs in repo, could you give more detail about it ? thanks.

fuqiangleon avatar Aug 14 '18 07:08 fuqiangleon

@nightstryke do you keep constant updates? Seems like on the latest update this is already solved.

  • Google Chrome 68.0.3440.106*
  • ChromeDriver 2.41.578700
  • jibri - 5.0.57-1
  • jitsi-meet 1.0.3289-1

Regards.

Ark74 avatar Aug 16 '18 18:08 Ark74