Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when processing webm #16

Closed
ttseng opened this issue Oct 18, 2013 · 7 comments
Closed

Error when processing webm #16

ttseng opened this issue Oct 18, 2013 · 7 comments

Comments

@ttseng
Copy link

ttseng commented Oct 18, 2013

I'm getting the following error when I'm trying to create a webm version of a video file:

Running transcoding...
ffmpeg -y -i /public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov -vcodec libvpx -acodec libvorbis -s 640x360 -b 1500k -ab 160000 -f webm -g 30 -aspect 1.7777777777777777 /public/uploads/tmp/1382112521-11953-7661/tmpfile.webm

Failed encoding...
ffmpeg -y -i /public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov -vcodec libvpx -acodec libvorbis -s 640x360 -b 1500k -ab 160000 -f webm -g 30 -aspect 1.7777777777777777 /public/uploads/tmp/1382112521-11953-7661/tmpfile.webm

ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 27 2013 14:00:31 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libvpx
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2013-09-27 20:08:57
Duration: 00:00:02.14, start: 0.000000, bitrate: 17460 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17292 kb/s, 29.88 fps, 29.83 tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2013-09-27 20:08:57
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s
Metadata:
creation_time : 2013-09-27 20:08:57
handler_name : Core Media Data Handler
Please use -b:a or -b:v, -b is ambiguous
Unknown encoder 'libvorbis'

Here is what I have in my uploader:

version :webm do
process :encode_video => [:webm]
def full_filename(for_file)
"#{File.basename(for_file, File.extname(for_file))}.webm"
end
end

I have libvorbis-1.3.3 installed on my machine.

@rheaton
Copy link
Owner

rheaton commented Oct 18, 2013

Are you able to create a webm with ffmpeg command line?

How did you install ffmpeg?

@rheaton
Copy link
Owner

rheaton commented Oct 18, 2013

Try re-building it with these flags:

--disable-encoder=vorbis --enable-libvorbis

(form here) http://xiphmont.livejournal.com/51160.html

Also, it looks like my default options need to be updated to work with the most recent version of ffmpeg-- I will do that a bit later today (unless you can submit a patch for me 😄 ): streamio/streamio-ffmpeg#28

@ttseng
Copy link
Author

ttseng commented Oct 18, 2013

I rebuilt ffmpeg with your suggestions, and it worked. Thanks!

@ttseng ttseng closed this as completed Oct 18, 2013
@rheaton
Copy link
Owner

rheaton commented Oct 18, 2013

Great to hear that!

@ivorpad
Copy link

ivorpad commented Mar 10, 2016

Hi @rheaton

I'm having these exact same issues when trying to process webm. I installed ffmpeg like so:

brew install ffmpeg --disable-encoder=vorbis --enable-libvorbis --with-libvpx

Here's the error message:

Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: Failed encoding.Errors: no output file created. Full output: ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 7.0.2 (clang-700.1.81) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libvpx --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, avi, from '/Users/ivor/workspace/projects/pixup/public/uploads/tmp/1457648455-53407-6064/webm_sample.avi': Metadata: encoder : Nandub v1.0rc2 Duration: 00:00:48.68, start: 0.000000, bitrate: 1587 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 1319 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 256 kb/s Please use -b:a or -b:v, -b is ambiguous Unknown encoder 'libvorbis'

Any ideas?
Thanks!

@rheaton
Copy link
Owner

rheaton commented Mar 10, 2016

@ivorpad check out the installation notes: https://github.com/rheaton/carrierwave-video#ffmpeg-installation-notes

It needs the libvorbis encoder--getting ffmpeg set up properly is a bit of a beast but doable, good luck! 👍

@ivorpad
Copy link

ivorpad commented Mar 11, 2016

@rheaton

brew reinstall ffmpeg --with-libvpx --with-libvorbis did the trick.

Thanks, Rachel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants