Skip to content

Commit

Permalink
pylivestream.glob => .fglob to not shadow stdlib glob
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 7, 2024
1 parent 1d6a90b commit b886027
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions File-Streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ python -m pylivestream.loopfile videofile site
Glob list of video files to stream:

```sh
python -m pylivestream.glob path site -glob glob_pattern
python -m pylivestream.fglob path site -glob glob_pattern
```

* `-glob` glob pattern of files to stream e.g. "*.avi". For [recursive globbing](https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob), do like "**/*.avi".
* `-glob` glob pattern of files to stream e.g. `*.avi`. For [recursive globbing](https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob), do like `**/*.avi`.
* `-loop` optionally loop endlessly the globbed file list
* `-shuffle` optionally shuffle the globbed file list
* `-image` if you have AUDIO files, you should normally set an image to display, as most/all streaming sites REQUIRE a video feed--even a static image.
Expand All @@ -29,15 +29,15 @@ python -m pylivestream.glob path site -glob glob_pattern
Example: all AVI videos in directory `~/Videos`:

```sh
python -m pylivestream.glob ~/Videos youtube -glob "*.avi"
python -m pylivestream.fglob ~/Videos youtube -glob "*.avi"
```

## stream endlessly looping videos

Example: all AVI videos in `~/Videos` are endlessly looped:

```sh
python -m pylivestream.glob ~/Videos youtube -glob "*.avi" -loop
python -m pylivestream.fglob ~/Videos youtube -glob "*.avi" -loop
```

## stream m3u8 playlist
Expand All @@ -49,7 +49,7 @@ m3u8 playlist [example](./Examples/playlist_m3u8.py)
Glob list of video files to stream. Suggest including a static -image (could be your logo):

```sh
python -m pylivestream.glob path site -glob glob_pattern -image image
python -m pylivestream.fglob path site -glob glob_pattern -image image
```

* `path` path to where video files are
Expand All @@ -59,17 +59,17 @@ python -m pylivestream.glob path site -glob glob_pattern -image image
Example: stream all .mp3 audio under `~/music` directory:

```sh
python -m pylivestream.glob ~/music youtube -glob "*.mp3" -image mylogo.jpg
python -m pylivestream.fglob ~/music youtube -glob "*.mp3" -image mylogo.jpg
```

Example: stream all .mp3 audio in `~/music` with an animated GIF or video clip repeating:

```sh
python -m pylivestream.glob ~/music youtube -glob "*.mp3" -image myclip.avi
python -m pylivestream.fglob ~/music youtube -glob "*.mp3" -image myclip.avi
```

or

```sh
python -m pylivestream.glob ~/music youtube -glob "*.mp3" -image animated.gif
python -m pylivestream.fglob ~/music youtube -glob "*.mp3" -image animated.gif
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ There are two ways to start a stream (assuming you've configured as per followin
Both do the same thing.

* command line
* python -m pylivestream.glob
* python -m pylivestream.fglob
* python -m pylivestream.screen
* python -m pylivestream.loopfile
* python -m pylivestream.screen2disk
Expand Down
6 changes: 3 additions & 3 deletions archive/visual_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main():
[
sys.executable,
"-m",
"pylivestream.glob",
"pylivestream.fglob",
"-y",
"-image",
str(fn),
Expand All @@ -57,11 +57,11 @@ def main():

print("1990s vector graphics with orchestra music (NO caption")
subprocess.check_call(
[sys.executable, "-m", "pylivestream.glob", "-y", "-image", str(MOVING), str(MUSIC), HOST]
[sys.executable, "-m", "pylivestream.fglob", "-y", "-image", str(MOVING), str(MUSIC), HOST]
)
# video
print("Looping video")
subprocess.check_call([sys.executable, "-m", "pylivestream.glob", "-y", str(VIDEO), HOST])
subprocess.check_call([sys.executable, "-m", "pylivestream.fglob", "-y", str(VIDEO), HOST])
# %% Screenshare
print("Screenshare + microphone")
subprocess.check_call([sys.executable, "-m", "pylivestream.screen", "-y", HOST])
Expand Down
2 changes: 1 addition & 1 deletion src/pylivestream/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .utils import meta_caption
from .base import FileIn, Microphone, SaveDisk, Screenshare, Camera, Livestream

__version__ = "2.0.1"
__version__ = "2.1.0"
2 changes: 1 addition & 1 deletion src/pylivestream/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pathlib import Path

from .base import FileIn, Microphone, SaveDisk, Camera
from .glob import stream_files
from .fglob import stream_files
from .screen import stream_screen

__all__ = [
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pylivestream/tests/test_filein.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_script():
[
sys.executable,
"-m",
"pylivestream.glob",
"pylivestream.fglob",
str(fn),
"localhost",
str(ini),
Expand Down

0 comments on commit b886027

Please sign in to comment.