I've probably spent the past half hour trying to figure out what could be causing this to no avail, so I'm forced to believe there is currently some bug in the coding.
I am using ffmpeg to convert my videos. The videos convert without a problem, then it fails with a permission denied. It doesn't even mention in the error log what it was trying to do specifically. Actually, I could be wrong, but it seems as if it's trying to literally execute the MP4 file for some insane reason.
The paths are correct, there's no problem generating the thumbnails either.
After conversion, it simple gives off a permission denied error and fails.
I've tried using multiple temp direcotires, same issue.
The temporary folder has full rwx permissions (777). The folder is owned by the use executing the process as well, so there is absolutely no reason there should be any permission errors with it. The only logical explanation I can come up with, is that it's trying to execute the MP4 file. I cannot possibly think as to why, and I could be wrong.
Here is a copy of an example error,
Video conversion failed for preset Testing. FFMPEG reported the following output: FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers built on Feb 5 2011 20:37:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --enable-avfilter --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab --enable-libtheora --enable-libvorbis --enable-libxvid --enable-pthreads libavutil 50.36. 0 / 50.36. 0 libavcore 0.16. 1 / 0.16. 1 libavcodec 52.108. 0 / 52.108. 0 libavformat 52.93. 0 / 52.93. 0 libavdevice 52. 2. 3 / 52. 2. 3 libavfilter 1.74. 0 / 1.74. 0 libswscale 0.12. 0 / 0.12. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/dlanime/drupal/sites/default/files/videos/original/Kekkaishi_yoshimori_and_tokine-jT-ihOHge9E.flv_2.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf52.64.2 Duration: 00:03:35.73, start: 0.000000, bitrate: 168 kb/s Stream #0.0(und): Video: h264, yuv420p, 192x144 [PAR 1:1 DAR 4:3], 68 kb/s, 23.98 fps, 24 tbr, 24 tbn, 48 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 95 kb/s Metadata: creation_time : 1970-01-01 00:00:00 WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s [buffer @ 0xb3edd90] w:192 h:144 pixfmt:yuv420p [scale @ 0xb3ee160] w:192 h:144 fmt:yuv420p -> w:468 h:350 fmt:yuv420p flags:0xa0000004 [pad @ 0xb3ee490] w:468 h:350 -> w:640 h:350 x:86 y:0 color:0x108080FF[yuva] Output #0, mp4, to '/home/dlanime/tmp/Kekkaishi_yoshimori_and_tokine-jT-ihOHge9E.flv_2.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf52.93.0 Stream #0.0(und): Video: mpeg4, yuv420p, 640x350 [PAR 254:255 DAR 16256:8925], q=2-31, 0 kb/s, 15 tbn, 15 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: libfaac, 22050 Hz, stereo, s16, 0 kb/s Metadata: creation_time : 1970-01-01 00:00:00 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 150 fps= 0 q=31.0 size= 207kB time=9.80 bitrate= 172.7kbits/s dup=0 drop=89 frame= 311 fps=311 q=24.8 size= 366kB time=20.53 bitrate= 145.9kbits/s dup=0 drop=185 frame= 464 fps=309 q=31.0 size= 525kB time=30.65 bitrate= 140.4kbits/s dup=0 drop=276 frame= 607 fps=303 q=31.0 size= 732kB time=40.17 bitrate= 149.3kbits/s dup=0 drop=361 frame= 761 fps=304 q=31.0 size= 933kB time=50.48 bitrate= 151.4kbits/s dup=0 drop=454 frame= 908 fps=302 q=24.8 size= 1127kB time=60.23 bitrate= 153.2kbits/s dup=0 drop=542 frame= 1068 fps=305 q=31.0 size= 1306kB time=70.91 bitrate= 150.8kbits/s dup=0 drop=637 frame= 1223 fps=305 q=31.0 size= 1481kB time=81.32 bitrate= 149.2kbits/s dup=0 drop=730 frame= 1376 fps=306 q=31.0 size= 1670kB time=91.49 bitrate= 149.5kbits/s dup=0 drop=822 frame= 1531 fps=306 q=24.8 size= 1878kB time=101.80 bitrate= 151.2kbits/s dup=0 drop=915 frame= 1683 fps=306 q=31.0 size= 2077kB time=111.92 bitrate= 152.0kbits/s dup=0 drop=1005 frame= 1825 fps=304 q=31.0 size= 2274kB time=121.39 bitrate= 153.5kbits/s dup=0 drop=1090 frame= 1981 fps=304 q=31.0 size= 2463kB time=131.80 bitrate= 153.1kbits/s dup=0 drop=1184 frame= 2135 fps=305 q=31.0 size= 2632kB time=142.11 bitrate= 151.7kbits/s dup=0 drop=1276 frame= 2286 fps=304 q=31.0 size= 2806kB time=152.14 bitrate= 151.1kbits/s dup=0 drop=1366 frame= 2442 fps=305 q=31.0 size= 2997kB time=162.49 bitrate= 151.1kbits/s dup=0 drop=1459 frame= 2595 fps=305 q=31.0 size= 3182kB time=172.71 bitrate= 150.9kbits/s dup=0 drop=1551 frame= 2745 fps=304 q=31.0 size= 3392kB time=182.69 bitrate= 152.1kbits/s dup=0 drop=1641 frame= 2895 fps=304 q=31.0 size= 3619kB time=192.73 bitrate= 153.8kbits/s dup=0 drop=1730 frame= 3060 fps=305 q=24.8 size= 3767kB time=203.73 bitrate= 151.5kbits/s dup=0 drop=1829 frame= 3220 fps=306 q=31.0 size= 3943kB time=214.37 bitrate= 150.7kbits/s dup=0 drop=1925 frame= 3230 fps=306 q=31.0 Lsize= 4019kB time=215.33 bitrate= 152.9kbits/s dup=0 drop=1932 video:3314kB audio:641kB global headers:0kB muxing overhead 1.611963% sh: /home/dlanime/tmp/Kekkaishi_yoshimori_and_tokine-jT-ihOHge9E.flv_2.mp4: Permission denied
A copy of my testing preset, which is basically just the defaults.
$preset = array (
'name' => 'Testing',
'description' => 'Preset for testing purposes only. Not for use in production environments.',
'settings' => array (
'device_profile' => '0',
'video_extension' => 'mp4',
'video_codec' => 'h264',
'video_quality' => '2',
'video_speed' => '2',
'width' => '',
'height' => '',
'video_aspectmode' => 'preserve',
'video_upscale' => 0,
'audio_codec' => 'aac',
'audio_quality' => '2',
'deinterlace' => 'detect',
'max_frame_rate' => '',
'frame_rate' => '',
'video_bitrate' => '',
'bitrate_cap' => '',
'buffer_size' => '',
'one_pass' => 0,
'skip_video' => 0,
'audio_bitrate' => '',
'audio_channels' => '2',
'audio_sample_rate' => '',
'skip_audio' => 0,
'autolevels' => 0,
'deblock' => 0,
'denoise' => '0',
'segmented_type' => '0',
'segmented_seconds' => '',
'clip_start' => '',
'clip_length' => '',
'cli_code' => '!ffmpeg -i !videofile -s !widthx!height -r 15 -b 250 -ar 22050 -ab 48 !convertfile',
),
);
I've tried everything I can think of, this error will not go away.
Comments
Comment #1
hypertext200Please download and import http://drupal.org/project/video_presets module. There are couple of presets there you can test. It seems you do not have proper FFMPEG code.
correct one would be
Comment #2
BlackCat commentedThanks!
That -y flag fixed it.
Comment #3
hypertext200Comment #4
leshkanyc commentedSame issue here: conversion goes OK, i can see the .mp4 file being saved in the /tmp folder and at the same time the /var/www/drupal/sites/default/files/videos/converted/{videoID} folder gets created - in my case it's /var/www/drupal/sites/default/files/videos/converted/357, but the file never gets copied there from the /tmp folder -- same error : nice: /tmp/Daydream_Nation.mp4: Permission denied.
So i have no idea if it's a Drupal / Video Module/ or FFMPEG issue.
Comment #5
hypertext200@leshkanyc , which is the version your working?
Comment #6
hypertext200