Topic: SVP Tube 2 DASH and Adding video to playlist instead of Play

Hi,
I'm struggling a lot with trying to accomplish the very thing explained in the subject topic.
To make long story short I want to force SVPTube2 to add stream to player's playlist instead of playing it immediately.
Can't do this for DASH streams for some reason.
I'm doing the most obvious thing:
- Going to SVP All Settings
- changing tube->player->user path to for instance:
    C:\AudioVideo\Media Player Classic - BE\mpc-be.exe "/add"
    or
    "C:\AudioVideo\Media Player Classic - BE\mpc-be.exe" "/add" "%1"
But this is simply not working with DASH videos (all youtube >= 1080p stuff).

I think there is some specific way SVPTube2 sending these kind of streams to the destination player (especially MPC-HC or MPC-BE) because if I get the video address and manually issue it in MPC-HC I'm not getting audio only video.
I would appreciate any help or explanation how all this work.

For SVPTube1 and nonDASH streams I wrote some vbs script to intelligently add or play immediately the target player depending on the player state.
I want to do the same for SVPTube2 but to do so I have to know the exact command SVPTube2 executes sending DASH stream to DASH-supporting player (MPC-HC or MPC-BE).

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

mpc-hc.exe <video-url> /dub <audio-url> /sub <sub-url>

probably this isn't working together with /add switch

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

Yes, it does. (at least in MPC-BE)
I checked this a few seconds ago.
Extracted <video-url> and <audio-url>
Formed the command:
mpc-be.exe <video-url> /dub <audio-url> /add and that worked.

But for some reason changing this in svpTube2 All settings:
tube->player->user path:  C:\AudioVideo\Media Player Classic - BE\mpc-be.exe "%1" "/add"
not working
Maybe it should looks like this:
tube->player->user path:  C:\AudioVideo\Media Player Classic - BE\mpc-be.exe "%1" "/dub" "%2" "/add"
or some other way?

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "%1" /add

mpc-hc adds video stream to the playlist but just ignores /dub url

5 (edited by piquadrat 19-07-2017 14:36:22)

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

The thing I'm trying to explain here is that both players executes /add correctly also in DASH when issued within command line.
Try this with mpc-hc.
Standard setting in SVP:
  mpc-hc.exe" "%1"
Open any DASH video, it plays ok. Look at playlist and copy the playlist entry to the clipboard. This entry consists of 2 url's with CR character between them. So you can extract <video-url> and <audio-url> from this. Having that, issue from command line:
  mpc-hc.exe <video-url> /dub <audio-url> /add
and you will see the video is being added to playlist and play with sound. This works ok.

The thing is I can't make SVPTube2 to behave like this. As seen above SVPTube2 is able to get both utl-s correctly and send it to mpc-hc.
But for some reason I'm not able to set SVPTube2 to add "/add" swith at the and of command it generates.
Don't know why. After setting:
  "C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "%1" /add
I'm getting what you said: only Video for DASH and invalid stream for non-DASH.
This is not the mpc-hc or -be fault.

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

why you think "/add" should be at the end?

considering ""C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "%1" /add" in the tube.player.user, SVPtube produces this command line:

"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" <video-url> /add /dub <audio-url>
which adds <video-url> to the playlist BUT obviously ignores <audio-url>

7 (edited by piquadrat 19-07-2017 15:02:43)

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

"/add" adding new entry in player's playlist and play it or not depending on other settings.

Why:
mpc-hc.exe" <video-url> /add /dub <audio-url>
but not:
mpc-hc.exe" <video-url> /dub <audio-url> /add
?

%1 should be equal to:
<video-url>
or
<video-url> /dub <audio-url>
depending on the non-DASH / DASH isn't it?

EDIT. I checked this scheme in command line:
   mpc-hc.exe" <video-url> /add /dub <audio-url>
and it works too. So now I don't understand. If I manually issue the command SVPTube2 is supposing to generate I'm getting all OK but if I let the SVPTube2 to do this (generate and execute) for me I'm getting no sound for DASH and invalid stream for non-DASH content.

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

ok, I found the error
actually "/" character in "/add" breaks one place in svptube and it just doesn't pass /dub arg to the player

right now you can point tube.player.user to a custom .wsf script and make the correct command line for mpc-hc on your own

9 (edited by piquadrat 19-07-2017 15:48:11)

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

I'm not so sure. Note that any such passing requires two arguments if I'm correct.
The problem will manifest itself nevertheless. I'm using wscript and vbs script and:
   wscript "C:\StartMPCBE.vbs" "%1"
not working.
I'm not having access to audio stream coz you split audio and video and not put audio in %1 variable.
How to pass audio url to script then?
 

EDIT:
   wscript "C:\StartMPCBE.vbs"
doesn't work either. Video with no audio.

I'm supposing: &WScript.Arguments.Item(0) i'm using for accepting the arguments whithin the script does not like white characters. This is probably the cause of my problem (no audio).

EDIT2
No, it seems you can have access only to video url, audio url is getting lost and not passed "outside" right now.
Just like I said I have to use 2 arguments and exe and that's the place something is wrong with code (more then one argument) and audio url is going with the wind smile

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

mpc-add.wsf:

<job id="svptube">
<script language="JScript">

var videoPlayerPath="c:\\Program Files\\mpc-hc\\mpc-hc64.exe";

var shell=WScript.CreateObject("WScript.Shell");

var videoURL,audioURL,subsURL;
switch(WScript.Arguments.length)
{
case 4: subsURL =WScript.Arguments(2);
case 3: audioURL=WScript.Arguments(1);
case 2: videoURL=WScript.Arguments(0);
}

cmd = "\""+videoPlayerPath+"\" \""+videoURL+"\"" + " /add";
if(audioURL) cmd += " /dub \""+audioURL+"\"";
if(subsURL) cmd += " /sub \""+subsURL+"\"";    

shell.Run(cmd,1,false);

</script>
</job>

tube.player.user = "d:\mpc-add.wsf"

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

This works perfectly. Mission accomplished.

12 (edited by nemoW 22-07-2017 07:28:02)

Re: SVP Tube 2 DASH and Adding video to playlist instead of Play

For me SVPTube properly send videos with subtitles to mpv (subtitles displayed) but with mpc-hc there is no subtitles. Is it bug or feature?