Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: Automatic video thumbnail creation (Requires ffmpeg)  (Read 146994 times)

0 Members and 1 Guest are viewing this topic.

lifter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #20 on: September 07, 2007, 05:37:06 pm »

Thats the first thing to check for as my first post describes.

Appears I have it installed - and this mod still doesn't work ;(

Host confirmed that it's installed and I can see that it is because when I use adrianbj's modification to see a thumb preview during the upload process, I do end up seeing the thumb.  When I try to continue and place the movie into an album - it won't go - the movie does however appear via FTP in an uploaded folder
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #21 on: September 08, 2007, 02:18:08 pm »

Also turn on the debug mode to see the errors (if any).
Logged
Chief Geek at Ranium Systems

lifter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #22 on: September 11, 2007, 07:46:44 pm »

Code: [Select]
/include/picmgmt.inc.php

    * Notice line 50: Undefined index: OS
    * Warning line 72: unlink(albums/edit/af41288e99ed440c5e145f8529725de1%d.jpg) [function.unlink]: No such file or directory

This is the error that I get - it uploads the file, because it's still on my FTP, but it appears it's not placing it because it can't find the thumb (which doesn't get created..)
Logged

lifter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #23 on: September 11, 2007, 07:56:29 pm »

extremely weird... using the modification alexbj posted to see the thumbnail preview while you are uploading, I see the thumbnail.... so ffmpeg is installed and working, however when I press 'continue' to place the file into an album, it still says "The file could not be placed" and still gives this error:

Code: [Select]
/include/picmgmt.inc.php

    * Notice line 50: Undefined index: OS
    * Warning line 72: unlink(albums/edit/e0bde2401ccb0498f3e3b4dc66e266ab%d.jpg) [function.unlink]: No such file or directory
Logged

lifter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #24 on: September 11, 2007, 08:01:17 pm »

Not sure if this helps, but the thumbnail preview comes up as: /albums/edit/preview_5df573cc1.jpg
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #25 on: September 25, 2007, 08:52:14 am »

@lifter : PM me the admin un/pass, url of your gallery along with a link to this topic. If that doesn't help then i might ask for ftp access too (if you are happy to provide that).
Logged
Chief Geek at Ranium Systems

sokheng

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #26 on: November 19, 2007, 06:12:11 pm »

This mod work perfectly Great! Two Thumbs Up!! If you are able to install ffmpeg, everything will work just fine.
Logged

zendiz

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #27 on: January 14, 2008, 06:19:38 am »

