Code Monkey home page Code Monkey logo

showroom's Introduction

Showroom Live Watcher

Python 3.5+ License: MIT

Known Issues

  1. Most of the help text is outdated (e.g. --noisy is required for it to print to the console at all)
  2. Most of the instructions below are also outdated. (Usage and Installation still work but they are missing a lot of information.)
  3. pyyaml is not in requirements.txt (needed for config files)
  4. config file format is not fixed

Usage

Basic usage remains the same as previous versions, except that --all is once again not the default mode. To run the script and download all streaming rooms to the data directory (by default ~/Downloads/Showroom) enter:

python showroom.py --all

(Using the showroom virtual environment if it was configured.)

To download only specific members' rooms, use:

python showroom.py "Member Name" ["Another Member Name" ...]

To set a different data directory, use:

python showroom.py --data-dir <data directory> [--all or "Member Name"]

For additional options, type:

python showroom.py --help

Or take a gander at the start.sh script.

Installation

Requires FFmpeg, Python 3.5+, and the Python libraries requests, websocket-client, and pyyaml

1. Install ffmpeg

Either download prebuilt binaries from the FFmpeg website or your distro's package manager, or compile it from source. If you do choose to compile it yourself (unnecessary for this script) you must use the --enable-librtmp build flag. It is also highly recommended to use --enable-openssl in addition to the codecs suggested in the FFmpeg compilation guide. Each requires the relevant system libraries (librtmp, openssl, etc.) to be installed before building.

Libav will not be supported.

Currently this script does not respect user defined executable paths (e.g. ~/.local/bin) so only ffmpeg executables located in the system path will be used. This will change in the future, and an option to specify the location of ffmpeg will be added.

2. Install Python 3.5+

Download and install from the Python website or your distro's package manager. Python 3.6.x is strongly recommended, both because future versions of the script may make use of the new features added in 3.6, and for speed improvements.

3. (Optional) Setup a virtual environment

Using a virtual environment rather than installing packages into your system environment is also strongly recommended. The recommended tool for this is virtualenvwrapper, although many other alternatives exist. Follow the Installation Guide through to the Quick-Start section, then set up a virtual environment for Showroom using:

mkvirtualenv showroom --python=python3

It will be automatically activated after creation, but to activate it again in the future, use:

workon showroom

and deactivate with:

deactivate

All calls to pip beyond this point should be made with the virtual environment active.

4. Download Showroom Live Watcher

Clone the repository using git:

git clone https://github.com/wlerin/showroom.git

Or use the Download as ZIP button above.

5. Install Required Python Packages

All required packages can be installed by running:

pip install -r requirements.txt

in the showroom directory.

6. (Optional) Install index_maker Dependencies

Used by by index_maker to generate new Room entries. (index_maker is not yet included in this repository)

pip install beautifulsoup4

Fast XML parser used by BeautifulSoup (but not required for it). Needs the libxml2 and libxslt C libraries installed.

pip install lxml

Configuration (EXPERIMENTAL)

Showroom can read its configuration from a file, by default called "showroom.conf", located in one of the following locations:

Mac OS X:     ~/Library/Application Support/Showroom/
Unix:         ~/.config/Showroom/
Win 7+:       C:\Users\<username>\AppData\Local\Showroom\

Technically you can then define a different config directory, but this does nothing. You can also start the script with the --config option to manually specify a config file. The config file must be formatted in either JSON or, if PyYAML was installed, YAML.

Sample YAML Config File:

directory:
    data: null  # ~/Downloads/Showroom
    output: "{data}"
    index: index
    log: null
    config: null
    temp: "{data}/active"
file:
    config: "{directory.config}/showroom.conf"
    schedule: "{directory.data}/schedule.json"
    completed: "{directory.data}/completed.json"
throttle:
    max:
        downloads: 80
        watches:   50
        priority:  80
    rate:
        upcoming: 180.0
        onlives:    7.0
        watch:      2.0
        live:      60.0
    timeout:
        download:  23.0
ffmpeg:
    logging: false
filter:
    all: false
    wanted: []
    unwanted: []
feedback:
    console: false
    write_schedules_to_file: true

All fields are optional and will be filled in with default values if omitted or set to null. (In fact, the values given here are default values, except where the defaults require further processing.) If necessary, other fields can be referenced using "{key[.subkey]}" syntax, but be careful to avoid recursive references. I.e. don't set config to "{data}" and data to "{config}". References will be resolved either "locally" (e.g. "{data}") or from the outermost scope (e.g. "{directory.data}"). Using these references for non-string values is not yet supported.

TODO: description of config fields

New Data Files

Several new data files are now stored in the data directory.

schedule.json

The script now tracks all scheduled and live rooms (whether or not they are being downloaded) and prints information about them to a file called "schedule.json", where they can be read by other programs. The file contains a JSON array, where each item is a JSON object containing the following fields:

{
   "name": "Member Name",
   "live": true | false,
   "status": "scheduled" | "watching" | "live" | "downloading",
   "start_time": "YYYY-MM-DD HH:mm:ss",
   "streaming_urls": { "hls_url": "http(s)://...",
                      "rtmp_url": "rtmp://..."},
   "room": {...} # same as the room data stored in index files
}

More fields may be added in the future.

filter.json

TODO

completed.json

TODO

Archive Checks

TODO

showroom's People

Contributors

lalomartins avatar skeith avatar tamagoyanki avatar wlerin 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

showroom's Issues

unable to set temp directory when save dir and temp dir not in same partition, because os.replace doesn't support

unable to set temp directory when save dir and temp dir not in same partition, because os.replace doesn't support.

Exception in thread Watcher-3---(--):
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/--/workspace/github/showroom/showroom/core.py", line 487, in run
    self.download.wait()
  File "/home/--/workspace/github/showroom/showroom/downloader.py", line 187, in wait
    self.move_to_dest()
  File "/home/--/workspace/github/showroom/showroom/downloader.py", line 269, in move_to_dest
    destpath = self._move_to_dest(self.outfile, self.tempdir, self.destdir)
  File "/home/--/workspace/github/showroom/showroom/downloader.py", line 287, in _move_to_dest
    os.replace(srcpath, destpath)
OSError: [Errno 18] Invalid cross-device link: '/tmp/active/200621 Showroom - Oshi 180426.mp4' ->
   '/home/--/Downloads/Showroom/2020-06-21/Oshi/200621 Showroom - Oshi 180426.mp4'

i'm using seperated partitions and wish to set temp dir on /tmp on sda1 and save dir on /home on sdb1, but i couldn't do that, cuz of what i wrote above.
hope to be changed shutil.move rather than os.replace, then it will be fixed i think, if you don't mind, please.

[urgent] HLS fallback support

On September 17th, Showroom will end support for the Flash player. This will most likely also kill the rtmp endpoint, and may change other aspects of the API.

In order to be prepared for this, it is crucial to implement a working HLS download option, ideally one that will be automatically activated if/when the RTMP stream stops being available.

Previous attempts at doing so either using FFmpeg or pure Python were unstable, unreliable, and consumed too many resources. May be necessary to investigate an asynchronous solution.

About live recording

When recording the live broadcast, sometimes the live broadcast suddenly stops. After the live broadcast is resumed, only the video part before the live broadcast stop can be recorded, and the resumed video part cannot continue to be recorded. However, the audio will continue to be recorded. Is there any solution?

Connection to www.showroom-live.com timed out.

Sorry to bother you. Download videos works but it shows connection error, i don't know how to fix it.
IP:French/China
Ubuntu 16.04 server/Windows 7
Python 3.6.2
ffmpeg
root:/home/showroom# python3.6 showroom.py
Show (S)chedule, Show (D)ownloads, Show (L)inks, (Q)uit
Current Time is 18:18
Scheduling Sakaki Miyu for 19:00
Watching Nishikawa Rei's Showroom
Watching Nara Miharu's Showroom
Downloading Nishikawa Rei's Showroom
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Max retries exceeded with url: /api/live/onlives (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9df0b928d0>, 'Connection to www.showroom-live.com timed out. (connect timeout=3.0)'))
Retrying in 0.5 seconds...
Downloading Nara Miharu's Showroom
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Read timed out. (read timeout=3.0)
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Max retries exceeded with url: /api/live/onlives (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9debb60518>, 'Connection to www.showroom-live.com timed out. (connect timeout=3.0)'))
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Max retries exceeded with url: /api/live/onlives (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9df0334dd8>, 'Connection to www.showroom-live.com timed out. (connect timeout=3.0)'))
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Max retries exceeded with url: /api/live/onlives (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9df0334978>, 'Connection to www.showroom-live.com timed out. (connect timeout=3.0)'))
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Max retries exceeded with url: /api/live/onlives (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9df0334fd0>, 'Connection to www.showroom-live.com timed out. (connect timeout=3.0)'))
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/onlives failed: HTTPSConnectionPool(host='www.showroom-live.com', port=443): Read timed out. (read timeout=3.0)
Retrying in 1.0 seconds...

"websocket" required for newer version of python user

I believe due to the version update of python3 (Not really sure), user should install manually "websocket-client" which is not described in your read.md

I tried several times with "websocket" (not websocket-client) it gives error :

[NameError: name 'ABNF' is not defined]

However, "websocket-client" works perfectly for my system

Therefore, I suggest to add "websocket-client" on requirement.txt or add description on read.md

Thanks!

Downloads mysteriously fail

There are at least four different observed failed states:

  1. File is created, but contains no video data, and is usually small (under 50 KiB)
  2. File is created, but contains only black frames at 540p
  3. File is created, but recording is severed partway through and the result is unplayable
  4. No file is created, but log is filled with "HandleCtrl, Ping ..."

The last seems to be caused by the server failing to respond and ffmpeg failing to timeout.

Fail to mux segments

image

image

Since June 27, all the recorded videos have encountered the following issue: all the segments are packaged into separate .mp4 files that cannot be played.

Log:

07-22 08:44:34 showroom.session DEBUG    ShowroomLiveController:
ConnectionError while accessing https://www.showroom-live.com/api/live/onlives: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
07-22 08:44:34 showroom.session DEBUG    ShowroomLiveController:
Retrying in 2 seconds...
07-22 20:31:40 showroom.core INFO     ShowroomLiveController:
Kawata Hina scheduled for 22:00
07-22 20:31:40 showroom.core DEBUG    ScheduleWriter:
Writing schedules to file
07-22 20:58:00 showroom.core INFO     Watcher-15-Kawata Hina:
Watching Kawata Hina
07-22 21:00:34 showroom.core INFO     Watcher-15-Kawata Hina:
Kawata Hina is now live
07-22 21:00:34 showroom.core DEBUG    ScheduleWriter:
Writing schedules to file
07-22 21:00:34 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
[{'is_default': True, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804.m3u8', 'type': 'hls', 'id': 2, 'label': 'original quality', 'quality': 1500}, {'is_default': True, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/source/chunklist.m3u8', 'type': 'lhls', 'id': 1, 'label': 'original quality (low latency)', 'quality': 1000}, {'is_default': False, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804_l.m3u8', 'type': 'hls', 'id': 4, 'label': 'low quality', 'quality': 150}, {'is_default': False, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/low/chunklist.m3u8', 'type': 'lhls', 'id': 3, 'label': 'low quality (low latency)', 'quality': 100}]
07-22 21:00:34 showroom.downloader WARNING  Watcher-15-Kawata Hina:
Using HLS downloader for Hinatazaka46 2nd Gen Kawata Hina
07-22 21:00:46 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
File transfer: ~/sr/active/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220034.mp4 -> ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220034.mp4
07-22 21:00:46 showroom.downloader INFO     Watcher-15-Kawata Hina:
Completed ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220034.mp4
07-22 21:00:46 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
[{'is_default': True, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804.m3u8', 'type': 'hls', 'id': 2, 'label': 'original quality', 'quality': 1500}, {'is_default': True, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/source/chunklist.m3u8', 'type': 'lhls', 'id': 1, 'label': 'original quality (low latency)', 'quality': 1000}, {'is_default': False, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804_l.m3u8', 'type': 'hls', 'id': 4, 'label': 'low quality', 'quality': 150}, {'is_default': False, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/low/chunklist.m3u8', 'type': 'lhls', 'id': 3, 'label': 'low quality (low latency)', 'quality': 100}]
07-22 21:00:54 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
File transfer: ~/sr/active/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220046.mp4 -> ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220046.mp4
07-22 21:00:54 showroom.downloader INFO     Watcher-15-Kawata Hina:
Completed ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220046.mp4
07-22 21:00:55 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
[{'is_default': True, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804.m3u8', 'type': 'hls', 'id': 2, 'label': 'original quality', 'quality': 1500}, {'is_default': True, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/source/chunklist.m3u8', 'type': 'lhls', 'id': 1, 'label': 'original quality (low latency)', 'quality': 1000}, {'is_default': False, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804_l.m3u8', 'type': 'hls', 'id': 4, 'label': 'low quality', 'quality': 150}, {'is_default': False, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/low/chunklist.m3u8', 'type': 'lhls', 'id': 3, 'label': 'low quality (low latency)', 'quality': 100}]
07-22 21:01:03 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
File transfer: ~/sr/active/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220055.mp4 -> ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220055.mp4
07-22 21:01:03 showroom.downloader INFO     Watcher-15-Kawata Hina:
Completed ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220055.mp4
07-22 21:01:04 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
[{'is_default': True, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804.m3u8', 'type': 'hls', 'id': 2, 'label': 'original quality', 'quality': 1500}, {'is_default': True, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/source/chunklist.m3u8', 'type': 'lhls', 'id': 1, 'label': 'original quality (low latency)', 'quality': 1000}, {'is_default': False, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804_l.m3u8', 'type': 'hls', 'id': 4, 'label': 'low quality', 'quality': 150}, {'is_default': False, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/low/chunklist.m3u8', 'type': 'lhls', 'id': 3, 'label': 'low quality (low latency)', 'quality': 100}]
07-22 21:01:12 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
File transfer: ~/sr/active/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220104.mp4 -> ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220104.mp4
07-22 21:01:12 showroom.downloader INFO     Watcher-15-Kawata Hina:
Completed ~/sr/2024-07-22/Hinatazaka46/240722 Showroom - Hinatazaka46 2nd Gen Kawata Hina 220104.mp4
07-22 21:01:13 showroom.downloader DEBUG    Watcher-15-Kawata Hina:
[{'is_default': True, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804.m3u8', 'type': 'hls', 'id': 2, 'label': 'original quality', 'quality': 1500}, {'is_default': True, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/source/chunklist.m3u8', 'type': 'lhls', 'id': 1, 'label': 'original quality (low latency)', 'quality': 1000}, {'is_default': False, 'url': 'https://hls-css.live.showroom-live.com/live/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804_l.m3u8', 'type': 'hls', 'id': 4, 'label': 'low quality', 'quality': 150}, {'is_default': False, 'url': 'https://hls-ull.showroom-cdn.com/6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804/low/chunklist.m3u8', 'type': 'lhls', 'id': 3, 'label': 'low quality (low latency)', 'quality': 100}]

The .m3u8 is like:

#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:1721654285
#EXT-X-TARGETDURATION:3
#EXTINF:2.008,
6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804-1721654285.ts?txspiseq=106630043152226748739
#EXTINF:2.008,
6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804-1721654286.ts?txspiseq=106630043152226748739
#EXTINF:2.008,
6c776ccf557dfa8a42edfa3bbdffd7652f0af351003ac0c6a363a7ffaa3bc804-1721654287.ts?txspiseq=106630043152226748739

[Request]Index file argument on watchlist

Currently, we can only watch all using --all or we can define member names on who the script will watch.

This request would be allow user to use --INDEXNAME as argument which will tell the script to watch all members on that index (jdex)

Hi

Sorry I can't see any message button. Can you give me an invite link to that Discord? I've lost control of my account. [email protected]

Live status is not correctly updated

Rooms are still marked as "LIVE" long after the stream has finished. This is obvious when asking for a list of current streams when running the testing branch, but the same problem exists in the new-index branch.

Most likely what's happening is a Schedule object isn't getting removed from scheduled when its related download finishes. There is a go_live() function to turn LIVE status on, but no corresponding end_live(). Of course the original intent was probably for it to be removed from scheduled once the download completes. I could try to figure out why this is happening, or I can solve it with the upcoming consolidation of Schedule, Watcher, and Downloader.

FFmpeg native RTMP support

New static builds of FFmpeg often omit librtmp in favour of FFmpeg's native rtmp support. This has been the case for builds from https://ffmpeg.zeranoe.com since 2017-10-13 (the 2017-09-21 build still has librtmp), likewise the latest Linux builds provided at https://www.johnvansickle.com/ffmpeg/ (those still had librtmp as late as the 3.4.1 stable build, however).

It is possible this change is behind a catastrophic failure I experienced using the latest git build from jvs, and even if not, the Showroom Watcher script relies on specific log messages from librtmp, and I have no idea if the same messages are printed by ffmpeg's version or not.

Further testing (any testing) is required, as well as FFmpeg logs (via showroom.py --logging). In particular watch out for 100% CPU consumption after streams end (and ffmpeg failing to exit normally), as well as the presence or absence of "HandleCtrl: Ping" in ffmpeg logs.


If it is confirmed that FFmpeg without librtmp is incompatible with the script as it exists, then I need to either:

  • a) detect the absence of librtmp and respond accordingly, or
  • b) provide a simple build script for compiling ffmpeg with librtmp

