Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_run (Read 594987 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_run 0.3.8

Reply #650
Figured it out, i uninstalled vlc from (x86) directory and installed in reg dir, BAM! works fine.........

Re: foo_run 0.3.8

Reply #651
Ok so how do I get this to run the next video in the playlist? So I start with vid 1 playing and it stops and closes after that, I wnat it to play next video?

Appreciate you all putting up with this old man trying to figure out all this......

Re: foo_run 0.3.8

Reply #652
Figured it out, i uninstalled vlc from (x86) directory and installed in reg dir, BAM! works fine.........
 
  
 It was the ( an ) causing the issue here.

They need to be wrapped with two '

Here's where I talk more about this: https://hydrogenaud.io/index.php?topic=45223.msg980890#msg980890

This will work
Code: [Select]
"C:\Program Files '('x86')'\VideoLAN\VLC\vlc.exe" "%_path%"

Re: foo_run 0.3.8

Reply #653
Ok so how do I get this to run the next video in the playlist? So I start with vid 1 playing and it stops and closes after that, I wnat it to play next video?

Appreciate you all putting up with this old man trying to figure out all this......
 
 Pretty sure there's a setting in vlc to play the next video in the playlist automatically.

Sorry I cannot be of more help as I've switched over to PotPlayer but I think it's VLC related, your issue.

Re: foo_run 0.3.8

Reply #654
Ok so how do I get this to run the next video in the playlist? So I start with vid 1 playing and it stops and closes after that, I wnat it to play next video?

Appreciate you all putting up with this old man trying to figure out all this......

 Pretty sure there's a setting in vlc to play the next video in the playlist automatically.

Sorry I cannot be of more help as I've switched over to PotPlayer but I think it's VLC related, your issue.

Great idea, looked and it does not have any of the limiting boxes checked and there is no continuous box, I tried highlighting a few vids and they all play at once..lol

Re: foo_run 0.3.8

Reply #655
Ok so how do I get this to run the next video in the playlist? So I start with vid 1 playing and it stops and closes after that, I wnat it to play next video?

Appreciate you all putting up with this old man trying to figure out all this......

VLC via command line will play a folder full of videos one after the other by specifying the folder instead of file:

"C:\VLC Media Player\vlc.exe" "E:\Video Folder""

How to code that to point to multiple selected videos in a Foobar playlist I don't know.

Re: foo_run 0.3.8

Reply #656
Great idea, looked and it does not have any of the limiting boxes checked and there is no continuous box, I tried highlighting a few vids and they all play at once..lol
 Here's a thread to add files to the playlist.
https://forum.videolan.org/viewtopic.php?t=65006

You could try using the --one-instance switch.
Code: [Select]
"C:\Program Files '('x86')'\VideoLAN\VLC\vlc.exe" --one-instance "%_path%"






 

Re: foo_run 0.3.8

Reply #657
I'm bored so I downloaded the portable version.



This works.
Code: [Select]
"C:\pathto\vlc.exe" --one-instance "%_path%"


Re: foo_run 0.3.8

Reply #659
Great idea, looked and it does not have any of the limiting boxes checked and there is no continuous box, I tried highlighting a few vids and they all play at once..lol
Here's a thread to add files to the playlist.
https://forum.videolan.org/viewtopic.php?t=65006

You could try using the --one-instance switch.
Code: [Select]
"C:\Program Files '('x86')'\VideoLAN\VLC\vlc.exe" --one-instance "%_path%"






 

This seems to work but has a small glitch...If I highlight say 3 vids, it skips the top one, if I select 6 it skips top one.....But it is playing more than one vid so it is a winner!

Re: foo_run 0.3.8

Reply #660
I noticed that behaviour too. Possibly something to see over on the vlc forum or a google search.


Re: foo_run 0.3.8

Reply #662
I dont have a "run services per group"......
I believe he may be using the foo_run_group component:

https://download1.getuploader.com/g/5ecaf3ed-629c-4929-be18-69afa010e467/foobar2000/220/foo_run_group_v1.04.7z


See the image below for the download button on the page linked above:

Re: foo_run 0.3.8

Reply #663
I dont have a "run services per group"......
I believe he may be using the foo_run_group component:

https://download1.getuploader.com/g/5ecaf3ed-629c-4929-be18-69afa010e467/foobar2000/220/foo_run_group_v1.04.7z


See the image below for the download button on the page linked above:


Got that one.....Thanks!

Re: foo_run 0.3.8

Reply #664
As discussed with Wolfbane here, here is a short and very basic step-by-step explenantion on how to download videos from youtube using foobar and youtube-dl.
This is posted here under foo_run as this is the major foobar component needed to do this.
As said this is very basic in the first step and leaves control of quality and format to youtube-dl (which chooses what it thinks is overall best if nothing specified, see here). Usually you get a .mkv or a .mp4 file, which I can view both with VLC and foobar. In this first step creates only video+audio files, no audio only. Probably in a separate post I will show how to select formats in youtube-dl.

1. Install youtube-dl on your computer, see here

2. Download foo_run from here and install to your foobar

3. Download foo_youtube from here and install to your foobar

4. Within foobar, go to preferences/tools/Run services
   Type any Name into 'Label' (e.g. 'download from youtube')
   Paste the following into Path. Make sure to adapt the 2 required paths to your setup.
Code: [Select]
"C:\YOUR_PATH_TO_YOUTUBE-DL\youtube-dl.exe" -i  "%fy_url%" -o 'C:\PATH_WHERE_TO_DOWNLOAD_VIDEO\%(title)s.%(ext)s'
   Be careful if you have brackets in your path (e.g. C:\Program Files (x86)), they have to be wrapped with two ', see here
   Select 'Add' and 'OK'

5. Load youtube video(s) to a foobar playlist eg via the foo_youtube search capabilities or - if you have the link - pasting the link into File/Add location...

6. Right-click on the youtube video you want to download, select Run service/THE_NAME_GIVEN_IN_LABEL
    Hint: with this you can only download one video in one step. I will show how to download multiple videos in one step in a separate post

Now youtube-dl should download the video.
Enjoy  :)

