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

Av::CommandError for 0.6.4 #16

Open
itsSaad opened this issue May 12, 2015 · 9 comments
Open

Av::CommandError for 0.6.4 #16

itsSaad opened this issue May 12, 2015 · 9 comments

Comments

@itsSaad
Copy link

itsSaad commented May 12, 2015

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
Copy link
Author

itsSaad commented May 12, 2015

see this. it says it was fixed in 0.6.3 #8

@tedma4
Copy link

tedma4 commented Jun 6, 2015

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
Copy link

tedma4 commented Jun 6, 2015

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

@owahab
Copy link
Member

owahab commented Jun 7, 2015

Are you running paperclip 4.2+? There seems to be an issue with paperclip-av-transcoder 0.6.4 and paperclip 4.2+
See #10 (comment)

@tedma4
Copy link

tedma4 commented Jun 7, 2015

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
Copy link

8CciaN8 commented Jun 20, 2015

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

Hope you could help me, thanks :)

@DaGraves
Copy link

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

@RailsCod3rFuture
Copy link

+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
Copy link

seyna commented Jul 26, 2016

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.

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

7 participants