C2DH / tim

Timecode Indexing Module
https://c2dh.github.io/tim/
MIT License
6 stars 6 forks source link

If the media type is a YouTube URL, make the <host></host> tag in the OHMS XML export = YouTube #30

Closed overZellis133 closed 3 years ago

overZellis133 commented 3 years ago

Currently when importanting our OHMS XML export, everything displays beautifully except for the YouTube video. I have tested this, and if we populate the tag with "YouTube" as YouTube, then the YouTube video will display properly in OHMS.

cartograforce commented 3 years ago

In parallel, other video formats that we have in common with OHMS need to slip in to that field. "Host" (general URL) is probably the most important, then besides YouTube, OHMS does Avalon, Aviary, Brightcove, Kaltura, SoundCloud, Vimeo. How many of those do we support right now?

Laurian commented 3 years ago

AFAIK the YT into host works, I get for example:

<media_id/>
<media_url>https://www.youtube.com/watch?v=-5yh2HcIlkU</media_url>
  <mediafile>
   <host>YouTube</host>
   <avalon_target_domain/>
   <host_account_id/>
   <host_player_id/>
   <host_clip_id/>
   <clip_format>video</clip_format>
 </mediafile>

on what YT url you had issues?

maboa commented 3 years ago

I'm seeing YouTube in the host – eg...

          <media_id/>
          <media_url>https://www.youtube.com/watch?v=2BGr3lzYZT0</media_url>
          <mediafile>
            <host>YouTube</host>
            <avalon_target_domain/>
            <host_account_id/>
            <host_player_id/>
            <host_clip_id/>
            <clip_format>video</clip_format>
          </mediafile>

@cartograforce ?

cartograforce commented 3 years ago

This is the one that's not working: https://www.youtube.com/watch?v=QRE0GxT6Zbw&feature=youtu.be

cartograforce commented 3 years ago

It's not carrying through to OHMS, but I suspect it's OHMS limited to certain YT videos.

overZellis133 commented 3 years ago

@maboa @Laurian, I have no idea why, but this is not working for me... example XML:

      <title>Richard Fenman - Gravitation</title>
      <media_id/>
      <media_url>https://youtu.be/QRE0GxT6Zbw</media_url>
      <mediafile>
        <host>Other</host>
        <avalon_target_domain/>
        <host_account_id/>
        <host_player_id/>
        <host_clip_id/>
        <clip_format>video</clip_format>
      </mediafile>
Laurian commented 3 years ago

Ok, that's a different hostname, I'll write a rule for that one too

overZellis133 commented 3 years ago

Thanks, @Laurian. I got the correct host when the youtube URL contained /watch. It seems like when I grabbed the youtube share link instead we didn't have a rule to set the host to YouTube then.

Laurian commented 3 years ago

I'm going to steal this regexp https://github.com/cookpete/react-player/blob/master/src/patterns.js#L3

maboa commented 3 years ago

@overZellis133 @cartograforce can you confirm this is working now please?

cartograforce commented 3 years ago

I got it to work with one video

https://youtu.be/gyJk1UfWrRs https://youtu.be/gyJk1UfWrRs

But not another

https://www.youtube.com/watch?v=QRE0GxT6Zbw https://www.youtube.com/watch?v=QRE0GxT6Zbw

I’ve been having trouble with this. It may be OHMS… do you see any difference between these two that would make one play and not the other?

I think TIM is working right. I’ll try to test another.

Thanks

On 10 Nov 2020, at 13:07, Mark Boas notifications@github.com wrote:

@overZellis133 https://github.com/overZellis133 @cartograforce https://github.com/cartograforce can you confirm this is working now please?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Laurian/tim/issues/30#issuecomment-724660598, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ7KUAQIU5BRNYRFHDYVGOLSPEUIRANCNFSM4TESDPFQ.

cartograforce commented 3 years ago

I figured this out. Needed to use the share link vs address bar link for YT. It looks good by me. Not sure if @overZellis133 wants to check one / confirm.