When I have video uploaded I get the following error:

Deprecated function: Function ereg() is deprecated in video_ffmpeg->get_dimensions() (line 258 of D7/sites/all/modules/video/transcoders/video_ffmpeg.inc).

Warning: Invalid argument supplied for foreach() in video_transcoder->generate_thumbnails() (line 61 of D7/sites/all/modules/video/includes/transcoder.inc).

Comments

hypertext200’s picture

should be your in PHP 5.3. What is the PHP version?

anglo’s picture

the PHP version - 5.3.3-1ubuntu9.3

anglo’s picture

I read that the ereg() function is no longer used in PHP 5.3 . Instead, the preg_match function should be considered.

anglo’s picture

Version: 7.x-1.0-unstable2 » 7.x-1.0-alpha1

Same for 7.x-1.0-alpha1 version.

Deprecated function: Function ereg() is deprecated in video_ffmpeg->get_dimensions() (line 258 of /sites/all/modules/video/transcoders/video_ffmpeg.inc).

Anonymous’s picture

I'm experiencing the same problem.
Did anyone find a solution for this already?
Thanks

404’s picture

I had the same warning.

hypertext200’s picture

Status: Active » Needs review

In video_ffmpeg.inc
line 258:

    // Get dimensions
    $regex = ereg('[0-9]?[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]?', $ffmpeg_output, $regs);

replace with

    // Get dimensions
    $regex = preg_replace('[0-9]?[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]?', $ffmpeg_output, $regs);

This has been added to the dev release, please test the dev release and update the status here. Changing the need review

anglo’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev

The error has gone but new appeared:

Warning: preg_replace() [function.preg-replace]: Unknown modifier '?' in video_ffmpeg->get_dimensions() (line 259 of sites/all/modules/video/transcoders/video_ffmpeg.inc).

Notice: Undefined variable: regs in video_ffmpeg->get_dimensions() (line 259 of sites/all/modules/video/transcoders/video_ffmpeg.inc).

Is it connected with http://drupal.org/node/1103942 ?

hypertext200’s picture

Status: Needs review » Needs work

Is it connected with http://drupal.org/node/1103942 ?

No.

This is a regx issue. I will fix that soon.

hypertext200’s picture

Status: Needs work » Needs review
StatusFileSize
new700 bytes
anglo’s picture

Patched. I get the following error:

Warning: preg_match() [function.preg-match]: Unknown modifier '?' in video_ffmpeg->get_dimensions() (line 259 of sites/all/modules/video/transcoders/video_ffmpeg.inc).

hypertext200’s picture

StatusFileSize
new1.37 KB
anglo’s picture

Patched. The error 's been fixed.

anglo’s picture

Status: Needs review » Fixed

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.