Re: foo_run 0.3.8

Reply #665
Hint: with this you can only download one video in one step. I will show how to download multiple videos in one step in a separate post
How to download multiple videos in one instance (using foo_run_group)

1. Download foo_run_group v1.04 as shown in this post and install to foobar

2. Within foobar, go to preferences/tools/Run services per group
   Click 'New'
   Type any name into 'Label' (e.g. 'download from youtube')
   Paste the following into Path. Make sure to adapt the 2 required paths to your setup.
Code: [Select]
"C:\YOUR_PATH_TO_YOUTUBE-DL\youtube-dl.exe" -i  "%fy_url%" -o 'C:\PATH_WHERE_TO_DOWNLOAD_VIDEO\%(title)s.%(ext)s'
   Insert into 'Album grouping pattern':
Code: [Select]
%title%
   Everything else can be left blank
  
3. Select the videos you want to download, rightclick Run services per group/your label
  
 

Re: foo_run 0.3.8

Reply #666
Hi! Thanks for these excellent tutorials!
I gave a try (first tutorial) but I could not download nothing. A prompt window opened and closed fast but no files were downloaded in the directory I indicated...

Re: foo_run 0.3.8

Reply #667
A prompt window opened and closed fast but no files were downloaded in the directory I indicated...
If you change
Code: [Select]
"C:\YOUR_PATH_TO_YOUTUBE-DL\youtube-dl.exe" -i  "%fy_url%" -o 'C:\PATH_WHERE_TO_DOWNLOAD_VIDEO\%(title)s.%(ext)s'
to
Code: [Select]
cmd /c start "test" "cmd.exe" /k C:\YOUR_PATH_TO_YOUTUBE-DL\youtube-dl.exe -i -v "%fy_url%" -o 'C:\PATH_WHERE_TO_DOWNLOAD_VIDEO\%(title)s.%(ext)s'
the cmd window should stay after execution, with the -v switch (verbose) youtube-dl should give enough debugging info to understand what is happening.
Please not that the "" have to be omitted here for the youtube-dl.exe path (please don't ask me why, that's at least how it works on my side). To be on the save side try to avoid brackets - e.g. (x86) - in your youtube-dl.exe path, just move youtube-dl.exe somewhere else.

