ruby-av / paperclip-av-transcoder

Audio/Video Transcoder for Paperclip using FFMPEG/Avconv
MIT License
136 stars 82 forks source link

Convert video WEBM TO MP4 Error #28

Open ingluisdmz opened 9 years ago

ingluisdmz commented 9 years ago

Hello i have a process

has_attached_file :video_presentacion, :styles => { :original => { :geometry => "1280x720", :format => 'mp4',:convert_options => { :output => { :vcodec => 'libx264'}} }, :thumb => { :geometry => "250x250#", :format => 'png', :time => 12} }, :processors => [:transcoder]

But ONLY FILES WEBM have a error to convert mp4

App 7899 stderr: Conversion failed!

App 7925 stdout: Validation failed: Video presentacion error while processing video for 4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w8: Command 'PATH=/usr/local/bin/:$PATH; ffmpeg -i '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w8.webm' -vcodec libx264 -s 1280x720 -acodec aac -strict experimental -y '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w820150716-7925-1ipibkg.mp4''

here log:

App 7899 stderr: [libx264 @ 0x2534440] AVFrame.format is not set App 7899 stderr: [libx264 @ 0x2534440] AVFrame.width or height is not set App 7899 stderr: [libx264 @ 0x2534440] Input picture width (1280) is greater than stride (0) App 7899 stderr: Video encoding failed App 7899 stderr: [libx264 @ 0x2534440] frame I:125 Avg QP:16.63 size: 53542 App 7899 stderr: [libx264 @ 0x2534440] frame P:8143 Avg QP:18.97 size: 1151 App 7899 stderr: [libx264 @ 0x2534440] frame B:22849 Avg QP:27.42 size: 52 App 7899 stderr: [libx264 @ 0x2534440] consecutive B-frames: 2.0% 0.1% 0.2% 97.6% App 7899 stderr: [libx264 @ 0x2534440] mb I I16..4: 19.2% 71.8% 9.1% App 7899 stderr: [libx264 @ 0x2534440] mb P I16..4: 0.3% 0.4% 0.0% P16..4: 5.1% 0.8% 0.7% 0.0% 0.0% skip:92.7% App 7899 stderr: [libx264 @ 0x2534440] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.6% 0.0% 0.0% direct: 0.0% skip:99.4% L0:17.2% L1:82.8% BI: 0.0% App 7899 stderr: [libx264 @ 0x2534440] 8x8 transform intra:65.9% inter:70.7% App 7899 stderr: [libx264 @ 0x2534440] coded y,uvDC,uvAC intra: 67.2% 90.7% 69.3% inter: 0.5% 1.2% 0.1% App 7899 stderr: [libx264 @ 0x2534440] i16 v,h,dc,p: 18% 20% 27% 35% App 7899 stderr: [libx264 @ 0x2534440] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 23% 31% 3% 4% 4% 6% 5% 6% App 7899 stderr: [libx264 @ 0x2534440] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 22% 17% 4% 7% 6% 7% 5% 4% App 7899 stderr: [libx264 @ 0x2534440] i8c dc,h,v,p: 54% 22% 19% 5% App 7899 stderr: [libx264 @ 0x2534440] Weighted P-Frames: Y:0.1% UV:0.0% App 7899 stderr: [libx264 @ 0x2534440] ref P L0: 83.9% 8.3% 7.1% 0.7% 0.0% App 7899 stderr: [libx264 @ 0x2534440] ref B L0: 75.6% 24.1% 0.3% App 7899 stderr: [libx264 @ 0x2534440] ref B L1: 91.3% 8.7% App 7899 stderr: [libx264 @ 0x2534440] kb/s:4438.32 App 7899 stderr: [aac @ 0x26249c0] 2 frames left in the queue on closing App 7899 stderr: Conversion failed! App 7899 stderr: ffmpeg version git-2015-04-15-c5d4f87 Copyright (c) 2000-2015 the FFmpeg developers App 7899 stderr: built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) App 7899 stderr: configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 App 7899 stderr: libavutil 54. 22.101 / 54. 22.101 App 7899 stderr: libavcodec 56. 34.100 / 56. 34.100 App 7899 stderr: libavformat 56. 30.100 / 56. 30.100 App 7899 stderr: libavdevice 56. 4.100 / 56. 4.100 App 7899 stderr: libavfilter 5. 14.100 / 5. 14.100 App 7899 stderr: libswscale 3. 1.101 / 3. 1.101 App 7899 stderr: libswresample 1. 1.100 / 1. 1.100 App 7899 stderr: libpostproc 53. 3.100 / 53. 3.100 App 7899 stderr: Input #0, matroska,webm, from '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w8.webm': App 7899 stderr: Metadata: App 7899 stderr: encoder : GStreamer plugin version 1.2.4 App 7899 stderr: App 7899 stderr: creation_time : 2015-04-15 17:18:00 App 7899 stderr: Duration: 00:00:31.17, start: 0.000000, bitrate: 1553 kb/s App 7899 stderr: Stream #0:0(eng): Video: vp8, yuv420p, 1280x720, SAR 1:1 DAR 16:9, App 7899 stderr: 1k tbr, 1k tbn, 1k tbc App 7899 stderr: (default) App 7899 stderr: Metadata: App 7899 stderr: title : Video App 7899 stderr: Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, fltp (default) App 7899 stderr: Metadata: App 7899 stderr: title : Audio App 7899 stderr: Output #0, image2, to '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w820150716-7925-1hx3qv8.png': App 7899 stderr: Metadata: App 7899 stderr: encoder : Lavf56.30.100 App 7899 stderr: Stream #0:0(eng): Video: png, rgb24, 250x250 [SAR 376:375 DAR 376:375], q=2-31, 200 kb/s, 1k fps, 1k tbn, 1k tbc (default) App 7899 stderr: Metadata: App 7899 stderr: title : Video App 7899 stderr: encoder : Lavc56.34.100 png App 7899 stderr: Stream mapping: App 7899 stderr: Stream #0:0 -> #0:0 (vp8 (native) -> png (native)) App 7899 stderr: Press [q] to stop, [?] for help App 7899 stderr: frame= 1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A dup=1 drop=1
App 7899 stderr: video:59kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown App 7925 stdout: Validation failed: Video presentacion error while processing video for 4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w8: Command 'PATH=/usr/local/bin/:$PATH; ffmpeg -i '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w8.webm' -vcodec libx264 -s 1280x720 -acodec aac -strict experimental -y '/tmp/4158602f121d1e6f0dc8ba45a4c25fa620150716-7925-p6w4w820150716-7925-1ipibkg.mp4'' returned 1. Expected 0

ingluisdmz commented 9 years ago

i have a ubuntu 12.04 paperclip-av-transcoder install when used ffmep-paperclipt gem dont have a error

owahab commented 9 years ago

Your ffmpeg package might not have support for WebM. Check the supported formats: ffmpeg -formats.