ruby-av / paperclip-av-transcoder

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

using this gem on Windows is not working Av::CommandError #44

Open strahinjakrstic opened 8 years ago

strahinjakrstic commented 8 years ago

Hi, this is my first issue posting on github, so please if I'm not doing something right, please tell me :)

OK, so we have one project that is working on Linux version of server on AWS, and I use Windows as a OS. When I want to create new attachment using this gem, I get following error:

**Av::CommandError in Api::V1::DigitalProductsController#create

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 echo "false"; fi' returned 1. Expected 0 Here is the command output: STDOUT:

STDERR: -v was unexpected at this time.**

I'm reporting this as an issue, as gem is working fine on Linux, but on Windows it is not good.

I have tried to do everything that others users reported similar problems, but without any success. Also, on stack or Google, there is no search result with my issue, like nobody has this problem :(

Please can you see if there is an issue for real, or there are some things that are too obvious that I have missed. I'm sending some screens just in order to have full picture.

Thank you. call_error call_error_2

strahinjakrstic commented 8 years ago

Hi, I have "fixed" av-0.9.0 gem by ignoring validation self.detect_command('ffmpeg') and have only ffmpeg command available as a choice, and now it works also on windows. This was kind of dirty method of removing the issue, but it works.

So for anybody that will face same issue, go to installed copy of av gem and find file: av/cli.rb

then in that file remove line 7 "found << 'avconv' if self.detect_command('avprobe')" then remove in line 8 validation "if self.detect_command('ffmpeg')"

BUT please ensure that you have ffmpeg working before you do this!

I'm writing this here only to help windows developers as this is a problem that will appear using this gem.

BlackSwan84 commented 7 years ago

Hi, i have the same problem with windows.

I have do exactly what you recommend, but i don't know how to install this "fixed gem" in my project;

Can you tell me how you do ?

P.S: just for information, i am learning rails and web-development since on month...

Thank You