Git Product home page Git Product logo

jitsi-hammer's Introduction

Note (February 2020)

Please note that this project has not been updated for a long time, hence it is not compatible with recent versions of Jitsi Meet and Jitsi Videobridge. The required effort to make it compatible seems substantial. See this discussion on the community forums

Jitsi-Hammer

A traffic generator for Jitsi Videobridge.

Jitsi-Hammer is a program that connects to a Jitsi-Meet conference, initiates the video conference management by Focus, creates fake users, and generates RTP traffic for these fake users.

Note that the hammer requires Java 1.8 because of a dependency (see pom.xml for details).

If you want to stream one of the Pcaps in the resources/ directory, you're going to need Git LFS support. You can download it from here.

How to use

You can run the program by using the jitsi-hammer.sh script:

./jitsi-hammer.sh <MANDATORY_OPTIONS> [OPTIONAL_OPTIONS]

The only MANDATORY_OPTION for now is :

-BOSHuri - the full URI to use for BOSH connection

The OPTIONAL_OPTIONS are :

-XMPPdomain <domain name used by the XMPP server>
-BOSHhost <hostname of the BOSH server>
-MUCdomain <domain name used for the MUC>
-help <display the usage and help of the program>
-focusJID <JID of the focus user, by default this is 'focus.' + XMPPdomain>
-room <name of the MUC room (default : TestHammer)>
-port <port number of the BOSH server (default: 80)>
-users <number of fake users to create (default: 1)>
-length <length of the run in seconds (default: 0)>
-ivf <path to an ivf file for the video streams>
-videortpdump <path to a rtpdump file containing VP8 RTP packets for the video streams>
-audiortpdump <path to a rtpdump file containing Opus RTP packets for the video streams>
-overallstats <enable the logging of the overall stats at the end of the run>
-allstats <enable the logging of all the stats collected during the run>
-summarystats <enable the logging of the summary stats(min,max,mean,standard deviation) from the stats collected during the run>
-statspolling <time (in seconds) between two polling of stats (default: 5sec)>
-credentials <filepath to a file containing users credentials>
-interval <time in milliseconds between adding of users (default: 2sec)>
-nostats <disable all stats (default: stats are enabled)>
-channelLastN <"channelLastN" video conference property for initiated video conference>
-adaptiveLastN <"adaptiveLastN" video conference property for initiated video conference>
-adaptiveSimulcast <"adaptiveSimulcast" video conference property for initiated video conference>
-openSctp <"openSctp" video conference property for initiated video conference>
-startAudioMuted <"startAudioMuted" video conference property for initiated video conference>
-startVideoMuted <"startVideoMuted" video conference property for initiated video conference>
-simulcastMode <"simulcastMode" video conference property for initiated video conference>

Options XMPPdomain , BOSHhost, port and MUCDomain, if specified, will override the ones retrieved from BOSHuri. By default, the BOSHuri's hostname is used as both BOSHhost and XMPPdomain, and MUCdomain is that hostname with conference. prefix, e.g. conference.meet.jit.si will be used as MUCdomain when accessing a BOSHuri "https://meet.jit.si/http-bind/" . The port setting defaults for 80 for non-secure BOSHuri, and respectively 443 will be used for HTTPS ones.

When the option -credentials is used, instead of loging in anonymously to the XMPP server, Jitsi-Hammer will login with the credentials contained in the file. The file must be encoded in UTF-8, and should be a list of "username:password" (the password and username are separeted by a ":") separated by newlines.

You must know that when -length N is given, if N <= 0, the run will never stop.

For the audio streams, if -audiortpdump file is not given, Jitsi-Hammer will generate silence.

For the video streams, if neither ````-ivf filenor-videortpdump file``` are given, Jitsi-Hammer will generate a fading from white to black to white...

What is IVF, and how to create IVF files

IVF is a simple video format described here (not official source). An IVF file basically just contains VP8 frames, with a fixed header for each.

IVF is more or less a toy format, generally used to test and debug VP8/VP9. But its simplicity makes it great to read.

You can create IVF from a webm file by usingmkvextract :

mkvextract tracks input_file.webm ID:output_file.ivf

with ID being the id of the VP8 track (generally 0, you can get its value by using mkvinfo input_file.webm.

Or you can also use ffmpeg :

ffmpeg -i file_input.webm -vcodec copy file_output.ivf

What is rtpdump, and how to create rtpdump files

rtpdump file is a binary file format, described here and here, used to record/dump and save RTP packets of a RTP stream.

Wireshark can create rtpdump files from RTP streams (if you decode them as RTP).
To do that, you first need to record with Wireshark an RTP stream, decode it as RTP, and then do the following :

  1. go the the Telephony menu
  2. go in the RTP submenu
  3. clic on Show All Streams
  4. select the stream you want to record
  5. clic on Save As and save the stream as a rtpdump file.

Resources available

In the resources directory, you can find :

  • an ivf file big-buck-bunny_trailer_track1_eng.ivf, extracted from the webm with the same name, that can be used with -ivf
  • the rtpdump file called rtp_opus.rtpdump containing Opus RTP packets (recorded from the silence generated by Jitsi-Hammer) that can be used with -audiortpdump
  • hammer-opus.rtpdump -- Bob Marley's "Hammer", recorded in a Jitsi call, with an opus target bitrate of 32kbps.
  • the rtpdump file called rtp_vp8 containing VP8 RTP packets (recorded from the video stream generated by Jitsi-Hammer with big-buck-bunny_trailer_track1_eng.ivf) that can be used with -videortpdump.

You can also find dtls10-cipher-suites-only.diff : it's a diff file used to patch older version of libjitsi to enable dtls. You don't need it.

Statistics files

Jitsi-Hammer can log all the streams stats that it can gets from the class MediaStreamStats. You can generate 3 types of stats :

  • All the stats : with -allstats you will log the stats of ALL the streams at each turn of loop.
  • The summary stats : with -summarystats you will log the summary stats like min/max/mean/standard deviation from all the stream stats at each turn of loop.
  • The overall stats : with -overallstats you will log the overall stats of the stream for the entire run (not just at each turn of loop).

The stats will be saved in JSON in a directory depending of your system :

  • in Linux it's in /path/to/your/home/.Jitsi-Hammer/stats/date_of_the_run
  • In Win7 it's in /path/to/your/user/directory/AppData/Roaming/stats/date_of_the_run

Java log

You can adjust the logging configuration of the JVM with the file ./lib/logging.properties .

For now it is set to only display at a WARNING level, but you can set "org.jitsi.hammer.level" to INFO if you want to print the INFO log of Jitsi-Hammer (but not libjitsi).

jitsi-hammer's People

Contributors

bbaldino avatar bgrozev avatar damencho avatar emcho avatar gpolitis avatar lyubomir avatar netmackan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jitsi-hammer's Issues

new video/audio rtpdump file

Hi,
I'm trying to generate a new set of video and audio rtpdump instead of badger-video.rtpdump and badger-audio.rtpdump.
I don't understand how I can generate these files.
could you tell me a guide to generate them?
Thank you very much

Jitsi Hammer failed to start

After clone and run this command: sudo ./jitsi-hammer.sh -BOSHuri https://mydomain/http-bind -XMPPdomain mydomain -BOSHhost domain -MUCdomain conference.mydomain -users 20 -ivf resources/big-buck-bunny_trailer_track1_eng.ivf -room 1

Hammer cannot start and the log show:
log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
log4j:WARN Please initialize the log4j system properly.
org.jivesoftware.smack.SmackException: Timeout reached for the connection to null:0.
at org.jivesoftware.smack.bosh.XMPPBOSHConnection.connectInternal(XMPPBOSHConnection.java:200)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:377)
at org.jitsi.hammer.FakeUser.start(FakeUser.java:396)
at org.jitsi.hammer.Hammer.startUsersAnonymous(Hammer.java:416)
at org.jitsi.hammer.Hammer.start(Hammer.java:342)
at org.jitsi.hammer.Main.main(Main.java:281)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:748)
Stopping Jitsi-Hammer...
Exiting the program...

Can you tell me how to fix that? Thank you so much.

Using jitsu-hammer without a hardware sound card

Hi Everybody!
Are there any configuration option in order to allow jitsi-hammer to run without a hardware sound card?

Using audiortpdump and videortpdump doesn't seems to help:

./jitsi-hammer.sh -audiortpdump ./ressources/rtp_opus.rtpdump -videortpdump ./ressources/rtp_vp8.rtpdump -users 5 -room TestHammer -MUCdomain conference.jitsi.mydomain.com -XMPPdomain jitsi.mydomain.com -XMPPhost jitsi.mydomain.com
...
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM dmix
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fda69b200f8, pid=3052, tid=140576567928576
#
# JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build 1.7.0_65-b32)
# Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libjnportaudio.so+0xd0f8]  Pa_GetDeviceInfo+0x58
...

Thanks for all!

Can't build on ubuntu 16.04, on master

After cloning the repo, and installed java:

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

then installed maven:
Apache Maven 3.3.9

I've got the following error running:
./jitsi-hammer.sh -BOSHuri https://www.exmple.com/http-bind/ -users 10

tee: /home/andrea/git/jitsi-hammer/.jitsi-hammer/log/output.log: No such file or directory
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.4.0/exec-maven-plugin-1.4.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:exec-maven-plugin:1.4.0: Plugin org.codehaus.mojo:exec-maven-plugin:1.4.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.4.0
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-jar-plugin:2.4: Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:2.4
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.18.1/maven-surefire-plugin-2.18.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-surefire-plugin:2.18.1: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.18.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.18.1

resulting in:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.867 s
[INFO] Finished at: 2016-08-18T13:39:07+00:00
[INFO] Final Memory: 11M/171M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'exec' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

Had to rollback to pre-maven commit to build the project (commit: 98300d9)

jitsi-hammer doesn't send any rtp traffic

Hi guys, I'm trying to make some stress tests on our new "jitsi-meet" server using jitsi-hammer, I'm starting it like this

./jitsi-hammer.sh -XMPPdomain example.com -XMPPhost example.com -MUCdomain conference.example.com  -users 20 -length 120 -audiortpdump resources/rtp_opus.rtpdump -videortpdump resources/rtp_vp8.rtpdump -summarystats 
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
service-unavailable(-1)

I can see all 20 users on server in prosody backend (c2s:show()), but I don't see any rtp traffic (with tcpdump or wireshark), jitsi-videobridge log is empty too. If I make a real session with web-cam and micro everything works fine. I'm using example rtp files from git.

jitsi-hammer very slow to send video

Hi,
I want to stress my environment with jitsi-hammer.
I'm seeing that the jitsi-hammer client is very slow to send the video stream. I mean that it starts after minutes to send the video.
How can I solve this issue?
Thank you very much.
Angelo

RTP packets are getting dropped because of read queue capacity issue

Hi guys,

I am currently running a jitsi hammer instance against a Jitsi platform setup. When I reach a certain number of users, my bandwidth starts to drop drastically based on the Videobridge statistics. The following message starts appearing while this happens:

WARNING: [5382] org.jitsi.impl.neomedia.rtp.translator.PushSourceStreamImpl.warn() Discarded an RTP packet because the read queue is full.

What is the process to increase the rtp queue capacity? Does this rtp queue depend on my machines' bandwidth limitations and/or my hardware limitations (RAM memory, etc.)?

If you need more details or further explanation, please let me know.

Thank you!

rtp to jitsimeet

Hi
I see that you solved my issue, is it possible to stream a /dev/video1 directly to jitsi-meet room ,
is there a simple linux command line application in order to do so, like using cvlc or gstreamer .
Thank you
Paolo

Build failure with "No plugin found" Err

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.467 s
[INFO] Finished at: 2019-02-06T21:25:11+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'exec' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

https/ssl problem

trying to to run hammer on an https service (such as https://meet.jit.si/http-bind)
throws an error that says that ssl certificate is not valid"

Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

took me some time but it seems that the bash file can create a certificate store using -u option with the url of jitsi server as it's value.

now here's the catch:
doing that still didn't fix the problem...

can anybody help??

10x,
Roey

I tested jitsi-hammer on openfire and have some problems.

I use windows, and I build jitsi-hammer, and copy the lib->native->windows to the jre lib.

In openfire, I create a room name TestHammer, but when I start the jitsi-hammer, then I open chrome, I find nothing happened, just black,.

parameters XMPPdomain, XMPPhost, ivffile, videortpdump and so on, that they are all configured, else I found the log 'audio":{ "ssrc":-1 , "DownloadJitterMs":NaN , "DownloadPercentLoss":NaN .....'

Can you give me some tips?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.