Skip to main content
Topic: foo_youtube (Read 166959 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Re: foo_youtube

Reply #875
Cuesheet is also metadata (%cuesheet% field), so disabling of metadata writing does not seem to be good aproach.

Could you elaborate what do you do (and how) and what goes wrong?. Btw, you can get some hints from metadata storage. For regular tracks it is placed in <foobar2000_appdata_dir>/foo_youtube/cache/meta/. Names of files, containing metadata, start with 'meta+' there.

Re: foo_youtube

Reply #876
track's current title overrides "performer" value specified in CUE.
Ok, if you meant that artist name overrides "performer" and you use context menu Utils -> Edit cuesheet, then I've got what you mean.

Actually the same would happen for other formats. I've tried flac: took flac without metadata, added title and artist metadata to it, and then embedded cuesheet using 'Edit cuesheet' command. As result, tracks had title and artist from original track, not from cuesheet. Maybe one would expect from 'Edit cuesheet' to remove original metadata when embedding cuesheet (e.g. for m4a there is 'Edit MP4 chapters' menu item in Utils, that also takes cuesheet on input and indeed removes original metadata before embedding it).

What can be done on the component side. When writing and reading metadata, it may ignore (do not report nor store) other metadata if %cuesheet% field is present. How about that?


Re: foo_youtube

Reply #878
@3dyd
Tried the latest beta and could not reproduce the bug with art anymore. Thanks for fixing that!
Yes, using your example I was able to reproduce and fix it. Thank you.

Is it possible to implement some sort of YT authentication so as to play private playlists/videos from YT account?
Unlikely.

Re: foo_youtube

Reply #879
Unlikely.
That's a shame =(

I think I've encountered another bug:
Some videos return empty %playback_time% (i.e. equal to '?' after eval).
Examples of problematic videos:
>>1
>>2

Regression happened somewhere between v2.0.2 (correct value) and and v2.1 (no value).

Could not test with v2.0.3 since it's link on http://fy.3dyd.com/download/prev is dead (it is dead for v2.0.2 as well)

Re: foo_youtube

Reply #880

I think I've encountered another bug:
Some videos return empty %playback_time% (i.e. equal to '?' after eval).
Examples of problematic videos:
>>1
>>2

Regression happened somewhere between v2.0.2 (correct value) and and v2.1 (no value).

Could not test with v2.0.3 since it's link on http://fy.3dyd.com/download/prev is dead (it is dead for v2.0.2 as well)


Are you sure it is %playback_time% and not %length%  that displays "?"
AAC  displays "?" for %length%.

Simple js test panel

Code: [Select]
// Use with GdiDrawText() 
var DT_CENTER = 0x00000001;
var DT_VCENTER = 0x00000004;
var DT_WORDBREAK = 0x00000010;
var DT_CALCRECT = 0x00000400;
var DT_NOPREFIX = 0x00000800;

// Used in window.GetColorCUI()
var ColorTypeCUI = {
    text: 0,
    selection_text: 1,
    inactive_selection_text: 2,
    background: 3,
    selection_background: 4,
    inactive_selection_background: 5,
    active_item_frame: 6
};

// Used in window.GetFontCUI()
var FontTypeCUI = {
    items: 0,
    labels: 1
};

// Used in window.GetColorDUI()
var ColorTypeDUI = {
    text: 0,
    background: 1,
    highlight: 2,
    selection: 3
};

// Used in window.GetFontDUI()
var FontTypeDUI = {
    defaults: 0,
    tabs: 1,
    lists: 2,
    playlists: 3,
    statusbar: 4,
    console: 5
};

// Used in window.SetCursor()
var IDC_HAND = 32649;

var g_is_default_ui = window.InstanceType;
var g_font = null;
var g_text = "";
var g_text2 = "";
var ww = 0, wh = 0;
var g_textcolor = 0, g_textcolor_hl = 0;
var g_backcolor = 0;
var g_hot = false;
get_font();
get_colors();

function get_font() {
    if (g_is_default_ui) { // DUI
        g_font = window.GetFontDUI(FontTypeDUI.defaults);
    } else { // CUI
        g_font = window.GetFontCUI(FontTypeCUI.items);
    }
}

function get_colors() {
    if (g_is_default_ui) { // DUI
        g_textcolor = window.GetColorDUI(ColorTypeDUI.text);
        g_textcolor_hl = window.GetColorDUI(ColorTypeDUI.highlight);
        g_backcolor = window.GetColorDUI(ColorTypeDUI.background);
    } else { // CUI
        g_textcolor = window.GetColorCUI(ColorTypeCUI.text);
        g_textcolor_hl = window.GetColorCUI(ColorTypeCUI.text);
        g_backcolor = window.GetColorCUI(ColorTypeCUI.background);
    }
}

function on_size() {
    ww = window.Width;
    wh = window.Height;
}

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, g_backcolor);
    gr.GdiDrawText(g_text + "\n" + g_text2, g_font, g_hot ? g_textcolor_hl : g_textcolor, 0, 0, ww, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
}

function on_mouse_lbtn_up(x, y) {
    window.ShowConfigure();
}

function on_mouse_move() {
    if (!g_hot) {
        g_hot = true;
        window.SetCursor(IDC_HAND);
        window.Repaint();
    }
}

function on_mouse_leave() {
    if (g_hot) {
        g_hot = false;
        window.Repaint();
    }
}

function on_font_changed() {
    get_font();
    window.Repaint();
}

function on_colors_changed() {
    get_colors();
    window.Repaint();
}

