Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The module often grabs blank frames as thumbnails because it seeks too early in the video, based on the %seek value.
Please add a field in admin/settings/video to override the default value for %seek
Meanwhile, I am using a manual override in settings:
Change the ffmpeg code for the automatic thumbnails. Replace -ss %seek
with -ss 2
to grab thumbnails 2 seconds into the video. For more info about ffmpeg, see the official documentation
Comment | File | Size | Author |
---|---|---|---|
#20 | Video6x-38thumbs.jpg | 33.53 KB | decibel.places |
#20 | Video-6x-4x-dev-filefield-error.jpg | 16.71 KB | decibel.places |
#16 | thumbnail_generation.gif | 41.32 KB | iLLin |
#11 | video_phpinfo_1.jpg | 126.66 KB | decibel.places |
#11 | video_phpinfo_2.jpg | 432.99 KB | decibel.places |
Comments
Comment #1
heshanlkNo, do not change it, seems its description is wrong, but actual process behind the seen is, creating number of thumbnails from a video, it will by get video duration and get number of thumbnails from video using video duration and #of frames. I think this is working, until u didnt change any thing in the video settings
Comment #2
decibel.places CreditAttribution: decibel.places commented@heshanmw you are wrong - with the default settings I got blank or black frames from the very beginning (or end?) of the video as thumbnails
when I replaced %seek with the value 2, I got thumbnails from 2 seconds into the video which were usually the titles and appropriate as thumbnails
In the older version of the video module, I think you had a field on admin/settings to set the value for %seek to select the elapsed time for the thumbnail
That is what I am requesting in 6.x-3.x
** half a debug:
in ffmpeg.inc you define $duration line 207
$duration = ffmpeg_auto_playtime($vidfile);
and $seek in line 211
$seek = ($duration/$count) * $i;
so the thumbnails should be evenly distributed through the video, but my results were always adjacent frames from the beginning or end, not sure which, so some value must be changed elsewhere
Comment #3
heshanlkDid you change the number of video thumbnail value? it should create 5 thumbnails (Default). Then you can select one from them. it is not wrong.
Comment #4
decibel.places CreditAttribution: decibel.places commentedno I did not change the default number of thumbnails (5)
I believe that when we set -ss to 2 the thumbs will all be identical (but usable)
please see attached that compares the video import with thumbs and teaser for default settings (unusable) and for -ss 2 which is usable
I recognize your code aims to spread the thumbs through the video - it's not working, and it's not producing usable thumbnails (actually, the default settings appear to produce identical - and unusable - thumbs too)
Comment #5
decibel.places CreditAttribution: decibel.places commentedI am changing this to a bug report since the default settings are not distributing the thumbnails as intended and not producing usable thumbnails
My kludge changing the ffmpeg -ss setting produces usable thumbnails (the numeric value can be adjusted) but it does not have the intended elegance of a set of varied thumbnails to choose from (like YouTube)
Comment #6
heshanlk@decibel.places, this seems some problem with settings, are you sure you have correct settings, please upload another few files and check what will happen, if they are generating correct thumbnails, then there should not be a problem, if you can go through the code, then you can find the line number 207, try to print video duration value then you can see what is the issue, may be video duration is not recognized properly.
Update with details.
Comment #7
decibel.places CreditAttribution: decibel.places commentedI added debug code to ffmpeg.inc
as you can see, the duration is not set and the seek value is always 0
duration count 5 ++ seek 1 0 ++ seek 2 0 ++ seek 3 0 ++ seek 4 0 ++ seek 5 0 ++
so when I override the ffmpeg settings with the -ss value 2, at least I get a thumbnail which is not the first frame
Comment #8
heshanlkPleas try with another files? pleas send me your file, it seems file issue or transcoder not the code
Comment #9
decibel.places CreditAttribution: decibel.places commentedIt happens with every video file.
How am I to send you the files? they are too large to attach here...
but it doesn't matter, it happens with every file (most are wmv format but same problem with flv)
oh- and best wishes for the New Year!
Comment #10
heshanlkThanks for the wishes and wish u da same, I can see the error exists in Windows platform, cause it produces this error with returning no video duration, this ffmpeg plug-in is not compatible with Windows platform, that is the issue. Try in linux server.
Comment #11
decibel.places CreditAttribution: decibel.places commentedIt is a Linux server - sometimes the FastCGI causes problems, but no known problems with ffmpeg
here is my phpinfo
the hosting company, Hot Drupal, is very accomodating with regard to all things Drupal
Comment #12
iLLin CreditAttribution: iLLin commentedI am quite positive this is an ffmpeg issue. If the ffmpeg cannot read the duration of the video, then 0 is returned as the duration and therefore all videos thumbails will return the same screen (0 secs). I just experienced this issue. You need to upgrade your ffmpeg. If you can provide a link for me to download this, i can verify that this is the issue.
Comment #13
decibel.places CreditAttribution: decibel.places commentedmy server admin assures me it is the latest build version of ffmpeg
the site is hosted at Hot Drupal/Holistic which is very Drupal-centric, but I do not have shell access to the level of the ffmpeg binaries
Comment #14
iLLin CreditAttribution: iLLin commentedMind sending me the video? Or giving me a link to the video and I will test it to be sure.
Comment #15
decibel.places CreditAttribution: decibel.places commentedOur videos are tagged at http://faiththedog.info/category/tags/video
some are embedded, like from YouTube, not uploaded
I know this one I uploaded http://faiththedog.info/videos/faith-and-hope-vs-shock-and-awe-original
we are using a CDN server because sometimes the traffic spikes, but we move the video file after upload/conversion and the thumbnails are already created
I just tried the 6.x-2-x.dev of ffmpeg_wrapper but the video module stopped working, WSOD
maybe my video module is old, it's late at night and not a priority right now to sort this out
when I disabled ffmpeg_wrapper and reinstalled video it looks fine now
Comment #16
iLLin CreditAttribution: iLLin commentedThis works on my local box (Mac OS 10.6 FFmpeg 0.5.1) and my dev box CentOS (FFmpeg 0.5). I have attached a screenshot. This is using the latest 4.x-dev version but it seems you are using the 2.x version? The thumbnail generation shouldn't matter though. The new versions are not supporting youtube/google urls as there are better modules out there. We have been focusing on user upload videos instead.
Also CDN support is going to be built in and I was wondering, what CDN do you use?
Comment #17
iLLin CreditAttribution: iLLin commentedAlso, it will matter what you have compiled with ffmpeg. Not just the version. Here is my local ffmpeg information.
rdadmins-MacBook-Pro-2:~ dblake$ ffmpeg -i
FFmpeg version 0.5.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-nonfree --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 1. 4. 0 / 1. 4. 0
libswscale 1. 7. 1 / 1. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 5 2010 12:09:57, gcc: 4.2.1 (Apple Inc. build 5646)
Comment #18
decibel.places CreditAttribution: decibel.places commentedactually we are using Video 6.x-3.8 and the embedded videos are not using the Video module
ffmpeg_wrapper (disabled, see above) provides this info:
FFmpeg version:
FFmpeg 0.5 libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --extra-cflags=-fPIC --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Nov 6 2009 19:11:04, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46)
Comment #19
iLLin CreditAttribution: iLLin commentedHmm, I pulled the version from one of my dev boxes. It matches yours exactly.
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --extra-cflags=-fPIC --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 6 2009 19:11:04, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46)
Dont try this on prod,but try out the 4.x-dev version on a new install of drupal (in the same environment) and see if it created the thumbnails from the video you linked to me. If you can send me that dog video as thats the screen shot you showed up top with that issue. I do know that some videos work for me locally and they don't work on my dev box. I am quite positive its cause my local box has newer versions and codecs than the dev box has. The reason you are getting "all the same thumbnails" is ffmpeg is not able to pull the duration from the video. Therefore it returns 0 and when we do seek times it divides 5 / 0... returning 0 for each thumbnail. Thats why you can change the seek time manually to 2 seconds and return a good thumbnail.
If you can send me that dog xmas video.
Comment #20
decibel.places CreditAttribution: decibel.places commentedI have not uploaded a video recently so I tested it, also after reinstalling Video 6.x-3.8 after disabling FFmpeg_wrapper 6.x-2.x-dev
same problem
you are correct, we get identical thumbnails because they all have the zero seek value 0/5
tried 6.x-4.x-dev but got an error with filefield
6.x-3.9 has same problem as 6.x-3.8
so since I only need one thumbnail, makes sense to set the seek time manually
also, any idea why FFmpeg_wrapper 6.x-2.x-dev caused a problem? I know there are major changes since 1.x, haven't tried the 1.x version
Comment #21
decibel.places CreditAttribution: decibel.places commentedthe doggy Christmas wmv is at http://bit.ly/aYaIX6
Comment #22
iLLin CreditAttribution: iLLin commentedTry and grab 4.x-dev from CVS or wait for the next snapshot, I might of been printing something. Its fixed now.
The doggy christmas worked for me locally and on my dev box.
Comment #23
iLLin CreditAttribution: iLLin commented