Let's say a Playblast was 80 frames long. Frame 1-80 every thing was normal, then weird frames would be added to frame 81 onwards all the way to frame 157 or so.
Broken frames that are being added. |
ffmpeg -y -i "uncompressed.avi" -vcodec libx264 -vframes 80 -crf 22 -bf 0 "output.mp4"For the entire playback range:
startframe = pm.playbackOptions(ast=1, q=1) endframe = pm.playbackOptions(aet=1, q=1)If you have hilighted the time line, its frame can be queried like this.
slider = pm.mel.eval('$tmpVar=$gPlayBackSlider') startframe, endframe = pm.timeControl(slider,q=True,rangeArray=True)
Simply subtrace startframe from endframe and bam, we get the correct frame number.