Hi, seems a great hack...but... >:(

I have followed all settings (running cpg4.14 on my server with ffmpeg, and installed all hack lines from this thread)
I manually upload 1 file -> 1 uploads were successful.
Shows thumbnail !! and asks me what album to put file in. (so far so good) -> continue

The previous file was placed successfully. You have successfully placed all the files. -> continue

Then this sucks -> Showing album with this standard uggly Mpeg icon from coppermine  ???

What am I doing wrong.



Logged

zendiz

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #28 on: January 14, 2008, 06:27:59 am »

To add to my post, I just uploaded a movie file with debug mode on, it showed preview of thumbnail as before, no errors during upload.
Still that ridiculous standard coppermine icon when i check the album.  gmmm
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #29 on: January 14, 2008, 06:56:02 am »

Can't say much without looking at your gallery. Provide a test user account (with upload privileges) and the link to your gallery.
Logged
Chief Geek at Ranium Systems

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #30 on: January 20, 2008, 02:01:09 am »

Hi Abbas Ali !!
This is my first post ! Hello to all !!

I have a problem, i copied exactly that you post... but i have this error:

Parse error: parse error, expecting `']'' in C:\Web Server\foto\Coppermine\include\picmgmt.inc.php on line 36

The line 36 is:
    $dest_file = $CONFIG['fullpath']."edit/".md5(uniqid(time()))."%d.jpg";

Any suggestion ?

Regards,
Juan.
Logged

Nibbler

  • Guest
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #31 on: January 20, 2008, 02:39:36 am »

Zip up and attach the file to your next post.
Logged

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #32 on: January 20, 2008, 02:43:31 am »

Hi Nibbler !

Here the picmgmt.inc.php file

Thanks !
Logged

Nibbler

  • Guest
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #33 on: January 20, 2008, 03:04:55 am »

You changed the wrong side of the code

Code: [Select]
$CONFIG['ffmpeg_path'] = '/usr/local/bin/'; // Change the path according to your server.
Change the path and leave the variable name alone.
Logged

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #34 on: January 20, 2008, 03:13:44 am »

Sorry Nibble... terrible error  :o

now i put:
$CONFIG['ffmpeg_path'] = "C:\ffmpeg\"; // Change the path according to your server.

but other error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\Web Server\foto\Coppermine\include\picmgmt.inc.php on line 36

I Have Windows OS
Logged

Nibbler

  • Guest
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #35 on: January 20, 2008, 03:19:56 am »

I Have Windows OS

I know.

Use

Code: [Select]
$CONFIG['ffmpeg_path'] = 'C:\ffmpeg\\'; // Change the path according to your server.

Also reverse where you changed the wrong part in the rest of the code. You only need to set your path once, where instructed to do so.
Logged

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #36 on: January 20, 2008, 03:34:09 am »

Yes ! Work !!
Thanks Nibbler.

One more  ::)

I try to add all enhancing, now i am in : overlap a "play this movie" image (jpeg,gif or png) to the videothumb (like in youtube) by oscar_rocha

After:
Code: [Select]
$return = str_replace("%d", "1", $dest_file);
I add the following code:
Code: [Select]
  $image_path = "C:\Web Server\foto\Coppermine\themes\hardwired\images\Play.jpg"
  $background = imagecreatefromjpeg($return);
  $insert = imagecreatefromgif($image_path);
  imagecolortransparent($insert,imagecolorat($insert,0,0));
  $insert_x = imagesx($insert);
  $insert_y = imagesy($insert);
  imagecopymerge($background,$insert,45,35,0,0,$insert_x,$insert_y,100);
  imagejpeg($background, $return, 100);

But i received the message:
"Parse error: parse error in C:\Web Server\foto\Coppermine\include\picmgmt.inc.php on line 80"

Line 80 is:
Code: [Select]
$background = imagecreatefromjpeg($return);
I check phpinfo() and is OK:
gd
GD Support    enabled
GD Version    bundled (2.0.28 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
GIF Read Support    enabled
GIF Create Support    enabled
JPG Support    enabled
PNG Support    enabled
WBMP Support    enabled
XBM Support    enabled
Logged

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #37 on: January 20, 2008, 03:36:24 am »

SORRY AGAIN... is the time 1 AM here  :'(

i forgot
Code: [Select]
$image_path = "C:\Web Server\foto\Coppermine\themes\hardwired\images\Play.jpg"[b];[/b]
 :-[
Logged

JPNARF

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #38 on: January 30, 2008, 04:51:12 am »

Hi All,
I moved my Coppermine to another OS Windows 2003, i configure all again... import data base, etc.

But i have the problem now, when i try to upload videos using this mod (before in Windows 2000 Work !!) display the PB icon.
Using original file picmgmt.inc.php work, but with the mod not  :-\

Here my debug:

Quote
USER:
------------------
Array
(
    [ID] => a298ee8ceb581dab4ac09e99b4f82a3c
    [am] => 1
    [uid] => 1
    [liv] => Array
        (
           
  • => 1049
  • [1] => 1045
                [2] => 1048
                [3] => 1052
                [4] => 1040
            )

       
[lap] => 2
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => foto
    [groups] => Array
        (
           
  • => 1

        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 2
    [ufc_min] => 2
    [custom_user_upload] => 0
    [num_file_upload] => 0
    [num_URI_upload] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 2
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM copp_filetypes; (0.037s)
  • [1] => select * from copp_plugins order by priority asc; (0.002s)
        [2] => delete from `fotos`.copp_sessions where time<1201664782 and remember=0; (0.002s)
        [3] => delete from `fotos`.copp_sessions where time<1200458782; (0.001s)
        [4] => select user_id from `fotos`.copp_sessions where session_id=md5("5500db23b9625a3b2426a6a216a1883228db823b029eabc861ae2fac83e293ee"); (0.001s)
        [5] => select user_id as id, user_password as password from `fotos`.copp_users where user_id=1 (0.004s)
        [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `fotos`.copp_users AS u INNER JOIN `fotos`.copp_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.006s)
        [7] => SELECT user_group_list FROM `fotos`.copp_users AS u WHERE user_id='1' and user_group_list <> ''; (0.013s)
        [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM copp_usergroups WHERE group_id in (1) (0.001s)
        [9] => SELECT group_name FROM  copp_usergroups WHERE group_id= 1 (0.002s)
        [10] => update `fotos`.copp_sessions set time='1201668382' where session_id=md5('5500db23b9625a3b2426a6a216a1883228db823b029eabc861ae2fac83e293ee'); (0.002s)
        [11] => SELECT user_favpics FROM copp_favpics WHERE user_id = 1 (0.001s)
        [12] => DELETE FROM copp_banned WHERE expiry < '2008-01-30 01:46:22' (0.002s)
        [13] => SELECT * FROM copp_banned WHERE (ip_addr='10.10.10.1' OR ip_addr='10.10.10.1' OR user_id=1) AND brute_force=0 (0.177s)
        [14] => SELECT aid, title FROM copp_albums WHERE 1 (0.005s)
        [15] => SELECT COUNT(*) FROM copp_pictures WHERE approved = 'NO' (0.001s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
       
[insert] => 1
)

==========================
POST :
------------------
Array
(
    [d0000] => 22
    [pics] => Array
        (
           
  • => i0000
  • [1] => i0001
            )

       
[album_lb_id_i0000] => d0000
    [picfile_i0000] => dXNlcnBpY3MvYS9RdWludGFKSihFbmUtMDgpLmZsdg==
    [album_lb_id_i0001] => d0000
    [picfile_i0001] => dXNlcnBpY3MvYS9TYWtlRHVtYm8ubXBn
    [insert] => Insert selected files
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.5 - OK
------------------
mySQL version: 5.0.45-community-nt
------------------
Coppermine version: 1.4.15(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.45
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .;C:\php5\pear | .;C:\php5\pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | no value | no value
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.398 seconds - 16 queries in 0.257 seconds - Album set : ; Meta set: ;

Thanks !
Logged

worenklein

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Automatic video thumbnail creation (Requires ffmpeg)
« Reply #39 on: May 20, 2008, 05:43:40 am »

What do I need to add to util.php (in the update_thumbs() function)?

My guess is that this is the offending line:

Code: [Select]
$thumb = $CONFIG['fullpath'] . $row['filepath'] . $CONFIG['thumb_pfx'] . $row['filename'];

Sorry, I'm not a PHP guy yet (give me a few days -- if I can figure out TCL, I can figure out anything  :D)
Logged
David C Worenklein
Pages: 1 [2] 3   Go Up
 

Page created in 0.027 seconds with 19 queries.