Hello,

maybe this is a stupid question. But I have to ask anyway, is there a way to increase the quality beyond the "highest setting" in the FLV preset.

When comparing the quality of the original mp4 with the flv file (see attachments) it is apearent that the flv will not do at all.

Am I missing something in the advanced video settings of the preset or is flv unsuitable for high quality in generel? Sorry if my question seem stupid, but I don't work with video very much.

Best wishes,
Paul

Comments

Jorrit’s picture

Assigned: Unassigned » Jorrit

Could you take a look at my question in #1404432: No codecs and output extension selectable ? Maybe the FLV quality problem is solved when that fix works.

Jorrit’s picture

Status: Active » Closed (works as designed)

Closed because of lack of response.

fonant’s picture

Status: Closed (works as designed) » Active

I have this problem too. The "Quality" setting appears to have no effect at all on the ffmpeg command actually run, and unless I specify a large bitrate my video is very pixellated. Have tried various settings, and the latest dev version.

Jorrit’s picture

What version of FFmpeg are you using? Can you give me a link to a page with a pixelated video?

fonant’s picture

Further investigation shows that the ffmpeg command does not include a quality argument. In the past I've found that -qscale works nicely, but the code doesn't exist to set this in the video module. The Quality setting is present in the Zencoder code, but isn't in the ffmpeg code.

Using ffmpeg version 0.7.13-rpmfusion, but it's the command line that's wrong, not ffmpeg.

We need to call the setConstantQuality() method, with an integer modified to match that method's requirements for 100 being best quality and 0 worst quality. In the past I've used -qscale 5 for high quality, so that would need setConstantQuality(84);

fonant’s picture

OK, my fixes so that the Video Quality works for ffmpeg transcoding, are as follows:

  1. File phpvideotoolkit.php5.php, function setConstantQuality() needs to return TRUE;
  2. Add this code to file TranscoderAbstractionFactoryFfmpeg.inc setOptions():
            case 'video_quality':
              $result = $this->transcoder->setConstantQuality($value * 20); // phpVideoToolkit expects 1 to 100 range.
              break;
    
  3. Change setting of bitrate if the user didn't supply one, change:
            case 'video_bitrate':
              if (empty($value)) {
                $value = 200;
              }
    

    to

            case 'video_bitrate':
              if (empty($value)) {
                break;
              }
    

    (or similar!).

Jorrit’s picture

Status: Active » Needs review

I overlooked your comment, sorry. I'll see what I can do for the next release.

Jorrit’s picture

Status: Needs review » Fixed

I updated the module such that the Video quality setting is used by FFmpeg, thanks for that. I did not change the handling of video_bitrate, because the switch statement isn't executed when $value is empty. I removed all code related to $value being empty.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

abarpetia’s picture

Issue summary: View changes
Issue tags: +Video Quality does not working

Hello,
I am creating all my videos to .flv format by using this module. When i set video quality to 1 it gives me same output as after setting video quality 5. I also check playing both files but it seems no effect of setting video quality option in preset and also the file size is same.

My main objective is to convert all my video to high quality .flv videos.
Thank You,