Forums Issues

No thumbnail

Subscribe to No thumbnail 12 posts, 4 voices

 
Avatar ngw 15 posts

I migrated all our videos to Heywatch but I have a huge issue. 80% of videos are without a thumbnail, they have a white image saying “no thumbnail”. My code is:

def get_image( encoded_id )
  encoded_video = HeyWatch::EncodedVideo.find( encoded_id )
  thumbnail_source = encoded_video.thumbnail :start => 5, :width => 450, :height => 338
  temp = Tempfile.new( encoded_video.id )
  File.open( temp.path, 'wb' ) { |f| f.write( thumbnail_source ) }
  image = open( temp.path, 'rb' )
end

Don’t know what’s wrong here. Maybe it’s because I encoded more than 500 videos and the machine didn’t have enough resources ? It seems like it stopped after a while …

 
Avatar ngw 15 posts

Well, it seems like first 100 or so video I uploaded thumbnails are generated, after some are generated and some not … I didn’t read of any bandwith/resources limitation with heywatch, if I knew …

 
Avatar ngw 15 posts

I would add that it’s pretty urgent, Heywatch! service has been fantastic till now, but this is a huge downside. I can also provide our staging server access if you need, but we need a solution pretty fast.

 
Avatar Bruno Celeste 374 posts

In fact I’ve just figured out the problem. Amazon S3 returns an error when ffmpeg requests the file to generate a thumbnail. Note that not all the encoded videos are hosted on S3, this is why you got a default thumb instead of the good one not every time.

The only solution I can see right now is to keep the original thumbnail we generated (no resizing). If you kept the encoded video id, you can request each of the encoded videos like this:

GET http://heywatch.com/encoded_video/ID.jpg

You’ll be redirected to the good location of the image.

 
Avatar ngw 15 posts

Hi Bruno, thanks for your answer. When will you fix the issue ? Thumbnails are too small for us (http://www.zooppa.com:8060/ads/19_meetic-it/video/841, remove the port number in a few hours …).

 
Avatar Bruno Celeste 374 posts

Unfortunately, it doesn’t depend on us. Amazon S3 is too strict and doesn’t accept requests from ffmpeg… Can you resize the image using the flash vars? Or maybe you can use Rmagick to resize the thumb?

If I find something, I’ll let you know.

 
Avatar Adam Sherman 10 posts

Does this mean that if we are currently experience the “No Thumbnail” issue, we are shit out of luck?

What determines if a video is stored on S3 or not?

Thank you,

A.

 
Avatar Bruno Celeste 374 posts

Yes there is a problem with S3. We’ll work on that soon.

We use the couple EC2/S3 if we get a huge amount of encode at once.

 
Avatar Adam Sherman 10 posts

We are also seeing some occasions where we get back an empty document for some of our requests. e.g. we request 9 different thumbnails for the same video (to give our users choice) and get back 7 of the 9, with the last two being an empty document. Is this the same issue?

Thanks,

A.

 
Avatar mirzu 1 post

I just recieved a no thumbnail image instead of the thumbnail for the first time.

Is this something that I should plan on happening when Heywatch is busy? Is this an issue that will be resolved?

Is there any way to tell from the listener that this has occurred? I’d like to be able to set up my code to request another thumbnail. . .

 
Avatar Bruno Celeste 374 posts

We’ve just fixed this annoying issue.

The problem is that amazon S3 is pretty slow, so if you ask for the thumbnail at the end of the video (say 30min), you have a good chance to have the no thumbnail. We have a timeout of 15sec to avoid a complete outtage of the system.

We’re aware that the solution to generate thumbnails is not reliable and we’ll work on that for the next release. It will be probably a background process which will send you the image to your FTP / S3, or ping you when done so you can download it. It will be more scalable and efficient.

 
Avatar Adam Sherman 10 posts

Thanks Bruno. I will post here if we see more of the same problem.

A.

Forums Issues