enmasse-entertainment/refinerycms-videos — Issue #9: Failures encoding mp4 videos
Author: phiggins
Created: 2012-02-03 19:48:27+00:00
State: open

The specs for encoding mp4 videos fail for me on OS X and linux. It might be a problem with my setup, but I tried multiple versions of ffmpeg from 0.8 to 0.10 and none worked.

An individual failure looks like this:

```
Failure/Error: before(:all) { @encoded_video = subject.encode(:mp4) }
Failed encoding. Errors: encoded file is invalid. Full output: ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 26 2011 11:33:15 with gcc 4.5.3
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --optflags='-O2 -march=native -pipe' --extra-cflags='-O2 -march=native -pipe' --extra-cxxflags='-O2 -march=native -pipe' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --enable-runtime-cpudetect --enable-gnutls --enable-libmp3lame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libfaac --enable-nonfree --enable-libdc1394 --enable-openal --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libgsm --enable-libspeex --enable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-mmx2 --disable-ssse3 --disable libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 42. 0 / 53. 42. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/pete/work/refinerycms-videos/spec/samples/test-movie.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2011-06-21 22:11:43
Duration: 00:00:00.61, start: 0.000000, bitrate: 24328 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 34415 kb/s, SAR 1280:1280 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Metadata:
creation_time : 2011-06-21 22:11:43
handler_name : ?Apple Alias Data Handler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 89 kb/s
Metadata:
creation_time : 2011-06-21 22:11:43
handler_name : ?Apple Alias Data Handler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2011-06-21 22:11:45
handler_name : ?Apple Alias Data Handler
File for preset 'hq' not found

# ./app/models/refinery/raw_video.rb:62:in `block in encode'
# ./app/models/refinery/raw_video.rb:60:in `encode'
# ./spec/models/refinery/raw_video_spec.rb:36:in `block (4 levels) in '
```