If the 100% cpu usage issue was caused by the native rtmp support, then option b) is the only option, at least until that problem is fixed in ffmpeg itself.

Save chat record?

it is able to add a function that record chat message with timestamp to output a txt?

Schedule instead of straight download

How do I create schedule instead of straight watching when invoking python3.5 showroom.py "Member Name"?

The current showroom.py will say that MemberName is not defined but I modify it by uncommenting two lines (1054-1055). However it goes to watching instead of scheduling.

What did I do wrong?

ERROR: No such file or directory

~/showroom# python3 showroom.py --all
Show (S)chedule, Show (D)ownloads, Show (L)inks, (Q)uit
Current Time is 22:23
Watching Imamura Mitsuki's Showroom
Watching Fukuda Akari's Showroom
Watching Takino Yumiko's Showroom
Watching Fujiwara Azusa's Showroom
Watching Mori Kaho's Showroom
Watching Nakamura Izumi's Showroom
Watching Kawakami Rena's Showroom
Watching Matsumoto Chikako's Showroom
Watching Ota Nao's Showroom
Watching Shimizu Maria's Showroom
Downloading Imamura Mitsuki's Showroom
Downloading Fukuda Akari's Showroom
Downloading Takino Yumiko's Showroom
Downloading Fujiwara Azusa's Showroom
Downloading Mori Kaho's Showroom
Downloading Nakamura Izumi's Showroom
Downloading Kawakami Rena's Showroom
Downloading Matsumoto Chikako's Showroom
: No such file or directory
Downloading Shimizu Maria's Showroom
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory

How can I change the file name format and download path?

Hello!

Is it possible to change the file name format and the output path?

I only record certain groups, so I don't need folders with group names.
I'd like to save it right away in the date folder.

Also, I want to change the file name format to the one I originally organized.

Which file should I modify?

Thank you always.

403 Client Error

I tried to use but got error:

Current Time is 22:55
Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102
Retrying in 0.5 seconds...
Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102
Retrying in 1.0 seconds...
Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102

What is the reason?

Option to resize 198p to 360p during concat

The most common resolutions are 360p and 198p. Add an --aggressive (or just --resize) option to concat to resize 198p videos to 360p, in order to reduce the number of output videos.

The Problem:
Occasionally, during times of high network congestion or for whatever other reason, showroom streams get reduced from 360p to 198p. Such streams are blocky and almost unwatchable, and usually don't last very long. However, the audio is still intact. Unfortunately, they can't be merged with 360p streams without being re-scaled (and losing data).

The Old Solution:
When I originally wrote concat.py, I opted to keep 360p and 198p separate rather than rescale in order to preserve as much of the original video data as possible. However... occasionally this results in a single stream getting split into 10+ videos of alternating 360p and 198p, and it's not like rescaling is going to make the video look noticeably worse.

The New Solution:
Add a --resize option to concat.py to complement the --generate and --merge options, and an --aggressive option that runs all three (--both will still only run --generate and --merge). --resize will work as follows:

  • scan the directory for 198p files
  • rename each 198p to resized/{filename}_198p.mp4
  • rescale each 198p to 360p (giving the new file the old name) w/ -crf 18

Occasionally streams also come in 396p and 720p, but these are rare (720p has only been seen once) and usually differ in other ways (e.g. 396p have lower frame rates), so this option will not affect them.

[Solved]output error

Hello, I am new to use this program.
I cannot use this program as it shows there is a SyntaxError.

output:

ktx@ktx:/media/ktx/USB/showroom-master$ python showroom.py --help
Traceback (most recent call last):
  File "showroom.py", line 2, in <module>
    from showroom.main import main
  File "/media/ktx/USB/showroom-master/showroom/main.py", line 1, in <module>
    from showroom.interfaces import BasicCLI
  File "/media/ktx/USB/showroom-master/showroom/interfaces.py", line 111
    print(*output, sep='\n')
          ^
SyntaxError: invalid syntax

also

ktx@ktx:/media/ktx/USB/showroom-master$ python showroom.py --all
Traceback (most recent call last):
  File "showroom.py", line 2, in <module>
    from showroom.main import main
  File "/media/ktx/USB/showroom-master/showroom/main.py", line 1, in <module>
    from showroom.interfaces import BasicCLI
  File "/media/ktx/USB/showroom-master/showroom/interfaces.py", line 111
    print(*output, sep='\n')
          ^
SyntaxError: invalid syntax

Am I setting something wrong? Or not install completely?
I am using Ubuntu 19.04, Python 3.7.3

Hope someone could help me.

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.