Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 80d63a7

Browse files
committed
improve file capture quality, robustness
1 parent bcf497a commit 80d63a7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

PyLivestream/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def osparam(self):
150150

151151

152152
def videostream(self) -> tuple:
153-
"""optimizes video settings for YouTube Live"""
153+
"""optimizes video settings"""
154154
# %% configure video input
155155
if self.vidsource == 'screen':
156156
vid1 = self.screengrab()
@@ -428,14 +428,14 @@ def __init__(self, ini:Path, outfn:Path=None, clobber:bool=False):
428428

429429
self.osparam()
430430

431-
vid1 = self.screengrab()
431+
vid1,vid2 = self.videostream()
432432

433433
aud1 = self.audiostream()
434434
aud2 = self.audiocomp()
435435

436-
cmd = [self.exe] + vid1 + aud1 + aud2
436+
cmd = [self.exe] + vid1 + vid2 + aud1 + aud2
437437

438-
if isinstance(outfn,Path) and outfn.samefile(os.devnull): # for testing/benchmarks
438+
if not outfn.suffix: # ffmpeg relies on suffix for container type, this is a fallback.
439439
cmd += ['-f','flv']
440440

441441
cmd += [str(outfn)]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(name='PyLivestream',
77
packages=find_packages(),
8-
version = '1.4.4',
8+
version = '1.4.5',
99
author='Michael Hirsch, Ph.D.',
1010
url='https://github.com/scivision/PyLivestream',
1111
description='Easy streaming using FFmpeg to YouTube Live, Periscope, Facebook Live, Twitch, ...',

stream.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ server: rtmp://rtmp.cloud.vimeo.com/
7474
key: vimeo.key
7575

7676
[file]
77-
video_kbps: 5000
77+
video_kbps: 2000
7878
screencap_res: 720x420
7979
audio_bps:

0 commit comments

Comments
 (0)