NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 81 82 83 84 85 … 101 Next »
Batch script - introducing a Python script call...

 
  • 0 Vote(s) - 0 Average
Batch script - introducing a Python script call...
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#11
2020-06-08, 12:47 AM
https://forums.nextpvr.com/showthread.php?tid=61104
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#12
2020-06-08, 06:39 PM
(2020-06-07, 04:03 PM)mvallevand Wrote: My point is why are you expecting python help on the subprocess function here?  I also wondered who your audience was? 


I've already posted that I wasn't going to help with vlc.  A hint though, if you have a working command that outputs to stdout all you need to do in python is

import subprocess

subprocess.call(command)

That's as far as I will take this.

Martin

Btw -  this did not work...
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,834
Threads: 954
Joined: May 2006
#13
2020-06-08, 06:41 PM
It does because I use it daily in an extra I use. However as you doubt me you really need to find a good python forum where you can get the help you need.

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#14
2020-06-08, 06:42 PM
it will open VLC, but the actual stream is not being piped in...
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#15
2020-06-08, 06:43 PM
My full code...

import os
import sys
import subprocess


os.chdir('G:\\VLC\\')

startupinfo = None
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW


process = subprocess.call([
'vlc',
'--ffmpeg-hw',
'--avcodec-hw=any',
'dshow:// :dshow-vdev="Video (00 Pro Capture HDMI 4K+)" :dshow-adev="Audio (2- 00 Pro Capture HDMI 4K+)"',
':dshow-threads=8',
':dshow-aspect-ratio=16\:9',
':dshow-size="3840x2160"',
':dshow-pixel_format=yuv444p16le',
':dshow-tune=film',
':dshow-preset=lossless',
':dshow-profile=main10',
':dshow-vcodec=x265',
':dshow-fps=50',
':dshow-crf=0',
':dshow-acodec=mp4a',
':dshow-stereo-mode=5',
':dshow-force-surround-sound=0',
':dshow-ab=128',
':dshow-samplerate=44100',
':no-dshow-config',
':live-caching=300',
'--sout',
'"#transcode{venc=x264{preset=ultrafast},vcodec=h264,threads=8,aspect=16:9,width=3840,height=2160,fps=50,acodec=a52,ab=1500,channels=2,samplerate=48000,soverlay}Confusedtandard{access=file,dst=-,mux=ts}"',
],shell=True)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,834
Threads: 954
Joined: May 2006
#16
2020-06-08, 06:48 PM (This post was last modified: 2020-06-08, 06:48 PM by mvallevand.)
You don't need to worry about pipes you just need stdout and like I posted subprocess send stdout just fine. Your code is more complex than my example

I am really sorry I am not going to help further you clearly need to spend more time developing and less time posting. I counted I had 50+ replies yesterday before I said I wasn't going to help which I've done a really poor job of.

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#17
2020-06-08, 09:00 PM
got fed up in the end and built a workaround...Got a batch file to trigger a Python file, which then decides some stuff and choses which sub batch file to trigger for the correct STB...
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  EPG Script Error? RedDevilJoe 4 327 2025-02-01, 01:16 AM
Last Post: RedDevilJoe
  Script to Run "Update Channels"? AWR2375 4 591 2024-09-23, 01:21 PM
Last Post: AWR2375
  Batch file for live TV fla 20 2,383 2023-04-30, 03:25 AM
Last Post: fla
  script MaxOne72 1 605 2021-10-07, 02:49 AM
Last Post: sub
  Postprocessing Script folder and VideoredoTVsuite4 not working Spotspot 4 2,003 2020-06-24, 11:16 AM
Last Post: MCEabused
  Server hangs on script markn62 8 2,400 2020-06-13, 10:58 PM
Last Post: markn62
  Script to delay NPVRtray running hansol123 5 1,933 2020-06-10, 02:27 PM
Last Post: hansol123
  Windows Service Hangs in "Starting" status after using InstallService.batch BrettB 13 4,807 2019-10-10, 04:59 AM
Last Post: VCR58

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode