Closed (works as designed)
Project:
Video
Version:
7.x-2.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2011 at 05:42 UTC
Updated:
19 May 2013 at 03:50 UTC
Following the advice here: http://drupal.org/node/990906#comment-3797942 I modified the html5_mp4.inc preset to use the -y overwrite flag. That got around the access denied error but caused a new one:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height nice: /tmp/myvideo.mp4: Permission denied
Anyone run into this and have any suggestions?
Comments
Comment #1
Saoirse1916 commentedI found a link that suggested adding "-r 29.97" to the command:
'!cmd_path -i !videofile -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b 500k -r 29.97 -threads 0 !convertfile',
'!cmd_path -y -i !videofile -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -vpre slow -b 500k -r 29.97 -threads 0 !convertfile'
But I still have the same problem.
Comment #2
Saoirse1916 commentedHere's my latest update:
Video conversion failed for preset html5_mp4. FFMPEG reported the following output: FFmpeg version SVN-r25837, Copyright (c) 2000-2010 the FFmpeg developers built on Nov 28 2010 00:27:04 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC libavutil 50.33. 0 / 50.33. 0 libavcore 0.14. 0 / 0.14. 0 libavcodec 52.97. 2 / 52.97. 2 libavformat 52.87. 1 / 52.87. 1 libavdevice 52. 2. 2 / 52. 2. 2 libavfilter 1.65. 0 / 1.65. 0 libswscale 0.12. 0 / 0.12. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (2997/100) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sites/default/files/videos/original/Butterfly iPhone 720p.mp4': Metadata: major_brand : M4V minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2011-02-21 02:23:12 Duration: 00:02:23.72, start: 0.000000, bitrate: 1122 kb/s Stream #0.0(eng): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 994 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc Metadata: creation_time : 2011-02-21 02:23:12 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 125 kb/s Metadata: creation_time : 2011-02-21 02:23:12 [buffer @ 0x12105da0] w:1280 h:720 pixfmt:yuv420p [libx264 @ 0x12102270] using SAR=1/1 [libx264 @ 0x12102270] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0x12102270] ratecontrol_init: can't open stats file Output #0, mp4, to '/tmp/Butterfly_iPhone_720p.mp4': Stream #0.0(eng): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=10-51, pass 2, 994 kb/s, 90k tbn, 29.97 tbc Metadata: creation_time : 2011-02-21 02:23:12 Stream #0.1(eng): Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s Metadata: creation_time : 2011-02-21 02:23:12 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height nice: /tmp/Butterfly_iPhone_720p.mp4: Permission denied
This is based on the following ffmpeg command:
'!cmd_path -i !videofile -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b 994k -r 29.97 -threads 0 !convertfile',
'!cmd_path -y -i !videofile -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -vpre slow -b 994k -r 29.97 -threads 0 !convertfile'
I tried -b 994k because I saw that the input video listed that as its bitrate, though really the source is itself a 2-pass VBR file.
Comment #3
virtuali1151 commentedI have the same error... anybody have a fix for this???
Cheers.
Comment #4
hypertext200Can you please run them by manually? cause this is depends on the FFMPEG version your using, and please check the advanced FFMPEG transcoding settings, like padding etc
Comment #5
virtuali1151 commentedHeshan... do you mean the advanced settings in the UI...?? Or ffmpeg itself..??
Comment #7
diricia commentedI used the following switches for ffmpeg.
!cmd_path -y -i !videofile -acodec aac -ar 48000 -ab 128k -ac 2 -vcodec libx264 -b 1200k -cmp 256 -subq 7 -trellis 1 -refs 5 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1200k -maxrate 1200k -bufsize 1200k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 16:9 -r 30 -g 90 !convertfile
This works on the command line to create a file, but when I create a new preset file only 2 commands execute (not 4 as is expected). No errors are shown.
Comment #8
hypertext200Comment #9
jantoine commentedI am having similar issues with the html5_mp4 preset.
Here is the specific error message I am receiving when trying to convert an flv to and mp4:
I am running a stock ubuntu 10.04 server. Below is output from a few ffmpeg commands.
"ffmpeg -version":
"ffmpeg -formats"
I have tried both padding options with the same results. What additional information would you like?
Cheers,
Antoine
Comment #10
jantoine commentedFound out that my issues was a little different than the original. In my case, the html5_mp4 preset assumes the machine has a ffmpeg preset 'slow'. Apparently Ubuntu 10.04 does not come with this ffmpeg preset as the text "File for preset 'slow' not found" from my error indicates. I now understand that the module has presets and ffmpeg has its own presets as well!
Cheers,
Antoine
Comment #11
naeluh commentedsub
Comment #12
Jorrit commentedTry compiling ffmpeg yourself. Recent release notes have links to guides to achieve this. You can also try to not use 2-pass encoding.
Comment #13
kourosh.a commentedI have the same issue. Has anyone found a solution ?!
Comment #14
Jorrit commentedPlease post the entire output of FFmpeg.
Comment #15
kourosh.a commentedHi Jorrit,
Thanks for your reply. Here is the full output:
ffmpeg version git-N-30656-g23a29a3-Sherpya, Copyright (c) 2000-2011 the FFmpeg developers
built on Jun 9 2011 03:51:14 with gcc 4.2.5 20090330 (prerelease) [Sherpya]
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 6. 1 / 53. 6. 1
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 14. 1 / 2. 14. 1
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\9633_vid_20120403_104740.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
Duration: 00:02:43.05, start: 0.000000, bitrate: 8115 kb/s
Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 1280x720, 8004 kb/s, PAR 65536:65536 DAR 16:9, 30 fps, 90k tbr, 90k tbn, 180k tbc
Stream #0.1(eng): Audio: aac, 48000 Hz, mono, s16, 96 kb/s
[buffer @ 01d179a0] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:65536/65536 sws_param:
[scale @ 01daaec0] w:1280 h:720 fmt:yuv420p -> w:480 h:270 fmt:yuv420p flags:0x4
[libx264 @ 01e00760] using SAR=1/1
[libx264 @ 01e00760] MB rate (45900000) > level limit (983040)
[libx264 @ 01e00760] using cpu capabilities: MMX2 SSE2 SSE3 Cache64
[libx264 @ 01e00760] MB-tree doesn't support different resolution than 1st pass (480x270 vs 480x360)
Output #0, mp4, to 'D:\media/convert/9633_vid_20120403_104740.mp4':
Stream #0.0(eng): Video: libx264, yuv420p, 480x270 [PAR 1:1 DAR 16:9], q=10-51, pass 2, 256 kb/s, 90k tbn, 90k tbc
Stream #0.1(eng): Audio: libfaac, 22500 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Comment #16
Jorrit commentedThanks. There seems to be a problem where the resolution for your first pass command is different from the resolution for your second pass command ("MB-tree doesn't support different resolution than 1st pass (480x270 vs 480x360)").
Please post your Video module version and the commands that you have entered.
Comment #17
kourosh.a commentedHi Jorrit, This is the commands:
IF "%4" == "" SET RA= -r 25
IF NOT "%4" == "" SET RA= -r %4
IF "%5" == "" SET FR= -g 50
IF NOT "%5" == "" SET FR= -g %5
c:\ffmpeg\ffmpeg.exe -i %1 -vcodec libx264 -b 256000 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 3 -me_range 16%RA%%FR% -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.7 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 6 -directpred 3 -bidir_refine 0 -trellis 2 -flags2 +bpyramid-wpred-mixed_refs-dct8x8+fastpskip -deblockalpha 0 -deblockbeta 0 -threads 6 -pass 1 -s 480x270 -aspect 480:270 -an -f rawvideo -y NUL 2>%2.txt
c:\ffmpeg\ffmpeg.exe -y -i %1 -vcodec libx264 -b 256000 -coder 1 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh -subq 7 -me_range 16%RA%%FR% -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.7 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 6 -directpred 3 -bidir_refine 1 -trellis 2 -flags2 +bpyramid+wpred+mixed_refs-dct8x8+fastpskip -deblockalpha 0 -deblockbeta 0 -threads 6 -pass 2 -s 480x270 -aspect 480:270 -acodec libfaac -ac 2 -ar 22050 -ab 128k %2 2>%2-2.txt
Comment #18
Jorrit commentedPlease post your Video module version
Comment #19
agarwal.sudhanshu commentedHi,
I am facing the same issue on drupal module video-7.x-2.10
PHPVideoToolkit error: Execute error. It was not possible to encode "/public_html/drupal/sites/default/files/videos/original/MVI_0572.AVI" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height".
please help.
Thanks
Sudhanshu