Has multipass been tested for generating ogv files? I'm trying to convert a .mov video to .ogv. The video stream is always broken in the resulting container. However, when I run the ffmpeg commands by hand, the video stream works.

Here are the ffmpeg commands that the video module produces:

'/home/MYDIR/public_html/media/sites/default/files/videos/original/MYVIDEO.mov' -strict experimental -vcodec 'libtheora' -s '1280x720' -acodec 'vorbis' -b '1024k' -pix_fmt 'yuv420p' -ab '128000' -ac '2' -pass '1' -passlogfile '/tmp/1342502389-5004f5f515692-multipass' /tmp/1342502389-5004f5f514eb7.ogv

'/home/MYDIR/public_html/media/sites/default/files/videos/original/MYVIDEO.mov' -strict experimental -vcodec 'libtheora' -s '1280x720' -acodec 'vorbis' -b '1024k' -pix_fmt 'yuv420p' -ab '128000' -ac '2' -pass '2' -passlogfile '/tmp/1342502389-5004f5f515692-multipass' /tmp/1342502389-5004f5f514eb7.ogv

When I run the commands by hand, ffmpeg asks if I want to overrwite the existing ogv file that was created in pass 1. Is there any chance that during the video module's execution of these commands, the second pass isn't actually overwriting the file created in the first pass? Or is there any chance the file created in pass 1 is getting copied over and used as the final before pass 2 is complete?

Also, I noticed that the temporary directory created by the FFMPEG Factory implementation is getting created but not actually getting used. I'm using ffmpeg > v.10, so it's creating the pass log files in /tmp rather than the current working directory.

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

What is the exact version of the Video module that you are using?
When you disable two pass encoding for the OGV preset (it's in the advanced settings), does it work.

aasarava’s picture

Hi Jorrit, I'm running 7.x-2.6+60-dev, with ffmpeg 0.10.4. When I force a single pass for the OGV preset, it works.

In my OGV preset, I'm using "libtheora Theora" and "libvorbis Vorbis" codecs. For video, I have to explicitly set the bit rate to 2048kbps to get any decent quality. I am *not* using any of the ffmpeg presets, since ffmpeg 0.10.4 and later doesn't ship with any of the "baseline" or "default" or "hq" presets anymore.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have the same experience. The fact that FFmpeg asks you to overwrite the file when you execute the second call indicates to me that it doesn't recognize that it should use two-pass encoding. I have added code to disable two-pass encoding for Ogg.

Status: Fixed » Closed (fixed)

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

Jorrit’s picture

Because of issue #1719360 I reinvestigated this problem. I tried some command line examples from the internet and it appears that the question to overwrite the file is normal. I have added code to add -y to the command line so the overwrite is working.

aasarava’s picture

Thanks for taking another look, Jorrit. I installed the dev version and disabled the "force one-pass" option in my ogv preset, but am getting errors during transcoding. What preset settings are you using to get it to work for you?

PHPVideoToolkit error: Execute error. It was not possible to encode "/home/rtest/public_html/media/sites/default/files/videos/original/test.mov" 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".

Jorrit’s picture

There should be more info in the Drupal error log, can you post all of it?

aasarava’s picture

Sure:

FFmpeg failed to transcode test.mov.
Reported errors

PHPVideoToolkit error: Execute error. It was not possible to encode "/home/rtest/public_html/media/sites/default/files/videos/original/test.mov" 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".
Executed commands and output

/usr/local/bin/ffmpeg -i '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov'
ffmpeg version 0.10.4 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 17 2012 10:50:52 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-libdirac --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab --enable-libtheora --enable-libvorbis --enable-libvpx
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov':
Metadata:
creation_time : 2012-04-30 08:53:15
Duration: 00:01:13.00, start: 0.000000, bitrate: 24629 kb/s
Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1280x720, 24372 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
At least one output file must be specified
/usr/local/bin/ffmpeg -i '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov' -strict experimental -vcodec 'libx264' -s '1280x720' -acodec 'libfaac' -pix_fmt 'yuv420p' -ac '2' -pass '1' -passlogfile '/tmp/1345499110-5032afe64429a-multipass' -y /tmp/1345499110-5032afe643eb0.mp4
ffmpeg version 0.10.4 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 17 2012 10:50:52 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-libdirac --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab --enable-libtheora --enable-libvorbis --enable-libvpx
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov':
Metadata:
creation_time : 2012-04-30 08:53:15
Duration: 00:01:13.00, start: 0.000000, bitrate: 24629 kb/s
Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1280x720, 24372 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
[buffer @ 0x8e2c420] w:1280 h:720 pixfmt:yuvj420p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x8e4d640] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x8e4da20] w:1280 h:720 fmt:yuvj420p -> w:1280 h:720 fmt:yuv420p flags:0x4
[libx264 @ 0x8e34e80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x8e34e80] profile Main, level 3.1
[libx264 @ 0x8e34e80] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=24 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/1345499110-5032afe643eb0.mp4':
Metadata:
creation_time : 2012-04-30 08:53:15
encoder : Lavf53.32.100
Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1280x720, q=-1--1, pass 1, 24 tbn, 24 tbc
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 16000 Hz, 2 channels, s16, 128 kb/s
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> libx264)
Stream #0:1 -> #0:1 (pcm_s16be -> libfaac)
Press [q] to stop, [?] for help
frame= 29 fps= 0 q=0.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s
frame= 53 fps= 53 q=0.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s
frame= 71 fps= 47 q=28.0 size= 111kB time=00:00:00.04 bitrate=21836.0kbits/s
frame= 88 fps= 44 q=28.0 size= 375kB time=00:00:00.75 bitrate=4092.2kbits/s
frame= 103 fps= 41 q=28.0 size= 587kB time=00:00:01.37 bitrate=3495.3kbits/s
frame= 117 fps= 39 q=28.0 size= 783kB time=00:00:01.95 bitrate=3274.7kbits/s
frame= 130 fps= 37 q=28.0 size= 983kB time=00:00:02.50 bitrate=3219.6kbits/s
frame= 144 fps= 35 q=28.0 size= 1206kB time=00:00:03.08 bitrate=3203.0kbits/s
frame= 160 fps= 35 q=28.0 size= 1467kB time=00:00:03.75 bitrate=3204.0kbits/s
frame= 174 fps= 34 q=28.0 size= 1702kB time=00:00:04.33 bitrate=3217.6kbits/s
frame= 188 fps= 33 q=28.0 size= 1929kB time=00:00:04.91 bitrate=3213.3kbits/s
frame= 201 fps= 33 q=28.0 size= 2136kB time=00:00:05.45 bitrate=3206.4kbits/s
frame= 216 fps= 32 q=28.0 size= 2410kB time=00:00:06.08 bitrate=3245.1kbits/s
frame= 230 fps= 32 q=28.0 size= 2640kB time=00:00:06.66 bitrate=3243.7kbits/s
frame= 245 fps= 32 q=28.0 size= 2892kB time=00:00:07.29 bitrate=3249.1kbits/s
frame= 260 fps= 32 q=28.0 size= 3115kB time=00:00:07.91 bitrate=3223.2kbits/s
frame= 278 fps= 32 q=28.0 size= 3418kB time=00:00:08.66 bitrate=3230.6kbits/s
frame= 291 fps= 31 q=28.0 size= 3642kB time=00:00:09.20 bitrate=3240.2kbits/s
frame= 300 fps= 31 q=28.0 size= 3780kB time=00:00:09.58 bitrate=3230.9kbits/s
frame= 318 fps= 31 q=28.0 size= 4079kB time=00:00:10.33 bitrate=3234.0kbits/s
frame= 335 fps= 31 q=28.0 size= 4453kB time=00:00:11.04 bitrate=3303.7kbits/s
frame= 348 fps= 31 q=28.0 size= 4665kB time=00:00:11.58 bitrate=3299.0kbits/s
frame= 362 fps= 30 q=28.0 size= 4968kB time=00:00:12.16 bitrate=3345.1kbits/s
frame= 378 fps= 30 q=28.0 size= 5278kB time=00:00:12.83 bitrate=3369.3kbits/s
frame= 391 fps= 30 q=28.0 size= 5611kB time=00:00:13.37 bitrate=3436.6kbits/s
frame= 401 fps= 30 q=28.0 size= 5810kB time=00:00:13.79 bitrate=3451.1kbits/s
frame= 417 fps= 30 q=28.0 size= 6133kB time=00:00:14.45 bitrate=3475.1kbits/s
frame= 434 fps= 30 q=28.0 size= 6460kB time=00:00:15.16 bitrate=3489.4kbits/s
frame= 449 fps= 30 q=28.0 size= 6766kB time=00:00:15.79 bitrate=3509.9kbits/s
frame= 463 fps= 30 q=28.0 size= 7046kB time=00:00:16.37 bitrate=3525.1kbits/s
frame= 478 fps= 30 q=28.0 size= 7369kB time=00:00:17.00 bitrate=3551.1kbits/s
frame= 492 fps= 30 q=28.0 size= 7655kB time=00:00:17.58 bitrate=3566.6kbits/s
frame= 506 fps= 30 q=28.0 size= 7909kB time=00:00:18.16 bitrate=3566.5kbits/s
frame= 520 fps= 30 q=28.0 size= 8166kB time=00:00:18.75 bitrate=3567.7kbits/s
frame= 538 fps= 30 q=28.0 size= 8476kB time=00:00:19.50 bitrate=3560.9kbits/s
frame= 552 fps= 30 q=28.0 size= 8714kB time=00:00:20.08 bitrate=3554.4kbits/s
frame= 566 fps= 30 q=28.0 size= 8967kB time=00:00:20.66 bitrate=3554.4kbits/s
frame= 580 fps= 30 q=28.0 size= 9312kB time=00:00:21.25 bitrate=3589.7kbits/s
frame= 594 fps= 29 q=28.0 size= 9579kB time=00:00:21.83 bitrate=3594.2kbits/s
frame= 608 fps= 29 q=28.0 size= 9854kB time=00:00:22.41 bitrate=3600.9kbits/s
frame= 622 fps= 29 q=28.0 size= 10114kB time=00:00:23.00 bitrate=3602.3kbits/s
frame= 636 fps= 29 q=28.0 size= 10361kB time=00:00:23.58 bitrate=3599.2kbits/s
frame= 652 fps= 29 q=28.0 size= 10624kB time=00:00:24.25 bitrate=3588.8kbits/s
frame= 667 fps= 29 q=28.0 size= 10838kB time=00:00:24.87 bitrate=3569.3kbits/s
frame= 682 fps= 29 q=28.0 size= 11111kB time=00:00:25.50 bitrate=3569.4kbits/s
frame= 696 fps= 29 q=28.0 size= 11349kB time=00:00:26.08 bitrate=3564.4kbits/s
frame= 712 fps= 29 q=28.0 size= 11612kB time=00:00:26.75 bitrate=3556.0kbits/s
frame= 727 fps= 29 q=28.0 size= 11852kB time=00:00:27.37 bitrate=3546.6kbits/s
frame= 740 fps= 29 q=28.0 size= 12089kB time=00:00:27.91 bitrate=3547.5kbits/s
frame= 753 fps= 29 q=28.0 size= 12325kB time=00:00:28.45 bitrate=3547.8kbits/s
frame= 768 fps= 29 q=28.0 size= 12631kB time=00:00:29.08 bitrate=3557.9kbits/s
frame= 782 fps= 29 q=28.0 size= 12897kB time=00:00:29.66 bitrate=3561.4kbits/s
frame= 796 fps= 29 q=25.0 size= 13202kB time=00:00:30.25 bitrate=3575.3kbits/s
frame= 812 fps= 29 q=28.0 size= 13551kB time=00:00:30.91 bitrate=3590.6kbits/s
frame= 830 fps= 29 q=28.0 size= 13960kB time=00:00:31.66 bitrate=3611.3kbits/s
frame= 848 fps= 29 q=28.0 size= 14297kB time=00:00:32.41 bitrate=3612.9kbits/s
frame= 864 fps= 29 q=28.0 size= 14597kB time=00:00:33.08 bitrate=3614.4kbits/s
frame= 882 fps= 29 q=28.0 size= 14947kB time=00:00:33.83 bitrate=3619.1kbits/s
frame= 900 fps= 29 q=28.0 size= 15312kB time=00:00:34.58 bitrate=3627.1kbits/s
frame= 915 fps= 29 q=28.0 size= 15590kB time=00:00:35.20 bitrate=3627.3kbits/s
frame= 930 fps= 29 q=28.0 size= 15908kB time=00:00:35.83 bitrate=3636.8kbits/s
frame= 946 fps= 29 q=28.0 size= 16232kB time=00:00:36.50 bitrate=3643.1kbits/s
frame= 960 fps= 29 q=28.0 size= 16504kB time=00:00:37.08 bitrate=3645.8kbits/s
frame= 971 fps= 29 q=28.0 size= 16715kB time=00:00:37.54 bitrate=3647.5kbits/s
frame= 982 fps= 29 q=28.0 size= 16939kB time=00:00:38.00 bitrate=3651.8kbits/s
frame= 995 fps= 29 q=28.0 size= 17157kB time=00:00:38.54 bitrate=3646.8kbits/s
frame= 1007 fps= 29 q=28.0 size= 17384kB time=00:00:39.04 bitrate=3647.7kbits/s
frame= 1020 fps= 29 q=28.0 size= 17644kB time=00:00:39.58 bitrate=3651.6kbits/s
frame= 1034 fps= 29 q=28.0 size= 17900kB time=00:00:40.16 bitrate=3650.8kbits/s
frame= 1050 fps= 29 q=28.0 size= 18182kB time=00:00:40.83 bitrate=3647.7kbits/s
frame= 1067 fps= 29 q=28.0 size= 18463kB time=00:00:41.54 bitrate=3640.8kbits/s
frame= 1080 fps= 29 q=28.0 size= 18782kB time=00:00:42.08 bitrate=3656.2kbits/s
frame= 1092 fps= 29 q=28.0 size= 19001kB time=00:00:42.58 bitrate=3655.3kbits/s
frame= 1108 fps= 29 q=28.0 size= 19325kB time=00:00:43.25 bitrate=3660.4kbits/s
frame= 1122 fps= 29 q=28.0 size= 19601kB time=00:00:43.83 bitrate=3663.2kbits/s
frame= 1135 fps= 29 q=28.0 size= 19867kB time=00:00:44.37 bitrate=3667.5kbits/s
frame= 1150 fps= 29 q=28.0 size= 20129kB time=00:00:45.00 bitrate=3664.4kbits/s
frame= 1164 fps= 29 q=28.0 size= 20335kB time=00:00:45.58 bitrate=3654.5kbits/s
frame= 1181 fps= 29 q=28.0 size= 20579kB time=00:00:46.29 bitrate=3641.8kbits/s
frame= 1197 fps= 29 q=28.0 size= 20857kB time=00:00:46.95 bitrate=3638.5kbits/s
frame= 1214 fps= 29 q=28.0 size= 21133kB time=00:00:47.66 bitrate=3631.9kbits/s
frame= 1228 fps= 29 q=28.0 size= 21360kB time=00:00:48.25 bitrate=3626.5kbits/s
frame= 1243 fps= 29 q=28.0 size= 21639kB time=00:00:48.87 bitrate=3627.0kbits/s
frame= 1260 fps= 29 q=28.0 size= 21951kB time=00:00:49.58 bitrate=3626.7kbits/s
frame= 1275 fps= 29 q=28.0 size= 22235kB time=00:00:50.20 bitrate=3627.8kbits/s
frame= 1289 fps= 29 q=28.0 size= 22495kB time=00:00:50.79 bitrate=3628.1kbits/s
frame= 1296 fps= 29 q=25.0 size= 22614kB time=00:00:51.08 bitrate=3626.4kbits/s
frame= 1312 fps= 29 q=28.0 size= 22918kB time=00:00:51.75 bitrate=3628.0kbits/s
frame= 1330 fps= 29 q=28.0 size= 23383kB time=00:00:52.50 bitrate=3648.6kbits/s
frame= 1346 fps= 29 q=28.0 size= 23675kB time=00:00:53.16 bitrate=3647.9kbits/s
frame= 1360 fps= 29 q=28.0 size= 23933kB time=00:00:53.75 bitrate=3647.6kbits/s
frame= 1375 fps= 29 q=28.0 size= 24211kB time=00:00:54.37 bitrate=3647.5kbits/s
frame= 1390 fps= 29 q=28.0 size= 24525kB time=00:00:55.00 bitrate=3652.9kbits/s
frame= 1404 fps= 29 q=28.0 size= 24788kB time=00:00:55.58 bitrate=3653.3kbits/s
frame= 1419 fps= 29 q=28.0 size= 25076kB time=00:00:56.20 bitrate=3654.6kbits/s
frame= 1433 fps= 29 q=28.0 size= 25324kB time=00:00:56.79 bitrate=3653.0kbits/s
frame= 1446 fps= 29 q=28.0 size= 25592kB time=00:00:57.33 bitrate=3656.7kbits/s
frame= 1460 fps= 29 q=28.0 size= 25852kB time=00:00:57.91 bitrate=3656.7kbits/s
frame= 1473 fps= 29 q=28.0 size= 26097kB time=00:00:58.45 bitrate=3657.0kbits/s
frame= 1485 fps= 29 q=28.0 size= 26347kB time=00:00:58.95 bitrate=3660.8kbits/s
frame= 1500 fps= 29 q=28.0 size= 26629kB time=00:00:59.58 bitrate=3661.1kbits/s
frame= 1516 fps= 29 q=28.0 size= 26943kB time=00:01:00.25 bitrate=3663.3kbits/s
frame= 1530 fps= 29 q=28.0 size= 27172kB time=00:01:00.83 bitrate=3659.1kbits/s
frame= 1544 fps= 29 q=28.0 size= 27410kB time=00:01:01.41 bitrate=3656.0kbits/s
frame= 1558 fps= 29 q=28.0 size= 27642kB time=00:01:02.00 bitrate=3652.3kbits/s
frame= 1572 fps= 29 q=28.0 size= 27968kB time=00:01:02.58 bitrate=3661.0kbits/s
frame= 1587 fps= 29 q=28.0 size= 28246kB time=00:01:03.20 bitrate=3660.8kbits/s
frame= 1605 fps= 29 q=28.0 size= 28547kB time=00:01:03.95 bitrate=3656.4kbits/s
frame= 1620 fps= 29 q=28.0 size= 28785kB time=00:01:04.58 bitrate=3651.2kbits/s
frame= 1638 fps= 29 q=28.0 size= 29091kB time=00:01:05.33 bitrate=3647.7kbits/s
frame= 1656 fps= 29 q=28.0 size= 29408kB time=00:01:06.08 bitrate=3645.5kbits/s
frame= 1671 fps= 29 q=28.0 size= 29681kB time=00:01:06.70 bitrate=3645.0kbits/s
frame= 1686 fps= 29 q=28.0 size= 29908kB time=00:01:07.33 bitrate=3638.7kbits/s
frame= 1701 fps= 29 q=28.0 size= 30165kB time=00:01:07.95 bitrate=3636.2kbits/s
frame= 1715 fps= 29 q=28.0 size= 30394kB time=00:01:08.54 bitrate=3632.7kbits/s
frame= 1733 fps= 29 q=28.0 size= 30677kB time=00:01:09.29 bitrate=3626.7kbits/s
frame= 1752 fps= 28 q=-1.0 Lsize= 32234kB time=00:01:12.91 bitrate=3621.4kbits/s
video:31779kB audio:407kB global headers:0kB muxing overhead 0.147550%
[libx264 @ 0x8e34e80] frame I:8 Avg QP:22.48 size:104144
[libx264 @ 0x8e34e80] frame P:882 Avg QP:24.81 size: 30097
[libx264 @ 0x8e34e80] frame B:862 Avg QP:26.92 size: 5989
[libx264 @ 0x8e34e80] consecutive B-frames: 1.6% 98.4% 0.0% 0.0%
[libx264 @ 0x8e34e80] mb I I16..4: 27.2% 0.0% 72.8%
[libx264 @ 0x8e34e80] mb P I16..4: 12.0% 0.0% 0.0% P16..4: 75.6% 0.0% 0.0% 0.0% 0.0% skip:12.4%
[libx264 @ 0x8e34e80] mb B I16..4: 2.0% 0.0% 0.0% B16..8: 22.5% 0.0% 0.0% direct:17.1% skip:58.3% L0:28.1% L1:42.5% BI:29.5%
[libx264 @ 0x8e34e80] coded y,uvDC,uvAC intra: 50.2% 50.4% 10.6% inter: 26.4% 22.7% 2.0%
[libx264 @ 0x8e34e80] i16 v,h,dc,p: 35% 20% 37% 8%
[libx264 @ 0x8e34e80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17% 13% 7% 8% 8% 10% 8% 8%
[libx264 @ 0x8e34e80] i8c dc,h,v,p: 55% 20% 23% 3%
[libx264 @ 0x8e34e80] Weighted P-Frames: Y:2.9% UV:0.1%
[libx264 @ 0x8e34e80] kb/s:3566.17
/usr/local/bin/ffmpeg -i '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov' -strict experimental -vcodec 'libx264' -s '1280x720' -acodec 'libfaac' -pix_fmt 'yuv420p' -ac '2' -pass '2' -passlogfile '/tmp/1345499110-5032afe64429a-multipass' -y /tmp/1345499110-5032afe643eb0.mp4
ffmpeg version 0.10.4 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 17 2012 10:50:52 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-libdirac --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab --enable-libtheora --enable-libvorbis --enable-libvpx
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov':
Metadata:
creation_time : 2012-04-30 08:53:15
Duration: 00:01:13.00, start: 0.000000, bitrate: 24629 kb/s
Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1280x720, 24372 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
[buffer @ 0x97d7420] w:1280 h:720 pixfmt:yuvj420p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x97f8640] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x97f8a20] w:1280 h:720 fmt:yuvj420p -> w:1280 h:720 fmt:yuv420p flags:0x4
[libx264 @ 0x97dfe80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x97dfe80] constant rate-factor is incompatible with 2pass.
Output #0, mp4, to '/tmp/1345499110-5032afe643eb0.mp4':
Metadata:
creation_time : 2012-04-30 08:53:15
Stream #0:0(eng): Video: h264, yuv420p, 1280x720, q=-1--1, pass 2, 90k tbn, 24 tbc
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream #0:1(eng): Audio: none, 16000 Hz, 2 channels, s16, 128 kb/s
Metadata:
creation_time : 2012-04-30 08:53:15
handler_name :
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> libx264)
Stream #0:1 -> #0:1 (pcm_s16be -> libfaac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Jorrit’s picture

Those log files are not for ogg encoding, but for mp4:

/usr/local/bin/ffmpeg -i '/home/rtest/public_html/media/sites/default/files/videos/original/test.mov' -strict experimental -vcodec 'libx264' -s '1280x720' -acodec 'libfaac' -pix_fmt 'yuv420p' -ac '2' -pass '2' -passlogfile '/tmp/1345499110-5032afe64429a-multipass' -y /tmp/1345499110-5032afe643eb0.mp4

The error is:

constant rate-factor is incompatible with 2pass

You should disable 2-pass encoding or enter a value for "bit rate" in the advanced video settings of your preset.

aasarava’s picture

Ah, thanks for catching that. I explicitly set a bit rate in the advanced settings section and it works now.

But this preset used to work fine without the explicit bit rate, and only stopped working when I upgraded to the recent dev version of the video module. In fact, the bit rate field has a description that says you only need to set it if you don't set the video quality (which I have already set to "High".) So does the quality setting no longer work?

Jorrit’s picture

That is because since one of the last -dev releases, two-pass encoding works again for Ogg Video. Setting the bit rate is only required for two pass. The quality setting is only for Zencoder, at the moment. I am working making the preset settings dependent of the selected transcoder, but I have more important issues to work on for now.