ruby-av / paperclip-av-transcoder

Audio/Video Transcoder for Paperclip using FFMPEG/Avconv
MIT License
135 stars 83 forks source link

Av::CommandError for 0.6.4 #16

Open itsSaad opened 9 years ago

itsSaad commented 9 years ago

Im still having this issue although it was fixed with this release.

Av::CommandError (error while running command if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi: Command 'PATH=/usr/bin/:$PATH if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi' returned 1. Expected 0
DEBUG [6a1eae9e]    Here is the command output:
DEBUG [6a1eae9e]    
DEBUG [6a1eae9e]    ):
DEBUG [6a1eae9e]      app/controllers/blog_posts_controller.rb:37:in `create'
itsSaad commented 9 years ago

see this. it says it was fixed in 0.6.3 https://github.com/ruby-av/paperclip-av-transcoder/issues/8

tedma4 commented 9 years ago

I'm having the same problem

[AV] Running command: if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi-v was unexpected at this time. (1.0ms) rollback transaction Completed 500 Internal Server Error in 7974ms

Av::CommandError (error while running command if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi: Command 'if command -v avprobe 2>/dev/null; then echo "true"; else cho "false"; fi' returned 1. Expected 0 Here is the command output:

): app/controllers/shouts_controller.rb:32:in `create'

model.rb has_attached_file :snip,
styles: { medium: { :geometry => "640x480#", :format => 'mp4', streaming: true }, thumb: { :geometry => "100x100#", :format => 'jpg', time: 10 }, }, :processors => [:transcoder]

tedma4 commented 9 years ago

If i remove :processors => [:transcoder] the video uploads and a screenshot is shown but the video doesn't play.

owahab commented 9 years ago

Are you running paperclip 4.2+? There seems to be an issue with paperclip-av-transcoder 0.6.4 and paperclip 4.2+ See https://github.com/ruby-av/paperclip-av-transcoder/issues/10#issuecomment-106248787

tedma4 commented 9 years ago

I was using av-transcoder 0.6.3 and paperclip 4.2.1, but even after updating to av-transcoder 0.6.4 and trying paperclip 4.2.2 and going as far back as 4.0.0, I got the same thing here and here. From the paperclip NEWS file, it says they updated the custom processors in lib/paperclip, but using processors: [:transcoder] doesn't work for me.

I replaced :transcoder with :ffmpeg and got this error using paperclip 4.2.2 and this error with paperclip 4.1.1

8CciaN8 commented 9 years ago

+1 got the same error when using transcoder as paperclip processor.

Hope you could help me, thanks :)

DaGraves commented 8 years ago

I am getting this same error. Has anyone come up with a fix for this?

RailsCod3rFuture commented 8 years ago

+1 Same. I'm receiving the error when I upload videos. Neither Paperclip nor Carrier Wave Video are allowing me to upload and show video files.

seyna commented 7 years ago

For those who tried a lot of times but in vain.

After hours of trying, It strikes me that maybe the error lies in choosing avconv

[AV] Found ["avconv", "ffmpeg"], using: avconv

If you use Ubuntu like me, you might at first install ffmpeg using ppa and because of dependency install avconv as well. Unfortunately it seems that avconv not function correctly.

Finally I decide to remove ffmpeg, avconv packages and reinstall ffmpeg static build.

> sudo apt-get remove ffmpeg  
> sudo apt-get purge libav-tools

ffmpeg static build here => http://johnvansickle.com/ffmpeg/

> wget http://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
> tar xf ffmpeg-git-64bit-static.tar.xz
> cd ffmpeg-git-64bit-static
> sudo mv ff* qt-faststart /usr/bin/

These steps work for me. Hope it works for you too.