fix #59, No such file or directory
This commit is contained in:
parent
ec45e8e69c
commit
b569fded6a
24
ffplayout.py
24
ffplayout.py
@ -21,7 +21,7 @@
|
|||||||
import os
|
import os
|
||||||
from pydoc import locate
|
from pydoc import locate
|
||||||
|
|
||||||
from ffplayout.utils import _playout, validate_ffmpeg_libs
|
from ffplayout.utils import _playout, validate_ffmpeg_libs, stdin_args
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.name != 'posix':
|
if os.name != 'posix':
|
||||||
@ -37,18 +37,22 @@ except ImportError:
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""
|
"""
|
||||||
pipe ffmpeg pre-process to final ffmpeg post-process,
|
play out depending on output mode
|
||||||
or play with ffplay
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if stdin_args.desktop:
|
||||||
|
output = locate('ffplayout.output.desktop.output')
|
||||||
|
output()
|
||||||
|
|
||||||
for output in os.listdir('ffplayout/output'):
|
else:
|
||||||
if os.path.isfile(os.path.join('ffplayout/output', output)) \
|
for output in os.listdir('ffplayout/output'):
|
||||||
and output != '__init__.py':
|
if os.path.isfile(os.path.join('ffplayout/output', output)) \
|
||||||
mode = os.path.splitext(output)[0]
|
and output != '__init__.py':
|
||||||
if mode == _playout.mode:
|
mode = os.path.splitext(output)[0]
|
||||||
output = locate('ffplayout.output.{}.output'.format(mode))
|
|
||||||
|
|
||||||
output()
|
if mode == _playout.mode:
|
||||||
|
output = locate('ffplayout.output.{}.output'.format(mode))
|
||||||
|
output()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -119,7 +119,7 @@ out:
|
|||||||
-b:a 128k
|
-b:a 128k
|
||||||
stream_output: >-
|
stream_output: >-
|
||||||
-flags +global_header
|
-flags +global_header
|
||||||
-f flv "rtmp://localhost/live/stream"
|
-f flv rtmp://localhost/live/stream
|
||||||
hls_output: >-
|
hls_output: >-
|
||||||
-flags +cgop
|
-flags +cgop
|
||||||
-f hls
|
-f hls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user