Previously I had a batch script like this:
This piped the encoded video from my 4K capture card into NPVR as part of my extras device. This all works great now after a lot of work. However, I need to introduce some conditionality depending on whether I am calling a channel from my SKy Q STB, or my Enigma STB. Therefore, I have amended my batch script to enable a call to a Python script, in which I will introduce some if statements. My batch script now looks like this:
My Python script so far looks like this:
What appears to be happening is the script still opens VLC correctly with the encoded stream, however I don't really know where it is now being piped to. This is getting a bit out of my area of expertise. Thus I am not really sure what to Google to try and resolve.
I could as a last resort set up two extras devices, but this would require considerable work to remodel my XMLTV builder. If I can resolve the issue of where the encoded stream is going, I will then add in the additional logic for the Enigma2 box. This is just for the Sky Q STB so far...
Any ideas?
Thanks
Code:
"G:\Visual Studio 2017\C++ Projects\SkyQChannelChanger\Release\SkyQChannelChanger.exe" %1
taskkill /f /im vlc.exe /t
"G:\VLC\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 show-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=ffmpeg,vcodec=mp2v,threads=8,aspect=16:9,width=3840,height=2160,fps=50,acodec=a52,ab=1500,channels=2,samplerate=48000,soverlay}:standard{access=file,dst=-,mux=ts}"
This piped the encoded video from my 4K capture card into NPVR as part of my extras device. This all works great now after a lot of work. However, I need to introduce some conditionality depending on whether I am calling a channel from my SKy Q STB, or my Enigma STB. Therefore, I have amended my batch script to enable a call to a Python script, in which I will introduce some if statements. My batch script now looks like this:
Code:
@echo off
"G:\Visual Studio 2017\C++ Projects\SkyQChannelChanger\Release\SkyQChannelChanger.exe" %1
taskkill /f /im vlc.exe /t
"G:\HTPC Scripts\NPVR Command Line\Command Line.py"
My Python script so far looks like this:
Code:
import os
import sys
import subprocess
os.chdir('G:\\VLC\\')
startupinfo = None
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
process = subprocess.Popen([
'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',
'show-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=ffmpeg,vcodec=mp2v,threads=8,aspect=16:9,width=3840,height=2160,fps=50,acodec=a52,ab=1500,channels=2,samplerate=48000,soverlay}:standard{access=file,dst=-,mux=ts}"',
], stdout=subprocess.PIPE, startupinfo=startupinfo)
What appears to be happening is the script still opens VLC correctly with the encoded stream, however I don't really know where it is now being piped to. This is getting a bit out of my area of expertise. Thus I am not really sure what to Google to try and resolve.
I could as a last resort set up two extras devices, but this would require considerable work to remodel my XMLTV builder. If I can resolve the issue of where the encoded stream is going, I will then add in the additional logic for the Enigma2 box. This is just for the Sky Q STB so far...
Any ideas?
Thanks