I use the following modules to upload videos to Youtube:
Media Mover 6.x-1.0-beta7
Media Youtube: 6.x-1.2
Embedded Media Field 6.x-2.4
I have selected "Store remote thumbnail for this field" for content type emfield.
Instead of the proper thumbnail of the video, a default thumbnail that Youtube uses during upload of a video is captured. I suspect that emfield grabs the thumbnail path before a thumbnail of the new video has been generated on the Youtube server.

Any idea if this is a bug or wrong configuration?

Thanks for your suggestions!

Comments

kimlop’s picture

i have the same problem (+subscribe)

aaron’s picture

Status: Active » Needs work

hmmm... i'm seeing the same issue. apparently, the issue is that we're grabbing the file before the new one has been generated. by the time the new one is available, we've already stored a copy, so we don't bother trying again.

i'm not sure of the best fix for this -- although maybe we can simply always try to fetch it again if the status changes to available. making a note here so i remember to try to do that...

zuriwest’s picture

@aaron,

The xml data retrieval has the same issue. By the time the request is made and complete, the video is still processing on the Youtube side.
Therefore important information about the video like duration, etc won't be available. Because the youtube url to the video is correct and doesn't change, the system thinks that the cached data is good and never bothers to update.

I'm currently working around it by setting $cached to false in function emfield_request_xml and I've defined a rule to re-save the node on cron runs in rules module.
This however, is not a permanent solution.

andralex’s picture

I have the same problem (+subscribe).
Have you already fix this?

rodricels’s picture

In my site, with the same module's versions, the thumb store works properly. The problem is grabbing the thumb's URL.

If you're using the emthumb, it works with an one-line modification:

file: media_youtube.theme.inc
function template_preprocess_media_youtube_flash() near line 124:

// Now just grab the thumnbail path, if needed (for Longtail).
     $tn_options['return_url'] = TRUE;
-    $variables['thumbnail_path'] = isset($variables['thumbnail_path']) ? $variables['thumbnail_path'] : theme('emvideo_video_thumbnail', NULL, array('value' => $video_id, 'provider' => 'youtube'), 'emvideo_thumbnail', $variables['node'], TRUE, $tn_options);
+    $variables['thumbnail_path'] = isset($variables['thumbnail_path']) ? $variables['thumbnail_path'] : theme('emvideo_video_thumbnail', NULL, $variables['item'], 'emvideo_thumbnail', $variables['node'], TRUE, $tn_options);
thuanvo’s picture

I have a problem that i think the same as yours.
When I choose a new thumnail for my youtube video, and re-upload with url of video, Newest thumnail didn't effect.
I have just detected in module media_youtube and see this function:

function getOriginalThumbnailPath() {
$parts = $this->get_parameters();
return 'http://img.youtube.com/vi/' . check_plain($parts['v']) . '/0.jpg'; // this is the problem
}

Result of above function always returns thumail which be the first of youtube video, not current thumnail.

Solution to resolve this issue:
return 'http://img.youtube.com/vi/' . check_plain($parts['v']) . '/hqdefault.jpg?rand=' . REQUEST_TIME;
** ?rand=' . REQUEST_TIME; : reject the case that server cache url.
Of course you have to change in media-youtube module. ^^