-
Converting mp4 videos
How is it that I can't convert mp4 videos, all other conversions work. What are the settings for this, I'm using 2.8.1 and the conversion is how it is.
<?php
$cmd_ffmpeg = "$config[ffmpeg] -i '$video_src' -acodec libmp3lame -ar 22050 -ab 32 -f flv $video_flv";
# For old version of mplayer
# $cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es";
# For latest version of mplayer
$cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -ofps 24 -vf harddup";
# Convert video to mp4
$cmd_mp4 = "$config[ffmpeg] -i '$video_src' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b 500k $video_flv";
$convert_mp4 = $cmd_mencoder;
$convert_3gp = $cmd_mencoder;
$convert_mov = $cmd_mencoder;
$convert_asf = $cmd_mencoder;
$convert_mpg = $cmd_mencoder;
$convert_avi = $cmd_mencoder;
$convert_mpeg = $cmd_mencoder;
$convert_wmv = $cmd_mencoder;
$convert_rm = $cmd_mencoder;
$convert_dat = $cmd_mencoder;
:confused:
-
Hi,
Login to your FTP and go on Include/Setting/video_format.php
and change this line, to mp4
$video_output_format = 'mp4';
you must have a ffmpeg with h264 installed on your computer and x264
-
This h264 must this be installed on the server where the website is, because no mp4 format video converts yet the video_format.php is set to mp4.
-
Yes the it must be installed on the server where you site is hosted
-
Thanks I'll get onto them.
-
Converting mp4 videos
I checked with my host which is Hostupon and they have this h267 installed , and I'm using 2.8.1 and this is the line $video_output_format = 'mp4'; in video_format.php so I can't understand why the mp4 does not convert.
I get this result everytime
STARTING VIDEO CONVERSION (process_queue.id = 685)
File: /home/saclipsc/public_html/video/Jump_Manual.mp4
$file_extn = mp4
SELECT * FROM `videos` WHERE `video_id`=1720
Video id: 1720
Video Output File Name : /home/saclipsc/public_html/flvideo/4ca4238a0b/13141798701051136434.mp4
$video_flv = Video Output File Name : /home/saclipsc/public_html/flvideo/4ca4238a0b/13141798701051136434.mp4
Find video duration - START
/usr/local/bin/ffmpeg -i /home/saclipsc/public_html/video/Jump_Manual.mp4
FFmpeg version SVN-r18586, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.25. 0 / 52.26. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on May 28 2009 17:45:57, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)
Seems stream 0 codec frame rate differs from container frame rate: 30.00 (30/1) -> 15.00 (15/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/saclipsc/public_html/video/Jump_Manual.mp4':
Duration: 00:00:36.20, start: 0.000000, bitrate: 453 kb/s
Stream #0.0(und): Video: h264, yuv420p, 640x360, 15 tbr, 15 tbn, 30 tbc
Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16
At least one output file must be specified
Source Video bitrate: 453
Duration (ffmpeg): 36
DURATION: 00:36
Create Thumbnail - START
Creating Thumbnail with ffmpeg
/home/saclipsc/public_html/thumb/4ca4238a0b//1720.jpg
/usr/local/bin/ffmpeg -i /home/saclipsc/public_html/video/Jump_Manual.mp4 -ss 00:00:24 -t 00:00:01 -s 320x240 -r 1 -f mjpeg /home/saclipsc/public_html/thumb/4ca4238a0b//1720.jpg
/home/saclipsc/public_html/thumb/4ca4238a0b//1_1720.jpg
/usr/local/bin/ffmpeg -i /home/saclipsc/public_html/video/Jump_Manual.mp4 -ss 00:00:23 -t 00:00:01 -s 170x140 -r 1 -f mjpeg /home/saclipsc/public_html/thumb/4ca4238a0b//1_1720.jpg
/home/saclipsc/public_html/thumb/4ca4238a0b//2_1720.jpg
/usr/local/bin/ffmpeg -i /home/saclipsc/public_html/video/Jump_Manual.mp4 -ss 00:00:15 -t 00:00:01 -s 170x140 -r 1 -f mjpeg /home/saclipsc/public_html/thumb/4ca4238a0b//2_1720.jpg
/home/saclipsc/public_html/thumb/4ca4238a0b//3_1720.jpg
/usr/local/bin/ffmpeg -i /home/saclipsc/public_html/video/Jump_Manual.mp4 -ss 00:00:22 -t 00:00:01 -s 170x140 -r 1 -f mjpeg /home/saclipsc/public_html/thumb/4ca4238a0b//3_1720.jpg
Create Thumbnail with ffmpeg - END
$cmd_convert_v = convert_mp4
463 $cmd_convert = /usr/local/bin/ffmpeg -i '/home/saclipsc/public_html/video/Jump_Manual.mp4' -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -b 500k /home/saclipsc/public_html/flvideo/4ca4238a0b/13141798701051136434.mp4
Return value:
UPDATE `process_queue` SET `status`='6' WHERE `id`='685'
ERROR: failed video conversion.:confused: