assertrdist<=maxdist,"distortion(frame[%d]) %g > %g allowed for format `%s' and codec `%s'"%(k,rdist,maxdist,format,codec)
# make sure that the encoded frame rate is not off by a big amount
assertabs(framerate-encoded.frame_rate)<=(1.0/length),"reloaded framerate %g differs from original %g by more than %g"%(encoded.frame_rate,framerate,1.0/length)
assertabs(framerate-encoded.frame_rate)<=(1.0/length),"reloaded framerate %g differs from original %g by more than %g for format `%s' and codec `%s'"%(encoded.frame_rate,framerate,1.0/length,format,codec)
finally:
...
...
@@ -84,8 +84,8 @@ def test_format_codecs():
# low quality encoders - avoid using - available for compatibility
assertmax(dist)<=maxdist,"max(distortion) %g > %g allowed for format `%s' and codec `%s'"%(max(dist),maxdist,format,codec)
# make sure that the encoded frame rate is not off by a big amount
assertabs(orig_vreader.frame_rate-encoded.frame_rate)<=(1.0/MAXLENTH),"original video framerate %g differs from encoded %g by more than %g"%(encoded.frame_rate,framerate,1.0/MAXLENTH)
assertabs(orig_vreader.frame_rate-encoded.frame_rate)<=(1.0/MAXLENTH),"original video framerate %g differs from encoded %g by more than %g for format `%s' and codec `%s'"%(encoded.frame_rate,framerate,1.0/MAXLENTH,format,codec)