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

Failed to set value '0' for option qscale #25

Closed
JakeTheSnake3p0 opened this issue Feb 24, 2014 · 4 comments
Closed

Failed to set value '0' for option qscale #25

JakeTheSnake3p0 opened this issue Feb 24, 2014 · 4 comments

Comments

@JakeTheSnake3p0
Copy link

I have a test file downloaded from

http://www.youtube.com/watch?v=C0DPdy98e4c

and saved as a webm and flv using Flash Video Downloader. The files are named test.flv and test.webm. When testing my model, I get transcoding errors from ffmpeg.

  1. It says ffmpeg is being deprecated in favour of avconv.

  2. Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)

  3. qscale must be > 0.0 and <= 255

  4. Failed to set value '0' for option 'qscale'

ffmpeg reports version 0.8.10-6.0.8.10-0ubuntu0.13.10.1

These issues occur for both the flv and webm files. I also did another test with an .avi file downloaded from the web (not using FLV downloader) and I also get these issues.

@rheaton
Copy link
Owner

rheaton commented Feb 28, 2014

Can you get it to transcode via the command-line or the streamio-ffmpeg gem?

@JakeTheSnake3p0
Copy link
Author

Can you provide a sample script that your app generates based on a simple conversion to mp4 so I can test it, or does your app log the command that is run using Rails.logger? If not, that would definitely be a helpful debugging tool.

@JakeTheSnake3p0
Copy link
Author

I just tried a direct command to convert via ffmpeg. It's complaining because qscale cannot be set at 0. It must be greater than 0. I also had to use -strict experimental because ffmpeg complained about aac or something.

i.e., this didn't work: ffmpeg -i spec/models/files/test.webm -vcodec mpeg4 -qscale 0 -strict experimental spec/models/files/test-output.mp4

whereas this did: ffmpeg -i spec/models/files/test.webm -vcodec mpeg4 -qscale 0.1 -strict experimental spec/models/files/test-output.mp4

So this app is setting qscale to 0 when it should be greater than 0 and less than or equal to 255 (according to ffmpeg).

@JakeTheSnake3p0
Copy link
Author

I modified my uploader to the following as a 'workaround' to the adverse defaults as well as other issues not related to the gem:

process encode_video: [:mp4, resolution: :same, video_bitrate: :same, custom: '-qscale 1 -acodec aac -strict experimental']

FWIW I also had to install other codecs via sudo apt-get install ubuntu-restricted-extras. Even with that, I got errors stating a problem with libfaac (which is why I used -strict experimental). It seems to be working now.

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

2 participants