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_youtube (Read 491961 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: foo_youtube

Reply #1150
@3dyd Thank you for your thorough response!

Unfortunately, the fade in / fade out isn't an option, since it's tied to the buffer length -- whatever your longest fade in or out is, that's how long Foobar assign it to the buffer length.

Crossfade with a 50 ms buffer length is probably my best option. I really do appreciate your help and your plugin, it's really great!

Re: foo_youtube

Reply #1151
Howdy

When I use "Skiptrack" on YouTube songs, the audio syns up and start songs at the correct timer, but video always start from start of the YouTube video, so audio and video are not in sync when I use Skiptrack on YouTube songs.

Foobar = v1.4.8
Foo YouTube = v3.2
Foo_skip = v1.15

Any settings I can change to fix it or is error not on my part ?

Re: foo_youtube

Reply #1152
Unfortunately, the fade in / fade out isn't an option, since it's tied to the buffer length -- whatever your longest fade in or out is, that's how long Foobar assign it to the buffer length.
FYI, Crossfade DSP also buffers amount of time specified in it. How to spot this: if you select 20 seconds in Crossfade DSP and 5 seconds of buffer length in Output then in Console you will be getting "Opening tack for playback" messages 25 seconds before end of the track.

DSP has no control over input data (e.g. it cannot request data from next track 20 seconds before prev track ends). So Crossfade keeps last 20 seconds in buffer and when it gets notification that new track has just been started, it begins crossing these 20 buffered seconds with arriving data.

When I use "Skiptrack" on YouTube songs, the audio syns up and start songs at the correct timer, but video always start from start of the YouTube video, so audio and video are not in sync when I use Skiptrack on YouTube songs.

Foobar = v1.4.8
Foo YouTube = v3.2
Foo_skip = v1.15
Short answer: it works only in foobar2000 1.5.

Long answer (from my understanding). Some of new APIs introduced in foobar2000 1.5 provide different solution for components like Skiptrack.

Let's say you have a 3 minute track with meta field "SKIP=1:00-2:00" (skip one minute from the middle).

When opening in 1.4, it will be reported as 2 minute track. And after first minute of playback it will start reporting playback position not matching actual audio position in the file. Video is tied to playback position so it will be out of sync.

When opening in 1.5, its original duration will be retained. And when playback reaches position 1:00 you'll see it jumping to position 2:00. I.e. playback position remains matching to actual audio position in the file. So the video stays synced.

Re: foo_youtube

Reply #1153
I'm not sure if the problem is with foo_youtube, but I have `hitching` problems with some live streams (plays properly directly via browser). I.e. the music is interrupted every dozen seconds for a moment then continues playing. This does not happen to every stream. This problem happens regardless of video being enabled or disabled.
Example of problematic stream (might be down by the time you see this though): https://www.youtube.com/watch?v=uXSeF2FgAdg

Re: foo_youtube

Reply #1154
Hi, I noticed an issue when adding non-working URLs. When a URL doesn't work, such as a YouTube video being taken down or having not premiered yet, rather than showing an error, a non-working track is added to the playlist. Example URL: https://www.youtube.com/watch?v=S1x9HrGFWp8.

Re: foo_youtube

Reply #1155
I have `hitching` problems with some live streams
It might help if you use ffmpeg with GnuTLS for HLS playback. The simplest way is to select any option starting with "ffmpeg" in Decoding -> Audio -> Decoder and ensure you use ffmpeg from LAV Filters or Zeranoe (they both use GnuTLS).

When a URL doesn't work, such as a YouTube video being taken down or having not premiered yet, rather than showing an error, a non-working track is added to the playlist.
Thanks for noticing. Fixed in last beta.

Re: foo_youtube

Reply #1156
Hi, I found an issue when viewing video descriptions. In some videos, the description is labeled as "enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube", rather than the actual description. Example URL: https://www.youtube.com/watch?v=5anLPw0Efmo.

Re: foo_youtube

Reply #1157
Ok, should be fixed in beta3.

Re: foo_youtube

Reply #1158
When double clicking on playlist track in foobar2000 playlist, in my case the first 50 tracks of the playlist get expanded. I can expand the full playlist in one step via File/Youtube Source/Load channel or playlist. Is it possible to change the behaviour of double clicking on playlist track so that here as well the full playlist is expanded?

Re: foo_youtube

Reply #1159
hi all and 3dyd

foobar 1.3.20
foo_youtube 2.3.5

today unexpected begin error


Unable to open item for playback (Youtube Source: Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=acodCPf6PNU"

Unable to open item for playback (Youtube Source: Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=acodCPf6PNU"

Unable to open item for playback (Youtube Source: Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, Error reading data at 0 | Page analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=6Jwa3n1B5hE"

i try new version from fy.3dyd but error remained...

Re: foo_youtube

Reply #1160
Is it possible to change the behaviour of double clicking on playlist track so that here as well the full playlist is expanded?
This is currently not possible.

today unexpected begin error

Unable to open item for playback (Youtube Source: Page analysis, Error reading data at 0 |
I guess Console after this failure mentions "HTTP 429" error. Recently I'm getting reports about this problem. Unfortunately I have not been able yet to reproduce it locally.

Please try 3.4 beta 1. I added a workaround there that might help.

Re: foo_youtube

Reply #1161
3dyd 3.4 beta 1

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=WNnNvcRkhMI"

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=GqddUiK-vLY"

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=twDysFRZmh0"

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=nE5X09l99vc"

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=lAjHyDEyi-k"

Unable to open item for playback (Youtube Source: Analysis, server error (code #429) | Analysis, no video found on Youtube URL):
"www.youtube.com/watch?v=V_CKgvI2Gvg"

Re: foo_youtube

Reply #1162
Sorry to hear that. I'll ask several questions via PM.

Re: foo_youtube

Reply #1163
ok .. WOW !

Thanks so much for making this component I am sure it was a lot of work.

I read the help pages on your site and either missed this info or could not find it. I wonder if someone can help me here.

1) When I open the 'search on site' window, do a search on youtube and then double click one of the search results it starts to play as expected. However my currently selected playlist contents (using Playlist Organizer component) are cleared (removed) and replaced with only one entry for the video I double clicked. I feel like double clicking the video search result should just play the video not change a playlist contents (currently selected). Maybe I am doing this wrong.

2) In the preferences for the component on the network tab 'main' there's a bool [checkbox] for 'Download media data independently from playback' . We also have a temp directory setting option. Does this mean the component is downloading the video in the background ? I am sorry I don't fully understand if it's streaming from the site or saving files to the disk. Can you give some detail to this feature ? I work professionally in video game production and watch longplays a lot so if it was downloading in the background that would actually help me to know so I can handle the gigabites of video I watch daily  ;D

Re: foo_youtube

Reply #1164
Hi, I noticed an issue with youtube-dl detection. It seems that in some cases, it will not be detected, even if it can be found in the system path, and when looking at status information, the youtube-dl version is listed as "user abort".

Re: foo_youtube

Reply #1165
I feel like double clicking the video search result should just play the video not change a playlist contents (currently selected). Maybe I am doing this wrong.
Possible actions and the way to override default action (when you double click on the item) are exposed via context menu. I'll add action you expected in the next version.

In the preferences for the component on the network tab 'main' there's a bool [checkbox] for 'Download media data independently from playback' . We also have a temp directory setting option. Does this mean the component is downloading the video in the background ? I am sorry I don't fully understand if it's streaming from the site or saving files to the disk.
First of all, this applies only to "foo_youtube" audio decoder and video downloader (what decoder and downloader to use is configured on Decoding tab).

"foo_youtube" always caches downloaded data to the disk and never redownloads the same data again (e.g. if you seek backward). If multiple readers access the same file, single file is shared between them (with possibility of downloading from different positions).

If 'Download media data independently from playback' is unchecked, it pauses downloading when the distance between playback and downloading position reaches some (unspecified, unconfigurable [yet]) value. Otherwise it keeps downloading till the end of file. If you seek forward it starts downloading from the new playback position no matter if this option is checked.

You can use Activity UI element to get visual representation of its work.

Hi, I noticed an issue with youtube-dl detection. It seems that in some cases, it will not be detected, even if it can be found in the system path, and when looking at status information, the youtube-dl version is listed as "user abort".
This could happen if 'youtube-dl --version' being executed on program start takes too long. I increased timeout for this action in last beta, maybe that helps.

Re: foo_youtube

Reply #1166
Thank you for this great plugin. The sound quality of the OPUS streams is quite good.
Is there a way to save the streams to files (for a complete playlist) without transcoding first?

Re: foo_youtube

Reply #1167
As far as I know, there is no way to do that without transcoding.

Re: foo_youtube

Reply #1168
It should be possible with run services and youtube-dl, but how do I pass the youtube-link?

Re: foo_youtube

Reply #1169
To get underlying URL it is better to use %fy_url% title formatting field. Unlike approach with %path% / %_path_raw% it will give desired results also for playlist/channel/search URLs and *.foo_youtube files.

Re: foo_youtube

Reply #1170
To get underlying URL it is better to use %fy_url% title formatting field. Unlike approach with %path% / %_path_raw% it will give desired results also for playlist/channel/search URLs and *.foo_youtube files.

Works like a charme, thank you. This is the best way to use audios from youtube !

Re: foo_youtube

Reply #1171
To get underlying URL it is better to use %fy_url% title formatting field. Unlike approach with %path% / %_path_raw% it will give desired results also for playlist/channel/search URLs and *.foo_youtube files.

Works like a charme, thank you. This is the best way to use audios from youtube !
Hello Anderle, could you share how exactly you are using %fy_url% and foo_run to download the original youtube OPUS stream?

Re: foo_youtube

Reply #1172
To get underlying URL it is better to use %fy_url% title formatting field. Unlike approach with %path% / %_path_raw% it will give desired results also for playlist/channel/search URLs and *.foo_youtube files.

Works like a charme, thank you. This is the best way to use audios from youtube !
Hello Anderle, could you share how exactly you are using %fy_url% and foo_run to download the original youtube OPUS stream?

Download youtube-dl.exe (google may help)
Download and install the run_services component  (foo_run) from components (https://www.foobar2000.org/components/view/foo_run)
Configure it under preferences (-> Tools -> Run services), add a service and point it to your youtube-dl.exe with the [...] button, configure it on the path box to your likings.
Don't forget to name your service. (e.g."youtube-dl")
You can use it for example with "youtube-dl.exe %fy_url% --no-playlist -x --audio-format opus -o '%(playlist_index)s-%(title)s.%(ext)s'". Hit OK.
Then right click on any playlist-entry, click "run service" and choose your entry, e.g. "youtube-dl" or whatever you name it.
Files will be in the same directory as youtube-dl.exe unless you configure it otherwise with the -o switch, refer to youtube-dl manual.
Hope that helps, enjoy.

Re: foo_youtube

Reply #1173
To get underlying URL it is better to use %fy_url% title formatting field. Unlike approach with %path% / %_path_raw% it will give desired results also for playlist/channel/search URLs and *.foo_youtube files.

Works like a charme, thank you. This is the best way to use audios from youtube !
Hello Anderle, could you share how exactly you are using %fy_url% and foo_run to download the original youtube OPUS stream?

Download youtube-dl.exe (google may help)
Download and install the run_services component  (foo_run) from components (https://www.foobar2000.org/components/view/foo_run)
Configure it under preferences (-> Tools -> Run services), add a service and point it to your youtube-dl.exe with the [...] button, configure it on the path box to your likings.
Don't forget to name your service. (e.g."youtube-dl")
You can use it for example with "youtube-dl.exe %fy_url% --no-playlist -x --audio-format opus -o '%(playlist_index)s-%(title)s.%(ext)s'". Hit OK.
Then right click on any playlist-entry, click "run service" and choose your entry, e.g. "youtube-dl" or whatever you name it.
Files will be in the same directory as youtube-dl.exe unless you configure it otherwise with the -o switch, refer to youtube-dl manual.
Hope that helps, enjoy.
Wow, this is great, thanks very much!! I was not aware of youtube-dl (see here)!
Your command line worked well except I had to adopt the quotes (Windows 10):
Code: [Select]
"youtube-dl.exe" "%fy_url%" --no-playlist -x --audio-format opus -o '%(playlist_index)s-%(title)s.%(ext)s'
Additionally, I replaced .%(ext)s with .ogg, as .%(ext)s gave me the webm extension, and I think .ogg is the more common container extension for the opus format (of course I could as well just use the extension .opus).
Thanks again!!

Re: foo_youtube

Reply #1174
Additionally, I replaced .%(ext)s with .ogg, as .%(ext)s gave me the webm extension, and I think .ogg is the more common container extension for the opus format (of course I could as well just use the extension .opus).
Thanks again!!
Hmm, just changing the extension from .webm to .ogg works with vlc, but not for foobar ... guess I need some more research here...