AWS Thinkbox Discussion Forums

Draft mov encoding outputs a buggy mov file

Hi,
I am just trying to encode a frame sequence to an mov file using one of provided examples, “encode_to_MOV_H264_1080p_with_audio.py”.
I get the mov file at the end of the job but the file seems to be corrupt. It doesn’t play all the frames and when brought into Premiere shows up as a 1 frame duration clip.
Not sure if there needs to be some configuration of quicktime on the slave machines. I am running it on Windows 7 64 bit and using Deadline 6.1 , if that makes any difference.

When you say “it doesn’t play all the frames”, are you playing it in Premiere, or another viewer?

In Premiere it appears as a clip that is 1 frame long. In quicktime player it maybe plays two frames, but can be scrubbed about half way to see more frames and the rest of the way it just holds the last frame. In VLC it just plays one frame. What is interesting, when opened in quicktime, the inspector doesn’t show the frame rate or playback frame rate like it usually does. Maybe it has something to do with the frame rate compression?

Are you using encode_to_MOV_H264_1080p_with_audio.py as-is, or did you modify it at all?

I didn’t modify it but just in case here is what’s inside the py file.

[code]
import Draft
import os
import sys
from DraftParamParser import *

expectedTypes = dict()
expectedTypes[‘frameList’] = ‘’
expectedTypes[‘inFile’] = ‘’
expectedTypes[‘outFile’] = ‘’

#Parse the command line arguments
params = ParseCommandLine( expectedTypes, sys.argv )

outWidth = 1920
outHeight = 1080
audio = None
path = params[‘inFile’]
frames = FrameRangeToFrames( params[‘frameList’] )

parent = os.path.dirname( os.path.dirname( path ) )

for file in os.listdir( parent ):
if file.lower().endswith( ‘.wav’ ) or file.lower().endswith( ‘.aiff’ ) or file.lower().endswith( ‘.aif’ ):
audio = file
break

if audio != None:
encoder = Draft.VideoEncoder( params[‘outFile’] , 23.976, outWidth, outHeight, codec=“H264”, audioFilename=os.path.join( parent,audio ) )
else:
encoder = Draft.VideoEncoder( params[‘outFile’] , 23.976, outWidth, outHeight, codec=“H264” )

for frameNumber in frames:
inFile = ReplaceFilenameHashesWithNumber( path, frameNumber )
myFrame = Draft.Image.ReadFromFile( inFile )

myFrame.Resize( outWidth, outHeight )

encoder.EncodeNextFrame( myFrame )

encoder.FinalizeEncoding()[/code]

Here is the job log

=======================================================
Log
=======================================================
0: Task timeout is disabled.
0: Loaded job: testss (52f5159cc88e2009f441ab2d)
0: INFO: Executing plugin script C:\Users\ifloussov\AppData\Local\Thinkbox\Deadline6\slave\APOLLO\plugins\52f5159cc88e2009f441ab2d\Draft.py
0: INFO: Found Draft python module at: 'C:\Users\ifloussov\AppData\Local\Thinkbox\Deadline6\slave\APOLLO\Draft\Draft.pyd'
0: INFO: About: Draft Plugin for Deadline
0: INFO: The current environment will be used for rendering
0: Plugin rendering frame(s): 0-120
0: INFO: Draft job starting...
0: INFO: Stdout Handling Enabled: True
0: INFO: Popup Handling Enabled: False
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Looking for bundled python at: 'C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe'
0: INFO: Executable: "C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe"
0: INFO: Argument: -u "\\CICADA-DC\DeadlineRepository6\draft\Samples\Encode\encode_to_MOV_H264_1080p_with_audio.py" username=""  entity=""  version=""  frameList=0-120  startFrame=0  endFrame=120  outFolder="Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Draft"  outFile="Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Draft\Test_.RGB_color.mov"  inFile="Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Test_.RGB_color.####.exr"   deadlineRepository="\\CICADA-DC\DeadlineRepository6" taskStartFrame=0 taskEndFrame=120 
0: INFO: Startup Directory: "C:\Users\ifloussov\AppData\Local\Thinkbox\Deadline6\slave\APOLLO\Draft"
0: INFO: Process Priority: BelowNormal
0: INFO: Process Affinity: default
0: INFO: Process is now running
0: STDOUT: Checking for license at @192.168.10.10
0: STDOUT: Draft 1.1.0.54257
0: STDOUT: Command line args:
0: STDOUT: username=
0: STDOUT: entity=
0: STDOUT: version=
0: STDOUT: frameList=0-120
0: STDOUT: startFrame=0
0: STDOUT: endFrame=120
0: STDOUT: outFolder=Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Draft
0: STDOUT: outFile=Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Draft\Test_.RGB_color.mov
0: STDOUT: inFile=Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Test_.RGB_color.####.exr
0: STDOUT: deadlineRepository=\\CICADA-DC\DeadlineRepository6
0: STDOUT: taskStartFrame=0
0: STDOUT: taskEndFrame=120
0: STDOUT: [libx264 @ 000000000031CDE0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
0: STDOUT: [libx264 @ 000000000031CDE0] profile Constrained Baseline, level 4.0
0: STDOUT: [libx264 @ 000000000031CDE0] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyright 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=3 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=3 rc=crf mbtree=1 crf=18.3 qcomp=0.60 qpmin=4 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
0: STDOUT: Output #0, mov, to 'Z:\14-1027_CanadaPost\01.Frames\s02-01\01.Test\Draft\Test_.RGB_color.mov':
0: STDOUT:   Metadata:
0: STDOUT:     encoder         : Lavf54.29.104
0: STDOUT:     Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p, 1920x1080, q=4-51, 2997 tbn, 23.98 tbc
0: STDOUT: [libx264 @ 000000000031CDE0] frame I:41    Avg QP:18.36  size:526904
0: STDOUT: [libx264 @ 000000000031CDE0] frame P:80    Avg QP:21.82  size: 89767
0: STDOUT: [libx264 @ 000000000031CDE0] mb I  I16..4: 10.1%  0.0% 89.9%
0: STDOUT: [libx264 @ 000000000031CDE0] mb P  I16..4:  0.6%  0.0%  0.6%  P16..4: 46.4% 25.8% 11.3%  0.0%  0.0%    skip:15.4%
0: STDOUT: [libx264 @ 000000000031CDE0] coded y,uvDC,uvAC intra: 92.1% 90.2% 85.2% inter: 37.0% 8.9% 2.6%
0: STDOUT: [libx264 @ 000000000031CDE0] i16 v,h,dc,p: 22% 31% 31% 16%
0: STDOUT: [libx264 @ 000000000031CDE0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 23% 11%  6%  7%  6%  9%  6% 14%
0: STDOUT: [libx264 @ 000000000031CDE0] i8c dc,h,v,p: 52% 26% 14%  8%
0: STDOUT: [libx264 @ 000000000031CDE0] ref P L0: 73.2% 26.8%
0: STDOUT: [libx264 @ 000000000031CDE0] kb/s:45628.80
0: INFO: Process exit code: 0
0: INFO: Draft job complete!

also attached my Draft submission dialog box

Actually just tried the encode_to_MOV_MJPEG_1080p.py and that seems to work fine. So its the H264 compression that is the problem.

Thanks for the extra information! I’m running some tests now here…

Solved.

its the encode_to_MOV_H264_1080p_with_audio.py file that has the error.
I used the encode_to_MOV_MJPEG_1080p.py and just replaced the CODEC variable with “H264” and ran it.
Looks like it works. Not sure what is wrong with the original h264 example but MJPEG example works fine.

It looks like Draft no longer likes the frame rate 23.976. Setting it to 24, or removing it altogether, gives a video that plays fine for me. I’ll look into why 23.976 causes problems with Draft. Thanks for letting us know about this issue, and being so helpful in diagnosing it!

thanks for all your help, we actually don’t use 23.976 frame rate, but I know other do use it.

Welcome! So then updating the script to use your preferred frame rate (or the default of 24) should fix that script for you. Let me know if you have anything else I can help you with.

Privacy | Site terms | Cookie preferences