Browse Source

pass through cmdline to ffmpeg, remove preview feature

master
Shiz 1 year ago
parent
commit
21467aa06d
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      src/overlay/__main__.py

+ 5
- 8
src/overlay/__main__.py View File

@ -14,8 +14,8 @@ parser.add_argument('--nick-font', default='/Users/partynorge/down/Montserrat/Mo
parser.add_argument('--chat-font', default='/Users/partynorge/down/Montserrat/Montserrat-Light.ttf')
parser.add_argument('-n', '--nickname', help='Twitch chat nickname', default='shizacular')
parser.add_argument('-t', '--token', help='Twitch OAuth token')
parser.add_argument('-p', '--preview', help='preview using mpv', default=False, action='store_true')
parser.add_argument('channel', help='Twitch channel')
parser.add_argument('args', nargs=argparse.REMAINDER, help='arguments to be passed through to ffmpeg')
args = parser.parse_args()
@ -31,10 +31,7 @@ graph = scene.to_ffmpeg()
graph.fixup()
ffmpeg_args = graph.format()
if args.preview:
# Launch background runners
graph.run()
# Launch main process
subprocess.run('ffmpeg ' + ' '.join(shlex.quote(a) for a in ffmpeg_args) + ' -f nut -c:v libx264 -preset veryfast pipe:1 | mpv -', shell=True)
else:
raise ValueError('TODO')
# Launch background runners
graph.run()
# Launch main process
subprocess.run(['ffmpeg'] + ffmpeg_args + args.args)

Loading…
Cancel
Save