Switching from Zencoder to my own ffmpeg on Ubuntu, I have run into the video toolkit error, similar to this reported here: https://www.drupal.org/node/1814518

When I remove any encoding settings that involve mp3, which would throw an "can't encode with this codec" error, I get this new error instead;

Error set options PHPVideoToolkit error: Value "vp6" set from $toolkit->setVideoCodec, can not be used to encode the output as the version of FFmpeg that you are using does not have the capability to encode video with this codec

Also, I got this error on my screen when attempting to encode a video;

Warning: Division by zero in TranscoderAbstractionFactoryFfmpeg->setAspectRatioOptions() (line 677 of /var/www/sites/all/modules/video/transcoders/TranscoderAbstractionFactoryFfmpeg.inc).
Something went wrong with transcoding couriervideogame.mp4. Please check your recent log entries for further debugging.

checking with ffmpeg -codecs I have this successfully installed and enabled:

ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 23 2014 01:16:52 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --prefix=/home/ubuntu/ffmpeg_build --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libmp3lame
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 67.100 / 55. 67.100
libavformat 55. 44.100 / 55. 44.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
...I.. = Intra frame-only codec
....L. = Lossy compression
.....S = Lossless compression
-------
D.VI.. 012v Uncompressed 4:2:2 10-bit
D.V.L. 4xm 4X Movie
D.VI.S 8bps QuickTime 8BPS video
.EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi )
.EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 )
D.V..S aasc Autodesk RLE
D.VIL. aic Apple Intermediate Codec
DEVI.S alias_pix Alias/Wavefront PIX image
DEVIL. amv AMV Video
D.V.L. anm Deluxe Paint Animation
D.V.L. ansi ASCII/ANSI art
DEVIL. asv1 ASUS V1
DEVIL. asv2 ASUS V2
D.VIL. aura Auravision AURA
D.VIL. aura2 Auravision Aura 2
D.V... avrn Avid AVI Codec
DEVI.. avrp Avid 1:1 10-bit RGB Packer
D.V.L. avs AVS (Audio Video Standard) video
DEVI.. avui Avid Meridien Uncompressed
DEVI.. ayuv Uncompressed packed MS 4:4:4:4
D.V.L. bethsoftvid Bethesda VID video
D.V.L. bfi Brute Force & Ignorance
D.V.L. binkvideo Bink video
D.VI.. bintext Binary text
DEVI.S bmp BMP (Windows and OS/2 bitmap)
D.V..S bmv_video Discworld II BMV video
D.VI.S brender_pix BRender PIX image
D.V.L. c93 Interplay C93
D.V.L. cavs Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
D.V.L. cdgraphics CD Graphics video
D.VIL. cdxl Commodore CDXL video
DEV.L. cinepak Cinepak
DEVIL. cljr Cirrus Logic AccuPak
D.VI.S cllc Canopus Lossless Codec
D.V.L. cmv Electronic Arts CMV video (decoders: eacmv )
D.V... cpia CPiA video format
D.V..S cscd CamStudio (decoders: camstudio )
D.VIL. cyuv Creative YUV (CYUV)
D.V.L. dfa Chronomaster DFA
D.V.LS dirac Dirac
DEVIL. dnxhd VC3/DNxHD
DEVI.S dpx DPX (Digital Picture Exchange) image
D.V.L. dsicinvideo Delphine Software International CIN video
DEVIL. dvvideo DV (Digital Video)
D.V..S dxa Feeble Files/ScummVM DXA
D.VI.S dxtory Dxtory
D.V.L. escape124 Escape 124
D.V.L. escape130 Escape 130
D.VILS exr OpenEXR image
DEV..S ffv1 FFmpeg video codec #1
DEVI.S ffvhuff Huffyuv FFmpeg variant
D.V.L. fic Mirillis FIC
DEV..S flashsv Flash Screen Video v1
DEV.L. flashsv2 Flash Screen Video v2
D.V..S flic Autodesk Animator Flic video
DEV.L. flv1 FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (decoders: flv ) (encoders: flv )
D.V..S fraps Fraps
D.VI.S frwu Forward Uncompressed
D.V.L. g2m Go2Meeting
DEV..S gif GIF (Graphics Interchange Format)
DEV.L. h261 H.261
DEV.L. h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
D.V.L. h263i Intel H.263
DEV.L. h263p H.263+ / H.263-1998 / H.263 version 2
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb )
D.V.L. hevc H.265 / HEVC (High Efficiency Video Coding)
D.V.L. hnm4video HNM 4 video
DEVI.S huffyuv HuffYUV
D.V.L. idcin id Quake II CIN video (decoders: idcinvideo )
D.VI.. idf iCEDraw text
D.V.L. iff_byterun1 IFF ByteRun1 (decoders: iff )
D.V.L. iff_ilbm IFF ILBM (decoders: iff )
D.V.L. indeo2 Intel Indeo 2
D.V.L. indeo3 Intel Indeo 3
D.V.L. indeo4 Intel Indeo Video Interactive 4
D.V.L. indeo5 Intel Indeo Video Interactive 5
D.V.L. interplayvideo Interplay MVE video
DEVILS jpeg2000 JPEG 2000
DEVILS jpegls JPEG-LS
D.VIL. jv Bitmap Brothers JV video
D.V.L. kgv1 Kega Game Video
D.V.L. kmvc Karl Morton's video codec
D.VI.S lagarith Lagarith lossless
.EVI.S ljpeg Lossless JPEG
D.VI.S loco LOCO
D.V.L. mad Electronic Arts Madcow Video (decoders: eamad )
D.VIL. mdec Sony PlayStation MDEC (Motion DECoder)
D.V.L. mimic Mimic
DEVIL. mjpeg Motion JPEG
D.VIL. mjpegb Apple MJPEG-B
D.V.L. mmvideo American Laser Games MM Video
D.V.L. motionpixels Motion Pixels video
DEV.L. mpeg1video MPEG-1 video (decoders: mpeg1video mpeg1video_vdpau )
DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo mpegvideo_vdpau )
DEV.L. mpeg4 MPEG-4 part 2 (decoders: mpeg4 mpeg4_vdpau )
..V.L. mpegvideo_xvmc MPEG-1/2 video XvMC (X-Video Motion Compensation)
D.V.L. msa1 MS ATC Screen
D.V.L. msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1
DEV.L. msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
DEV.L. msmpeg4v3 MPEG-4 part 2 Microsoft variant version 3 (decoders: msmpeg4 ) (encoders: msmpeg4 )
D.V..S msrle Microsoft RLE
D.V.L. mss1 MS Screen 1
D.VIL. mss2 MS Windows Media Video V9 Screen
DEV.L. msvideo1 Microsoft Video 1
D.VI.S mszh LCL (LossLess Codec Library) MSZH
D.V.L. mts2 MS Expression Encoder Screen
D.VIL. mvc1 Silicon Graphics Motion Video Compressor 1
D.VIL. mvc2 Silicon Graphics Motion Video Compressor 2
D.V.L. mxpeg Mobotix MxPEG video
D.V.L. nuv NuppelVideo/RTJPEG
D.V.L. paf_video Amazing Studio Packed Animation File Video
DEVI.S pam PAM (Portable AnyMap) image
DEVI.S pbm PBM (Portable BitMap) image
DEVI.S pcx PC Paintbrush PCX image
DEVI.S pgm PGM (Portable GrayMap) image
DEVI.S pgmyuv PGMYUV (Portable GrayMap YUV) image
D.VIL. pictor Pictor/PC Paint
DEV..S png PNG (Portable Network Graphics) image
DEVI.S ppm PPM (Portable PixelMap) image
DEVIL. prores Apple ProRes (iCodec Pro) (decoders: prores prores_lgpl ) (encoders: prores prores_aw prores_ks )
D.VIL. ptx V.Flash PTX image
D.VI.S qdraw Apple QuickDraw
D.V.L. qpeg Q-team QPEG
DEV..S qtrle QuickTime Animation (RLE) video
DEVI.S r10k AJA Kona 10-bit RGB Codec
DEVI.S r210 Uncompressed RGB 10-bit
DEVI.S rawvideo raw video
D.VIL. rl2 RL2 video
DEV.L. roq id RoQ video (decoders: roqvideo ) (encoders: roqvideo )
D.V.L. rpza QuickTime video (RPZA)
DEV.L. rv10 RealVideo 1.0
DEV.L. rv20 RealVideo 2.0
D.V.L. rv30 RealVideo 3.0
D.V.L. rv40 RealVideo 4.0
D.V.L. sanm LucasArts SANM/SMUSH video
DEVI.S sgi SGI image
D.VI.S sgirle SGI RLE 8-bit
D.V.L. smackvideo Smacker video (decoders: smackvid )
D.V.L. smc QuickTime Graphics (SMC)
D.V... smv Sigmatel Motion Video (decoders: smvjpeg )
DEV.LS snow Snow
D.VIL. sp5x Sunplus JPEG (SP5X)
DEVI.S sunrast Sun Rasterfile image
DEV.L. svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
D.V.L. svq3 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
DEVI.S targa Truevision Targa image
D.VI.. targa_y216 Pinnacle TARGA CineWave YUV16
D.V.L. tgq Electronic Arts TGQ video (decoders: eatgq )
D.V.L. tgv Electronic Arts TGV video (decoders: eatgv )
DEV.L. theora Theora (encoders: libtheora )
D.VIL. thp Nintendo Gamecube THP video
D.V.L. tiertexseqvideo Tiertex Limited SEQ video
DEVI.S tiff TIFF image
D.VIL. tmv 8088flex TMV
D.V.L. tqi Electronic Arts TQI video (decoders: eatqi )
D.V.L. truemotion1 Duck TrueMotion 1.0
D.V.L. truemotion2 Duck TrueMotion 2.0
D.V..S tscc TechSmith Screen Capture Codec (decoders: camtasia )
D.V.L. tscc2 TechSmith Screen Codec 2
D.VIL. txd Renderware TXD (TeXture Dictionary) image
D.V.L. ulti IBM UltiMotion (decoders: ultimotion )
DEVI.S utvideo Ut Video
DEVI.S v210 Uncompressed 4:2:2 10-bit
D.VI.S v210x Uncompressed 4:2:2 10-bit
DEVI.. v308 Uncompressed packed 4:4:4
DEVI.. v408 Uncompressed packed QT 4:4:4:4
DEVI.S v410 Uncompressed 4:4:4 10-bit
D.V.L. vb Beam Software VB
D.VI.S vble VBLE Lossless Codec
D.V.L. vc1 SMPTE VC-1 (decoders: vc1 vc1_vdpau )
D.V.L. vc1image Windows Media Video 9 Image v2
D.VIL. vcr1 ATI VCR1
D.VIL. vixl Miro VideoXL (decoders: xl )
D.V.L. vmdvideo Sierra VMD video
D.V..S vmnc VMware Screen Codec / VMware Video
D.V.L. vp3 On2 VP3
D.V.L. vp5 On2 VP5
D.V.L. vp6 On2 VP6
D.V.L. vp6a On2 VP6 (Flash version, with alpha channel)
D.V.L. vp6f On2 VP6 (Flash version)
D.V.L. vp7 On2 VP7
DEV.L. vp8 On2 VP8 (decoders: vp8 libvpx ) (encoders: libvpx )
DEV.L. vp9 Google VP9 (decoders: vp9 libvpx-vp9 ) (encoders: libvpx-vp9 )
D.VILS webp WebP
DEV.L. wmv1 Windows Media Video 7
DEV.L. wmv2 Windows Media Video 8
D.V.L. wmv3 Windows Media Video 9 (decoders: wmv3 wmv3_vdpau )
D.V.L. wmv3image Windows Media Video 9 Image
D.VIL. wnv1 Winnov WNV1
D.V.L. ws_vqa Westwood Studios VQA (Vector Quantized Animation) video (decoders: vqavideo )
D.V.L. xan_wc3 Wing Commander III / Xan
D.V.L. xan_wc4 Wing Commander IV / Xxan
D.VI.. xbin eXtended BINary text
DEVI.S xbm XBM (X BitMap) image
DEVIL. xface X-face image
DEVI.S xwd XWD (X Window Dump) image
DEVI.. y41p Uncompressed YUV 4:1:1 12-bit
D.V.L. yop Psygnosis YOP Video
DEVI.. yuv4 Uncompressed packed 4:2:0
D.V..S zerocodec ZeroCodec Lossless Video
DEVI.S zlib LCL (LossLess Codec Library) ZLIB
DEV..S zmbv Zip Motion Blocks Video
D.A.L. 8svx_exp 8SVX exponential
D.A.L. 8svx_fib 8SVX fibonacci
DEA.L. aac AAC (Advanced Audio Coding) (decoders: aac libfdk_aac ) (encoders: aac libfdk_aac )
D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
DEA.L. ac3 ATSC A/52A (AC-3) (decoders: ac3 ac3_fixed ) (encoders: ac3 ac3_fixed )
D.A.L. adpcm_4xm ADPCM 4X Movie
DEA.L. adpcm_adx SEGA CRI ADX ADPCM
D.A.L. adpcm_afc ADPCM Nintendo Gamecube AFC
D.A.L. adpcm_ct ADPCM Creative Technology
D.A.L. adpcm_dtk ADPCM Nintendo Gamecube DTK
D.A.L. adpcm_ea ADPCM Electronic Arts
D.A.L. adpcm_ea_maxis_xa ADPCM Electronic Arts Maxis CDROM XA
D.A.L. adpcm_ea_r1 ADPCM Electronic Arts R1
D.A.L. adpcm_ea_r2 ADPCM Electronic Arts R2
D.A.L. adpcm_ea_r3 ADPCM Electronic Arts R3
D.A.L. adpcm_ea_xas ADPCM Electronic Arts XAS
DEA.L. adpcm_g722 G.722 ADPCM (decoders: g722 ) (encoders: g722 )
DEA.L. adpcm_g726 G.726 ADPCM (decoders: g726 ) (encoders: g726 )
D.A.L. adpcm_g726le G.726 ADPCM little-endian (decoders: g726le )
D.A.L. adpcm_ima_amv ADPCM IMA AMV
D.A.L. adpcm_ima_apc ADPCM IMA CRYO APC
D.A.L. adpcm_ima_dk3 ADPCM IMA Duck DK3
D.A.L. adpcm_ima_dk4 ADPCM IMA Duck DK4
D.A.L. adpcm_ima_ea_eacs ADPCM IMA Electronic Arts EACS
D.A.L. adpcm_ima_ea_sead ADPCM IMA Electronic Arts SEAD
D.A.L. adpcm_ima_iss ADPCM IMA Funcom ISS
D.A.L. adpcm_ima_oki ADPCM IMA Dialogic OKI
DEA.L. adpcm_ima_qt ADPCM IMA QuickTime
D.A.L. adpcm_ima_rad ADPCM IMA Radical
D.A.L. adpcm_ima_smjpeg ADPCM IMA Loki SDL MJPEG
DEA.L. adpcm_ima_wav ADPCM IMA WAV
D.A.L. adpcm_ima_ws ADPCM IMA Westwood
DEA.L. adpcm_ms ADPCM Microsoft
D.A.L. adpcm_sbpro_2 ADPCM Sound Blaster Pro 2-bit
D.A.L. adpcm_sbpro_3 ADPCM Sound Blaster Pro 2.6-bit
D.A.L. adpcm_sbpro_4 ADPCM Sound Blaster Pro 4-bit
DEA.L. adpcm_swf ADPCM Shockwave Flash
D.A.L. adpcm_thp ADPCM Nintendo Gamecube THP
D.A.L. adpcm_vima LucasArts VIMA audio (decoders: adpcm_vima vima )
D.A.L. adpcm_xa ADPCM CDROM XA
DEA.L. adpcm_yamaha ADPCM Yamaha
DEA..S alac ALAC (Apple Lossless Audio Codec)
D.A.L. amr_nb AMR-NB (Adaptive Multi-Rate NarrowBand) (decoders: amrnb )
D.A.L. amr_wb AMR-WB (Adaptive Multi-Rate WideBand) (decoders: amrwb )
D.A..S ape Monkey's Audio
D.A.L. atrac1 ATRAC1 (Adaptive TRansform Acoustic Coding)
D.A.L. atrac3 ATRAC3 (Adaptive TRansform Acoustic Coding 3)
D.A.L. atrac3p ATRAC3+ (Adaptive TRansform Acoustic Coding 3+) (decoders: atrac3plus )
D.A.L. avc On2 Audio for Video Codec (decoders: on2avc )
D.A.L. binkaudio_dct Bink Audio (DCT)
D.A.L. binkaudio_rdft Bink Audio (RDFT)
D.A.L. bmv_audio Discworld II BMV audio
..A.L. celt Constrained Energy Lapped Transform (CELT)
DEA.L. comfortnoise RFC 3389 Comfort Noise
D.A.L. cook Cook / Cooker / Gecko (RealAudio G2)
D.A.L. dsd_lsbf DSD (Direct Stream Digital), least significant bit first
D.A.L. dsd_lsbf_planar DSD (Direct Stream Digital), least significant bit first, planar
D.A.L. dsd_msbf DSD (Direct Stream Digital), most significant bit first
D.A.L. dsd_msbf_planar DSD (Direct Stream Digital), most significant bit first, planar
D.A.L. dsicinaudio Delphine Software International CIN audio
DEA.LS dts DCA (DTS Coherent Acoustics) (decoders: dca ) (encoders: dca )
..A.L. dvaudio DV audio
DEA.L. eac3 ATSC A/52B (AC-3, E-AC-3)
D.A.L. evrc EVRC (Enhanced Variable Rate Codec)
DEA..S flac FLAC (Free Lossless Audio Codec)
DEA.L. g723_1 G.723.1
D.A.L. g729 G.729
D.A.L. gsm GSM
D.A.L. gsm_ms GSM Microsoft variant
D.A.L. iac IAC (Indeo Audio Coder)
..A.L. ilbc iLBC (Internet Low Bitrate Codec)
D.A.L. imc IMC (Intel Music Coder)
D.A.L. interplay_dpcm DPCM Interplay
D.A.L. mace3 MACE (Macintosh Audio Compression/Expansion) 3:1
D.A.L. mace6 MACE (Macintosh Audio Compression/Expansion) 6:1
D.A.L. metasound Voxware MetaSound
D.A..S mlp MLP (Meridian Lossless Packing)
D.A.L. mp1 MP1 (MPEG audio layer 1) (decoders: mp1 mp1float )
DEA.L. mp2 MP2 (MPEG audio layer 2) (decoders: mp2 mp2float ) (encoders: mp2 mp2fixed )
DEA.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float ) (encoders: libmp3lame )
D.A.L. mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3) (decoders: mp3adu mp3adufloat )
D.A.L. mp3on4 MP3onMP4 (decoders: mp3on4 mp3on4float )
D.A..S mp4als MPEG-4 Audio Lossless Coding (ALS) (decoders: als )
D.A.L. musepack7 Musepack SV7 (decoders: mpc7 )
D.A.L. musepack8 Musepack SV8 (decoders: mpc8 )
DEA.L. nellymoser Nellymoser Asao
DEA.L. opus Opus (Opus Interactive Audio Codec) (decoders: opus libopus ) (encoders: libopus )
D.A.L. paf_audio Amazing Studio Packed Animation File Audio
DEA.L. pcm_alaw PCM A-law / G.711 A-law
D.A..S pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media
D.A..S pcm_dvd PCM signed 20|24-bit big-endian
DEA..S pcm_f32be PCM 32-bit floating point big-endian
DEA..S pcm_f32le PCM 32-bit floating point little-endian
DEA..S pcm_f64be PCM 64-bit floating point big-endian
DEA..S pcm_f64le PCM 64-bit floating point little-endian
D.A..S pcm_lxf PCM signed 20-bit little-endian planar
DEA.L. pcm_mulaw PCM mu-law / G.711 mu-law
DEA..S pcm_s16be PCM signed 16-bit big-endian
DEA..S pcm_s16be_planar PCM signed 16-bit big-endian planar
DEA..S pcm_s16le PCM signed 16-bit little-endian
DEA..S pcm_s16le_planar PCM signed 16-bit little-endian planar
DEA..S pcm_s24be PCM signed 24-bit big-endian
DEA..S pcm_s24daud PCM D-Cinema audio signed 24-bit
DEA..S pcm_s24le PCM signed 24-bit little-endian
DEA..S pcm_s24le_planar PCM signed 24-bit little-endian planar
DEA..S pcm_s32be PCM signed 32-bit big-endian
DEA..S pcm_s32le PCM signed 32-bit little-endian
DEA..S pcm_s32le_planar PCM signed 32-bit little-endian planar
DEA..S pcm_s8 PCM signed 8-bit
DEA..S pcm_s8_planar PCM signed 8-bit planar
DEA..S pcm_u16be PCM unsigned 16-bit big-endian
DEA..S pcm_u16le PCM unsigned 16-bit little-endian
DEA..S pcm_u24be PCM unsigned 24-bit big-endian
DEA..S pcm_u24le PCM unsigned 24-bit little-endian
DEA..S pcm_u32be PCM unsigned 32-bit big-endian
DEA..S pcm_u32le PCM unsigned 32-bit little-endian
DEA..S pcm_u8 PCM unsigned 8-bit
D.A.L. pcm_zork PCM Zork
D.A.L. qcelp QCELP / PureVoice
D.A.L. qdm2 QDesign Music Codec 2
..A.L. qdmc QDesign Music
DEA.L. ra_144 RealAudio 1.0 (14.4K) (decoders: real_144 ) (encoders: real_144 )
D.A.L. ra_288 RealAudio 2.0 (28.8K) (decoders: real_288 )
D.A..S ralf RealAudio Lossless
DEA.L. roq_dpcm DPCM id RoQ
DEA..S s302m SMPTE 302M
D.A..S shorten Shorten
D.A.L. sipr RealAudio SIPR / ACELP.NET
D.A.L. smackaudio Smacker audio (decoders: smackaud )
..A.L. smv SMV (Selectable Mode Vocoder)
D.A.L. sol_dpcm DPCM Sol
DEA... sonic Sonic
.EA... sonicls Sonic lossless
..A.L. speex Speex
D.A..S tak TAK (Tom's lossless Audio Kompressor)
D.A..S truehd TrueHD
D.A.L. truespeech DSP Group TrueSpeech
DEA..S tta TTA (True Audio)
D.A.L. twinvq VQF TwinVQ
D.A.L. vima LucasArts VIMA audio (deprecated id) (decoders: adpcm_vima vima )
D.A.L. vmdaudio Sierra VMD audio
DEA.L. vorbis Vorbis (decoders: vorbis libvorbis ) (encoders: vorbis libvorbis )
..A.L. voxware Voxware RT29 Metasound
D.A... wavesynth Wave synthesis pseudo-codec
DEA.LS wavpack WavPack
D.A.L. westwood_snd1 Westwood Audio (SND1) (decoders: ws_snd1 )
D.A..S wmalossless Windows Media Audio Lossless
D.A.L. wmapro Windows Media Audio 9 Professional
DEA.L. wmav1 Windows Media Audio 1
DEA.L. wmav2 Windows Media Audio 2
D.A.L. wmavoice Windows Media Audio Voice
D.A.L. xan_dpcm DPCM Xan
..D... bin_data binary data
..D... dvd_nav_packet DVD Nav packet
..D... klv SMPTE 336M Key-Length-Value (KLV) metadata
..D... otf OpenType font
..D... timed_id3 timed ID3 metadata
..D... ttf TrueType font
DES... ass ASS (Advanced SSA) subtitle
DES... dvb_subtitle DVB subtitles (decoders: dvbsub ) (encoders: dvbsub )
..S... dvb_teletext DVB teletext
DES... dvd_subtitle DVD subtitles (decoders: dvdsub ) (encoders: dvdsub )
..S... eia_608 EIA-608 closed captions
D.S... hdmv_pgs_subtitle HDMV Presentation Graphic Stream subtitles (decoders: pgssub )
D.S... jacosub JACOsub subtitle
D.S... microdvd MicroDVD subtitle
DES... mov_text MOV text
D.S... mpl2 MPL2 subtitle
D.S... pjs PJS (Phoenix Japanimation Society) subtitle
D.S... realtext RealText subtitle
D.S... sami SAMI subtitle
DES... srt SubRip subtitle with embedded timing
DES... ssa SSA (SubStation Alpha) subtitle
DES... subrip SubRip subtitle
D.S... subviewer SubViewer subtitle
D.S... subviewer1 SubViewer v1 subtitle
D.S... text raw UTF-8 text
D.S... vplayer VPlayer subtitle
DES... webvtt WebVTT subtitle
DES... xsub XSUB

Comments

michael.k’s picture

What are the dimensions of your video? FFmpeg doesn't like odd numbers.

Rhino-new’s picture

720x486

That wouldn't explain why I get the MP3 error, despite having --enable-libmp3lame though. Or?

michael.k’s picture

I also get the libmp3lame error with FFmpeg and therefore can't transcode into MP3, so I think that's a separate issue.

Rhino-new’s picture

Indeed, probably is. So, I can't encode mp3 (despite it being installed), nor VP6, because as I was testing different sizes here, I ran into this error again.

Error set options PHPVideoToolkit error: Value "vp6" set from $toolkit->setVideoCodec, can not be used to encode the output as the version of FFmpeg that you are using does not have the capability to encode video with this codec.

Warning: Division by zero in TranscoderAbstractionFactoryFfmpeg->setAspectRatioOptions() (line 677 of /var/www/sites/all/modules/video/transcoders/TranscoderAbstractionFactoryFfmpeg.inc).
Something went wrong with transcoding inside.mov. Please check your recent log entries for further debugging.

I've tried pretty much every size (as in the exact size of the original video) and encoding format I can think of now, and I still see this error.

michael.k’s picture

Have you tried a quick command line transcode to make sure that FFmpeg can handle it with your installed codecs?

Rhino-new’s picture

No. That's a good idea, let me look up how do do a proper command and get back on that.

Rhino-new’s picture

Yeah, that works just swell.

cd ~/bin && ./ffmpeg -i ~/input.mp4 ~/videos/output.mkv
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 23 2014 01:16:52 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
  configuration: --prefix=/home/ubuntu/ffmpeg_build --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-libmp3lame
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 67.100 / 55. 67.100
  libavformat    55. 44.100 / 55. 44.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  8.100 /  4.  8.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/input.mp4':
  Metadata:
    major_brand     : M4VP
    minor_version   : 1
    compatible_brands: M4VPM4A mp42isom
    creation_time   : 2010-09-24 21:30:01
    encoder         : CoreMediaAuthoring 700, CoreMedia 484.11, i386
  Duration: 00:00:19.20, start: 0.000000, bitrate: 418 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x300 [SAR 1:1 DAR 8:5], 417 kb/s, 10.78 fps, 15 tbr, 50k tbn, 100k tbc (default)
    Metadata:
      creation_time   : 2010-09-24 21:30:01
      handler_name    : Core Media Video
[libx264 @ 0x3739ca0] using SAR=1/1
[libx264 @ 0x3739ca0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x3739ca0] profile High, level 2.1
[libx264 @ 0x3739ca0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 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=15 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
[matroska @ 0x3738d40] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Output #0, matroska, to '/home/ubuntu/videos/output.mkv':
  Metadata:
    major_brand     : M4VP
    minor_version   : 1
    compatible_brands: M4VPM4A mp42isom
    encoder         : Lavf55.44.100
    Stream #0:0(und): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 480x300 [SAR 1:1 DAR 8:5], q=-1--1, 15 fps, 1k tbn, 15 tbc (default)
    Metadata:
      creation_time   : 2010-09-24 21:30:01
      handler_name    : Core Media Video
      encoder         : Lavc55.67.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=  207 fps= 49 q=-1.0 Lsize=     259kB time=00:00:18.66 bitrate= 113.9kbits/s    
video:257kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.886128%
[libx264 @ 0x3739ca0] frame I:2     Avg QP:19.58  size: 25720
[libx264 @ 0x3739ca0] frame P:82    Avg QP:20.66  size:  2218
[libx264 @ 0x3739ca0] frame B:123   Avg QP:28.98  size:   239
[libx264 @ 0x3739ca0] consecutive B-frames: 17.9%  5.8%  8.7% 67.6%
[libx264 @ 0x3739ca0] mb I  I16..4: 31.8%  3.2% 65.0%
[libx264 @ 0x3739ca0] mb P  I16..4:  5.3%  1.7%  2.0%  P16..4: 16.8%  3.7%  2.3%  0.0%  0.0%    skip:68.1%
[libx264 @ 0x3739ca0] mb B  I16..4:  0.3%  0.1%  0.1%  B16..8:  7.0%  0.7%  0.2%  direct: 0.2%  skip:91.3%  L0:39.0% L1:57.9% BI: 3.2%
[libx264 @ 0x3739ca0] 8x8 transform intra:15.6% inter:45.4%
[libx264 @ 0x3739ca0] coded y,uvDC,uvAC intra: 30.5% 19.7% 9.7% inter: 4.3% 4.0% 0.8%
[libx264 @ 0x3739ca0] i16 v,h,dc,p: 11% 89%  0%  0%
[libx264 @ 0x3739ca0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  5% 35% 58%  0%  0%  0%  0%  0%  1%
[libx264 @ 0x3739ca0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 60% 10%  1%  2%  1%  4%  1%  6%
[libx264 @ 0x3739ca0] i8c dc,h,v,p: 57% 37%  6%  0%
[libx264 @ 0x3739ca0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x3739ca0] ref P L0: 69.3%  6.6% 16.2%  7.9%
[libx264 @ 0x3739ca0] ref B L0: 74.7% 19.7%  5.6%
[libx264 @ 0x3739ca0] ref B L1: 91.2%  8.8%
[libx264 @ 0x3739ca0] kb/s:109.48
rawthriver’s picture

Title: Warning: Division by zero in TranscoderAbstractionFactoryFfmpeg & a PHPVideoToolkit error » Division by zero error

Hello! I've got similar error - Warning: Division by zero in TranscoderAbstractionFactoryFfmpeg->setAspectRatioOptions() on line 672 of TranscoderAbstractionFactoryFfmpeg.inc.
So, all transcoding job fails:( How can I solve this problem?
Thanks in advance!

brycefisherfleig’s picture

Hi Rhino-new,

Looking through your `ffmpeg -codecs` output, I see this line:

D.V.L. vp6 On2 VP6

The "D.V.L." means you can decode but not encode using VP6. Also, looking through your shell output from calling ffmpeg directly, you're encoding from h264 to h264, not vp6. So, it looks like your transcoding preset in the Video module is not configured correctly for the available codecs in your ffmpeg installation.

Can you export your transcoding preset from the admin/config/media/video/presets page and upload it to this issue? Also, can you describe in more detail what kind of output you want? Thanks!

brycefisherfleig’s picture

Hi rawthriver,

Are you using Drupal 7 with the dev release of the video module (7.x-2.x-dev)? The error message is similar but different (line 672 for Rhino-new versus line 677 for you). I probably would open a separate support request for you issue since it may be a different underlying problem.

Rhino-new’s picture

Hi brycefisherfleig, I appreciate you taking the time to reply and you're right I can only DVL encode VP6 not encode, which I've only just learned here.
A quick run around the web tells me that I could never encode with vp6 and FFmpeg which would have been the easy way out, since I'd love to install that possibility. (correct me if I'm wrong, I'm still googling)

I see now that using the (somewhat) similar presets that I was using with Zencoder wasn't going to work, and have spent DAYS trying every sort of settings I can think of, but I can't seem to avoid this:

Error set options PHPVideoToolkit error: Value "vp6" set from $toolkit->setVideoCodec, can not be used to encode the output as the version of FFmpeg that you are using does not have the capability to encode video with this codec.

What I am trying to get: one file should be converted to HTML5 MP4, HTML5 Ogg (may be overkill), HTML5 WebM, Phone MOV and Flash.

What I have tried, all of these one at a time. Most recently: Flash -

$preset = array (
  'name' => 'Flashffmpeg',
  'description' => 'Flash (extension: flv)',
  'settings' => array (
    'video_extension' => 'flv',
    'video_codec' => 'h264',
    'video_preset' => 'libx264-hq',
    'video_quality' => '5',
    'video_speed' => '1',
    'wxh' => '768x576',
    'video_aspectmode' => 'preserve',
    'video_upscale' => 1,
    'audio_codec' => 'aac',
    'audio_quality' => '5',
    'deinterlace' => 'detect',
    'max_frame_rate' => '',
    'frame_rate' => '',
    'keyframe_interval' => '',
    'video_bitrate' => '',
    'bitrate_cap' => '',
    'buffer_size' => '',
    'one_pass' => 0,
    'skip_video' => 0,
    'pixel_format' => '',
    'h264_profile' => '',
    'audio_bitrate' => '',
    'audio_channels' => '2',
    'audio_sample_rate' => '',
    'skip_audio' => 0,
    'video_watermark_enabled' => 0,
    'video_watermark_fid' => 0,
    'video_watermark_x' => '-10',
    'video_watermark_y' => '-12',
    'video_watermark_width' => '80',
    'video_watermark_height' => '80',
    'video_watermark_origin' => 'content',
    'autolevels' => 1,
    'deblock' => 1,
    'denoise' => '',
    'clip_start' => '',
    'clip_length' => '',
  ),
);

The others are similar but with their respective encoders. None of my presets require vp6 from what I can tell, and I've tried pretty much every combination under the sun at this point. Is there a good page where I could read up which presets I should chose that won't make FFmpeg choke?

Rhino-new’s picture

I found a way to install MENCODER on Ubuntu and did so.

just sudo apt-get install mencoder - this didn't help me however, since I wanted to try this hack but failed. http://linuxclues.blogspot.com/2012/05/vp6-mencoder-video-flv-encode-con...

I cleared cache and tried these but they fail claiming VP6 as well.

<blockquote>
$preset = array (
  'name' => 'iPhone MOVffmpeg',
  'description' => 'Creates files that natively play on the iPhone using HTML5.',
  'settings' => array (
    'video_extension' => 'mov',
    'video_codec' => 'flv1',
    'video_preset' => '',
    'video_quality' => '5',
    'video_speed' => '3',
    'wxh' => '480x360',
    'video_aspectmode' => 'preserve',
    'video_upscale' => 1,
    'audio_codec' => 'aac',
    'audio_quality' => '5',
    'deinterlace' => 'detect',
    'max_frame_rate' => '',
    'frame_rate' => '',
    'keyframe_interval' => '',
    'video_bitrate' => '',
    'bitrate_cap' => '',
    'buffer_size' => '',
    'one_pass' => 0,
    'skip_video' => 0,
    'pixel_format' => '',
    'h264_profile' => '',
    'audio_bitrate' => '',
    'audio_channels' => '2',
    'audio_sample_rate' => '',
    'skip_audio' => 0,
    'video_watermark_enabled' => 0,
    'video_watermark_fid' => 0,
    'video_watermark_x' => '-10',
    'video_watermark_y' => '-12',
    'video_watermark_width' => '80',
    'video_watermark_height' => '80',
    'video_watermark_origin' => 'content',
    'autolevels' => 1,
    'deblock' => 1,
    'denoise' => '',
    'clip_start' => '',
    'clip_length' => '',
  ),
);
</blockquote>
$preset = array (
  'name' => 'HTML5 WebMffmpeg',
  'description' => 'Creates files that natively play in Google Chrome using HTML5.',
  'settings' => array (
    'video_extension' => 'webm',
    'video_codec' => 'vp8',
    'video_preset' => '',
    'video_quality' => '5',
    'video_speed' => '1',
    'wxh' => '768x576',
    'video_aspectmode' => 'preserve',
    'video_upscale' => 1,
    'audio_codec' => 'vorbis',
    'audio_quality' => '5',
    'deinterlace' => 'detect',
    'max_frame_rate' => '',
    'frame_rate' => '',
    'keyframe_interval' => '',
    'video_bitrate' => '',
    'bitrate_cap' => '',
    'buffer_size' => '',
    'one_pass' => 0,
    'skip_video' => 0,
    'pixel_format' => '',
    'h264_profile' => '',
    'audio_bitrate' => '',
    'audio_channels' => '2',
    'audio_sample_rate' => '',
    'skip_audio' => 0,
    'video_watermark_enabled' => 0,
    'video_watermark_fid' => 0,
    'video_watermark_x' => '-10',
    'video_watermark_y' => '-12',
    'video_watermark_width' => '80',
    'video_watermark_height' => '80',
    'video_watermark_origin' => 'content',
    'autolevels' => 1,
    'deblock' => 1,
    'denoise' => '',
    'clip_start' => '',
    'clip_length' => '',
  ),
);
Rhino-new’s picture

Just tested;

$preset = array (
  'name' => 'Testpreset',
  'description' => 'This is a test',
  'settings' => array (
    'video_extension' => 'flv',
    'video_codec' => 'flv1',
    'video_preset' => '',
    'video_quality' => '5',
    'video_speed' => '2',
    'wxh' => '640x360',
    'video_aspectmode' => 'preserve',
    'video_upscale' => 1,
    'audio_codec' => 'aac',
    'audio_quality' => '5',
    'deinterlace' => 'detect',
    'max_frame_rate' => '',
    'frame_rate' => '',
    'keyframe_interval' => '',
    'video_bitrate' => '',
    'bitrate_cap' => '',
    'buffer_size' => '',
    'one_pass' => 0,
    'skip_video' => 0,
    'pixel_format' => '',
    'h264_profile' => '',
    'audio_bitrate' => '',
    'audio_channels' => '2',
    'audio_sample_rate' => '',
    'skip_audio' => 0,
    'video_watermark_enabled' => 0,
    'video_watermark_fid' => 0,
    'video_watermark_x' => '5',
    'video_watermark_y' => '5',
    'video_watermark_width' => '',
    'video_watermark_height' => '',
    'video_watermark_origin' => 'content',
    'autolevels' => 0,
    'deblock' => 0,
    'denoise' => '',
    'clip_start' => '',
    'clip_length' => '',
  ),
);

result:

Error set options PHPVideoToolkit error: Value "vp6" set from $toolkit->setVideoCodec, can not be used to encode the output as the version of FFmpeg that you are using does not have the capability to encode video with this codec.

heshanlk’s picture

Component: Video Transcoding » General
Status: Active » Closed (works as designed)