Git Product home page Git Product logo

pulseshitter's Introduction

pulseshitter

License

Screenshot of pulseshitter

pulseshitter is a shitty solution to a shitty problem.

you see, it all started back in 2015, when discord announced discord, an instant messaging social platform for gamers, until they decided that it was for everyone too.

however, they clearly don't support everyone because they hate us blessed linux users. to this day, discord still doesn't support sharing audio via screen sharing on linux.

what is this?

this overengineered project is a workaround to make it possible to share audio via a bot. it does not pipe your audio through your microphone. this has two advantages:

  • other people can mute your stream without muting you
  • the audio is stereo (WIDE)

features

  • shits your audio into a voice channel
  • based text-based user interface
  • automatically reconnects to an application when parec stops streaming it (it does that a lot)
  • cool good sound meter™️
  • follows you around so you can always bother your friends
  • says fuck you to discord (fuck you discord)
  • 🚀 blazingly fa--

caveats

  • you need a bot in a server to use it
  • linux audio sources are very inconsistent so it's not guaranteed it will reconnect properly, or even show a meaningful name, but you can always just select the app you want to stream again

usage

prerequisites

download latest release and run the binary in your terminal. you can also add it to path for easy access.

./pulseshitter

faq (you)

Is this a joke?

Parts of this README, yes. The project itself, no. It's actually something I worked really hard on and it is actually a successor to pulsecord which my friend was using. It had some issues, and that's what led to this project.

Why can't I stream Spotify?

Spotify streaming is disabled by default due to me not wanting to get in trouble for distributing a binary that allows you to bypass the measures Discord has in place to stop you from streaming Spotify through their service.

You can enable it by compiling the project yourself with the ALLOW_SPOTIFY_STREAMING environment variable set to true.

Are you open to suggestions/bug reports?

Yes. Please make a GitHub issue if you want to report a bug or suggest a feature.


build

prerequisites

  • rust
  • pulseaudio / pipewire
  • libopus

compile it by typing this in your terminal:

cargo build --release

then you're done (wow!)

license

MPL-2 license (very original do not steal)

pulseshitter's People

Contributors

enitoni avatar crawron avatar intquant avatar thehamester avatar lyessaadi avatar speak2erase avatar

Stargazers

 avatar J avatar  avatar  avatar  avatar Bence T. avatar Damian Dorosz avatar Felipe Silva avatar Jothi Prasath avatar Arts avatar Angelo GERARD avatar Hamed Mahmoudkhani avatar MrCatBoss avatar Anton avatar Chase Taylor avatar Asoji avatar Siavash Samadi avatar Maher avatar  avatar Siloé Garcez avatar Gabriel Tremeschin avatar Tudor Andrei avatar Nonne avatar  avatar  avatar  avatar Yanis El Beilk avatar  avatar Beatriz avatar Miguilim avatar Guilherme avatar 网络男孩 avatar Luan Simões avatar Celesian avatar  avatar  avatar Jakob Bowyer avatar Dsinkerii avatar  avatar Alphara avatar lucasoskorep avatar Carlos Eduardo Magalhães avatar Risa avatar  avatar TrainDoctor avatar AnnsAnn✨ avatar Teki avatar Jochen Kupperschmidt avatar Patrick avatar MothWaves avatar  avatar Thomas Li avatar Navinda Dissanayake avatar Samuel Hammersberg avatar Rakarake avatar Zihad avatar  avatar Lachlan Schilling avatar Andrew avatar  avatar TimePath avatar Sevu avatar Blooym avatar Tanza avatar Jonathan Gorman avatar José Chu avatar Petar Vasilev avatar Reinold Rojas avatar nulldomain avatar Carlos Díaz avatar jannik avatar  avatar Marvin avatar Futuremapper avatar Caoimhe avatar kleines Filmröllchen avatar RGBCube avatar Weronika avatar  avatar Jackson_57 avatar Ryan J. Gray avatar David Krauthamer avatar pengeg avatar Denis avatar François Lecomte avatar Abhiraj Shourya avatar  avatar  avatar Aayush Paurana avatar Dylan Miller avatar  avatar Glyphli avatar  avatar Maxime Louet avatar Kayla Firestack avatar cheetah.cat avatar Bell avatar Alphie avatar Alberto avatar Luis Quiñones avatar

Watchers

 avatar Paul Reitz avatar Kostas Georgiou avatar  avatar

pulseshitter's Issues

Packaging Request for Arch Linux AUR

Would you be interested in packaging this for the AUR? If not, I could give it a try and mirror the PKGBUILD in a public repository if you'd like.

Guilded integration

As shitty Roblox knockoff to Discord that Discord "borrows" features from sometime, was wondering how difficult it'd be to do this but with Guilded. It has a bot api now and a similar problem.

Latency from Parec

Unsure why this is, but after 21cf835 Parec now has a latency of up to several seconds.

Previous attempts to fix this has failed, and I am not sure what causes this issue.

Improve source restoration

Currently, there is an issue where restoring a source will often result in it restoring an older source, because it was the best match, before the relevant one is available again. This race condition makes it harder to reliably find the right source.

It might be a good idea to do some sort of diffing and check only incoming new sources on each check.

Rust panicking at startup

I've tried both building from source and trying the released binary and they both spit this following error message with the full log backtrace :

$ RUST_BACKTRACE=full ./pulseshitter
thread 'main' panicked at 'parses pactl output: Error("EOF while parsing a value", line: 1, column: 0)', src/audio/pulse.rs:645:69
stack backtrace:
   0:     0x5597f6e0b800 - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x5597f6e0b800 - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5597f6e0b800 - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x5597f6e0b800 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x5597f69750be - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x5597f6ddf734 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x5597f6e0e10f - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x5597f6e0e10f - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x5597f6e0dd0f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x5597f6e0eda8 - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x5597f6e0eda8 - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x5597f6e0e864 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  12:     0x5597f6e0e7c6 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x5597f6e0e7b1 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x5597f686c7e2 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  15:     0x5597f686cb72 - core::result::unwrap_failed::hdff5465d74574b44
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
  16:     0x5597f6922c09 - pulseshitter::audio::pulse::pactl::Sink::default::h287051e7d64185d4
  17:     0x5597f694d2da - pulseshitter::main::h5154bd187a8d34bd
  18:     0x5597f68a1c43 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0de8cc732860ed40
  19:     0x5597f695a689 - main
  20:     0x7fa40333820c - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  21:     0x7fa4033382bc - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:381:3
  22:     0x5597f6891d55 - _start
  23:                0x0 - <unknown>

Anything that I'm missing from the installation instructions ?

pactl can return a malformed json, resulting in a panic

In case your locale happens to use "," instead of "." as a decimal separator, pactl tends to return a malformed json, leading to a panic

thread 'main' panicked at 'parses pactl output: Error("key must be a string", line: 1, column: 438)', src/audio/pulse.rs:643:69

This can be circumvented by starting pulseshitter like this

LC_NUMERIC=C ./pulseshitter

It actually has been already fixed in here 11 months ago, but obviously it's way too recent of a fix to be included in some distros.

PulseAudio 15 compatibility

Void Linux currently does not have PulseAudio 16, which seems to not like the flag --format=json:

λ pactl --format=json list sink-inputs
pactl: unrecognized option '--format=json'

causing the following error:

λ pulseshitter
thread 'main' panicked at 'parses pactl output: Error("EOF while parsing a value", line: 1, column: 0)', src/audio/pulse.rs:645:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Compatibility with 15 would be highly appreciated, as I currently have no way of upgrading it (PulseAudio binaries have a dependency on systemd, which Void Linux does not have) (there is a closed (??) pull request to update PulseAudio to 16. I do not know why it was closed)

Pulseshitter streams the microphone when the process closes its sink

Hello !

We have that annoying issue with games which closes their audio sink when using pulseshitter, either by closing the game or because the game itself just stops playing sounds and closes its sink when it does. When those games do that, pulseshitter begins to stream the microphone's audio creating annoyance for everyone in voice chat.

Although, I've noticed that this is sometimes inconsistent ? I don't know exactly what triggers that, but, if pulseshitter could avoid switching to the microphone, or could try to only capture audio from a single process, and just not stream anything when this process closes its sink, and restreams it when that process reopens a sink, that would be great !

Examples to try to reproduce this are Firefox or the Henry Stickmin Collection.

The process also appears in yellow when that happens for some reason.

Chromium 123 added support for soundsharing on linux.

Hello!

Well, title, the shitty problem now has an actual not-shitty solution. The real issue? Getting electron to support it!

No particular request here, just curious if you guys are aware of the situation and if you could share any plans with us.

Even if electron is updated to support it btw I doubt the app developers will bother updating electron version.

Latency and Time elapsed not working

It doesn't make this nice script unusable, but still butgs me out. the Latency and Time display in the Audio section of the CLI don't seem to chnage, at all. Otherwise, this works perfectly fine.
image

CPU: quad core AMD Ryzen 3 3200G with Radeon Vega Graphics (-MCP-)
speed/min/max: 2862/1400/3600 MHz Kernel: 6.2.12-1-cachyos-tt x86_64 Up: 47m
Mem: 3947.3/15921.6 MiB (24.8%) Storage: 2.38 TiB (11.5% used) Procs: 269
Shell: fish inxi: 3.3.26

Any way to reconfigure for a new bot?

I was testing this on my alt account but I'd like to set it up again with my main and can't figure out how to do that

edit: nevermind, i found the config file

Strange Cutting Out When Streaming Spotify

I compiled pulseshitter so I can listen with friends. It works fine for most of my friends but for one user it cuts out constantly. Has anyone else experienced this or have any suggestions on what might be causing this? I have a feeling it must be his network, but he can hear everyone else in the call fine and streaming other applications works fine. Thanks!

Just wanted to say thanks

Just wanted to say thanks for this project, everything else I tried was useless or required unsafe/insecure workarounds.

Thanks

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.