function on_playback_time(){
    g_text = fb.TitleFormat("%playback_time%").Eval();
    g_text2 = fb.TitleFormat("%length%").Eval();
    window.Repaint();
}


Re: foo_youtube

Reply #882
Before, we could drag Youtube videos from the google search page and drop them directly in a fb2k playlist, but this does not work anymore. Now it only works when dragging videos from the Youtube website. Would it be possible to fix this?

Re: foo_youtube

Reply #883
Before, we could drag Youtube videos from the google search page and drop them directly in a fb2k playlist, but this does not work anymore. Now it only works when dragging videos from the Youtube website. Would it be possible to fix this?
It's more likely caused by google rather than foo_yt. When you 'drag' link to fb2k it just copies the url that was under your mouse. Youtube itself contains proper urls (youtube.com/etc), but search results from google are redirects and are not direct links to youtube videos. To remove redirects you have to use browser add-ons or alternative search engines like duckduckgo.


Re: foo_youtube

Reply #885
In JS use
fb.TitleFormat("%length%").EvalwithMetadb(fb.GetNowPlaying())

Re: foo_youtube

Reply #886
If the file really is raw AAC then foobar has never supported the length. The solution for local files has always been to wrap them in an m4a container. I have no idea about youtube.

ignore  :P


Re: foo_youtube

Reply #888
@TheQwertiest @zeremy
Nice catch! Regression was introduced in v2.1. Fixed in beta2.

@MaCs
For now you can check checkbox in advanced preferences tree -> Analysis -> Process unknown URLs. I will make Google search URLs not to require this option to be set, since they contain URL inside query, i.e. do not require performing Internet request to resolve redirection.

Re: foo_youtube

Reply #889
@3dyd
It seems that recent changes have broken local video playback..
From Version 2.2beta1 afterwards.

Re: foo_youtube

Reply #890
Thanks, fixed.

What can be done on the component side. When writing and reading metadata, it may ignore (do not report nor store) other metadata if %cuesheet% field is present. How about that?
Done this different way. When constructing subsong metadata, metadata from cuesheet now (in beta3) takes precedence over metadata from origin track. Seem to be reliable but I'm not sure then why in SDK it is done in an opposite way (__set_tag_global_field_relay).

Re: foo_youtube

Reply #891
@3dyd : Hey again!
Could you please an additional tag for YT playlist name for when importing tracks as YT playlist? Use case: I have multiple imported YT playlists which I sometimes group and\or sort based on playlist name, for now I'm setting playlist name tag manually, but it would be nice if it could be automated.

Re: foo_youtube

Reply #892
Noted. This cannot be the default behavior since the video can belong to multiple playlists. So, I guess, this will be an extension, like it is currently done with %tracknumber%.

Re: foo_youtube

Reply #893
Clip title parsing rule - what's the regex for Artist - Title (Somebody Remix)?

Thanks!

Re: foo_youtube

Reply #894
Any way to play video with subs?
For example, i have:
---------------------------------------------------
Sylwia Banasik i Krzysztof Szczepaniak - Jeszcze dzisiaj wracasz tam (Bonnie i Clyde).mp4
Sylwia Banasik i Krzysztof Szczepaniak - Jeszcze dzisiaj wracasz tam (Bonnie i Clyde).srt
---------------------------------------------------
I want that when i watch *.mp4 via foo_youtube, subtitle autoload. Is that possible?
My software: Windows 7 x64, foobar 1.3.17, foo_youtube 2.2.1, K-Lite Codec Pack 13.7.5 Basic.

Re: foo_youtube

Reply #895
Clip title parsing rule - what's the regex for Artist - Title (Somebody Remix)?
Clip title parsing uses regex internally, but rule itself is not regex. I'm not totally sure what you want (strip part inside parentheses?), but you may find answer here.

Any way to play video with subs?
Currently this is impossible.

 

Re: foo_youtube

Reply #897
@3dyd : Hey again!
Some YT videos stopped working (API changes again?).

Examples:
url: https://www.youtube.com/watch?v=3N22p2VgFnE
error: Unable to open item for playback (server error (403) from r2---sn-o5035oxu-n8vl.googlevideo.com):
"www.youtube.com/watch?v=3N22p2VgFnE"

url: www.youtube.com/watch?v=tkJht1Pu1qw
error: Unable to open item for playback (server error (403) from r1---sn-o5035oxu-n8vl.googlevideo.com):
"www.youtube.com/watch?v=tkJht1Pu1qw"

Re: foo_youtube

Reply #898
@3dyd : Hey again!
Some YT videos stopped working (API changes again?).

Examples:
url: https://www.youtube.com/watch?v=3N22p2VgFnE
error: Unable to open item for playback (server error (403) from r2---sn-o5035oxu-n8vl.googlevideo.com):
"www.youtube.com/watch?v=3N22p2VgFnE"

url: www.youtube.com/watch?v=tkJht1Pu1qw
error: Unable to open item for playback (server error (403) from r1---sn-o5035oxu-n8vl.googlevideo.com):
"www.youtube.com/watch?v=tkJht1Pu1qw"

I second this report. Me and some friends experience the same thing. YT API probably.
Happens to about 80% of the songs on my playlist.
Doesn't seem to happen to a few songs, e.g. https://www.youtube.com/watch?v=_6FBfAQ-NDE

Kind regards,
Sanchez

Re: foo_youtube

Reply #899
Thanks. Confirmed. Fix is in progress.

 
SimplePortal 1.0.0 RC1 © 2008-2018