Re: foo_run 0.3.8

Reply #668
I gave a try (first tutorial) but I could not download nothing
Uuups, I just realize that I forgot one important step in the above tutorial:
You have to install ffmpeg and put it into your windows PATH (so that youtube-dl can find it).
So just follow this step-by-step guide to install ffmpeg and adapt the windows PATH accordingly. I have installed it in the same way as shown there by just storing the ffmpeg directory directly under C:
Sorry for that...

 

Re: foo_run 0.3.8

Reply #670
OK, everything is much clearer now and I conclude that it was my fault.

I made 2 very basic and fundamental mistakes that will never be repeated, since they do not behave very well with the coding 'ecosystem': first, I used to save my files in named directories with spacing (eg P O R T A B L E S); second, the destination directory also contained this pattern (eg, D O W N L O A D S).

I moved the indispensable files (youtube-dl / ffmpeg) to the root of Drive 'C:' and renamed the destination directory with naming without spacing. Now everything is working as expected!

A question: Could I have pre-filled the blanks in directory names (Path) with '%'?

Thank you very much for your patience in the guidelines!


Re: foo_run 0.3.8

Reply #672
I'm hoping someone can help as my windows scripting skills are poor and I'm struggling to get this to work.

From foobar2000 windows I'm trying to call a bash script (using WSL) passing the path of the music file that's selected in the interface, but I'm struggling to deal with & in directory names.

Current approach

[Run services] I'm using a .bat file as I can't get foo_run to start a 64 bit cmd window in order to start bash so I have some necessary redirection here
Code: [Select]
cmd.exe /k "d:\test.bat "$substr(%_path%,0,$strrchr(%_path%,'\'))""

[test.bat]
Code: [Select]
"%WINDIR%\sysnative\cmd.exe" /k bash /mnt/d/test.sh '%~1'

[test.sh] (Obviously I'll do something more useful here when it's working)
Code: [Select]
#!/bin/bash

targetDir=`wslpath -a "$1"`
cd "$targetDir"
pwd
ls -al


If the path doesn't have an ampersand in it, it works, otherwise it throws:

C:\Program Files (x86)\_personalInstalls\foobar2000>"C:\Windows\sysnative\cmd.exe" /k bash /mnt/d/test.sh 'G:\Tagged  & Cleaned\flac\Adams, Bryan\2012 - Cuts Like A Knife\'
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file

Notice the folder is actually 'Tagged&Cleaned', I'm guessing the step that passes it to bash is evaluating it somehow, but I don't know why, and I've tried lots of quoting variations but I just can't get it to work.

Hopefully it's a simple fix....

Re: foo_run 0.3.8

Reply #673
As discussed with Wolfbane, here is a short and very basic step-by-step explanation on how to download videos from youtube using foobar and youtube-dl.

Now youtube-dl should download the video.
Enjoy  :)

Worked, both mono and the group downloads. THX

Re: foo_run 0.3.8

Reply #674

...

If the path doesn't have an ampersand in it, it works, otherwise it throws:

C:\Program Files (x86)\_personalInstalls\foobar2000>"C:\Windows\sysnative\cmd.exe" /k bash /mnt/d/test.sh 'G:\Tagged  & Cleaned\flac\Adams, Bryan\2012 - Cuts Like A Knife\'
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file

Notice the folder is actually 'Tagged&Cleaned', I'm guessing the step that passes it to bash is evaluating it somehow, but I don't know why, and I've tried lots of quoting variations but I just can't get it to work.

Hopefully it's a simple fix....

Turns out I was spiralling, uncontrollably in the wrong direction, and all that was ultimately needed was:

[Run services]
Code: [Select]
"C:\Windows\sysnative\cmd.exe" /k "bash /mnt/d/test.sh "$directory_path(%_path%)""

[test.bat]
Code: [Select]
#!/bin/bash

targetDir=`wslpath -u "$1"`
cd "$targetDir"
pwd
ls -al