Timor
February 19, 2012, 6:54pm
#1
It would be great if draft could convert a movie file.
Sometimes our motiondesign guys render out an uncompressed quicktime and if they have draft ticket, it crashes (it doesn´t even say why).
Maybe sth. for the next realease?
Thanks
Timor
P.S. Of course having audio support would help a lot too (as this is the main reason fo the QT thingie…)
+1 even without audio support. We do a lot of transcoding from Uncompressed QTs or AVIs to web-ready QTs. In fact usually AVIs are our ‘master’.
jgaudet
February 21, 2012, 6:08pm
#3
You should be able to create a Draft template with a decoder for the original video and an encoder for the format you want it in… Something like this:
[code]decoder = Draft.VideoDecoder( params[‘inFile’] )
encoder = Draft.VideoEncoder( params[‘outFile’], fps, width, height, kbitrate, codec )
while( decoder.DecodeNextFrame( outFrame ) ):
encoder.EncodeNextFrame( outFrame )
encoder.FinalizeEncoding[/code]
(I’m assuming all the stuff to initialize the encoder/decoder was declared elsewhere, here)
Does that not work for you guys (this obviously won’t handle the audio, though)?
Cheers,
paul
March 5, 2012, 8:12pm
#4
Thank you for your report!
I reproduced the crash when reading uncompressed Quicktime and AVI files. It should be fixed in the next build.
Audio support is on our wish list.
Please let me know if there are any other issues that I’m missing here.
Timor
March 8, 2012, 7:43pm
#5
Hi Paul,
thank you for looking into this (especially the audio).
One thing i notived (have not had time for furher testing): H264 encoded with draft never plays smooth in quicktime (VLC works). Would be cool if you could check this.
Thank you very much,
Timor
paul
March 8, 2012, 8:35pm
#6
Thanks for letting us know! Could you please tell us the image size and the VideoEncoder parameters you’re using in Draft? For example:
Image size: 960x540
Draft.VideoEncoder( outFile, 24, 960, 540, 5000, “H264” )
Timor
March 8, 2012, 10:21pm
#7
#width = firstFrame.width
#height = firstFrame.height
width = 1280
height = ( firstFrame.height * width ) / firstFrame.width
#width = 800
#height = 450
#Set up variables for video encoding
fps = 25
kBitRate = 2000
codec = “H264”
videoEncoder = Draft.VideoEncoder( params[‘outFile’], fps, width, height, kBitRate, codec )
paul
March 9, 2012, 11:19pm
#8
Thanks!
Are you using Windows? I was wondering if you could please try to encode video using the attached build of Draft.
Timor
March 14, 2012, 4:52pm
#9
Hi Paul,
unfortunately the problem persists, jumpy in QT, smooth in VLC (and also smooth in tweaks RV).
Someone here suggested it´s a h264 level, not a profile issue, as QT doesn´t support all levels…? Just guessing here.
It seems strange to me that no one else has encountered this before…?
Thanks,
Timor
paul
March 15, 2012, 12:07am
#10
VLC is smoother than QT for me too, but QT doesn’t look jumpy to me.
I wonder if QT’s frame rate is CPU limited for you? I notice there’s a big difference in CPU usage between VLC and QT on my machine. QT uses something like 4x more CPU than VLC with software decoding. Furthermore, VLC’s CPU usage is negligible when I use GPU accelerated decoding.
Admittedly I am using trivial test data. If you have a particularly bad example, please feel free to send it to us using our ticket system .
You can change the H264 level indirectly by changing the frame rate, resolution, and bit rate. For example, you can get down to level 3 by using:
[code]fps = 25
width = 720
height = 480
kBitRate = 5000
codec = ‘H264’
videoEncoder = Draft.VideoEncoder( params[‘outFile’], fps, width, height, kBitRate, codec )[/code]
You can see the resulting level if you use Draft interactively in Python. For example, the above settings output:
[libx264 @ 00000000005EC280] profile Constrained Baseline, level 3.0
This table of H264 levels was useful for me: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels