AWS Thinkbox Discussion Forums

Quality vs kBitRate

I’m tyring to use the quality flag instead of kBitRate but it isn’t working how it seems that it should…

Here’s what I had orginally which works fine:
videoEncoder = VideoEncoder( tempOutFile, fps, origBgFrame.width, origBgFrame.height, 10000, codec )

Here’s my new code with the error:

0: STDOUT: videoEncoder = VideoEncoder( tempOutFile, fps, origBgFrame.width, origBgFrame.height, quality = 80 , codec )
0: STDOUT: SyntaxError: non-keyword arg after keyword arg

in the example in the docs it says: encoder = Draft.VideoEncoder( “//path/to/video/save.mov”, quality = 80 )

so not sure what’s actually wrong here…

Thanks,
Andrew

Try the following:

videoEncoder = VideoEncoder( tempOutFile, fps, origBgFrame.width, origBgFrame.height, quality = 80 , codec = codec )

Because you have the quality set before the codec, and both are optional parameters, you need to specify the keyword for both.

Cheers,
Andrea

Got it… thanks

No problem, glad it’s working for you!

Privacy | Site terms | Cookie preferences