Log in

View Full Version : AVISynth using QTSource as an input to FFMPEG


cjplay
7th October 2011, 07:11
All,

I'm pretty close to my wits end here. I need to get 4:2:2 8-bit video and 24-bit uncompressed audio out of my AVS script (burn-ins, HD to SD conversion, sometimes using SalFPS3, and merging with audio) and into FFMPEG for an Avid MOV output to edit with, mostly on a weekly basis.

My script is basically QTSource loading the ProRes MOV file with 8 tracks of mono (using audio=2). The files (any files, QT, MPEG-2, AVI, etc.) that FFMPEG puts out all say the same error - "Unable to initialize Quicktime Environment".

Script right now - QTInput("Myfile.mov",audio=2,mode=0).
This script loads in VDub just fine, just not in FFMPEG or MPlayer. Piping using AVS2YUV, AVS2pipe and pipemod, and avs2avi have failed. Any thoughts? Am I stuck transcoding twice to do this?

Thanks for any help. -CJ

TheFluff
7th October 2011, 11:57
Have you tried FFMS2? Recent versions (newer than 2.16) should support ProRes.

By the way, it's pretty odd that the choice of client application can make QT fail to initialize. There's definitely something odd going on there.

cjplay
7th October 2011, 18:40
Fluff, much thanks. I am a fan of FFMS2 and have 2.15. I will update to 2.16 and see what happens. Do you know if the H.264 indexing got any better?

TheRyuu
8th October 2011, 00:30
Fluff, much thanks. I am a fan of FFMS2 and have 2.15. I will update to 2.16 and see what happens. Do you know if the H.264 indexing got any better?

You need to use the latest test build (currently r570 - built 9/28/2011 so it SHOULD have it). Prores decoding was added to libav on 9/22/2011 so 2.16 doesn't have it.

What do you mean by h264 indexing? Are you referring to BDMV h264? If so then no it's still pretty broken and probably will continue to be until someone writes a custom transport stream parser. I recommend DGAVCDecodeDI/NV for that kind of content. YMMV though, sometimes with the right settings it works, normally progressive stuff generally works ok. It's the interlaced stuff you have to watch out for. h264 from other sources (x264) should be ok.

cjplay
8th October 2011, 03:07
Thanks Ryuu. Not terribly worried about H.264, although working if wrapped in an MP4 might interest me as those populate my DLNA-equipped network of media rips. So easy to get FFMPEG to spit those out. :)

Thanks again. I'll let you know how it goes!

-CJ

cjplay
8th October 2011, 06:18
:thanks:

Guys,

File indexed, loaded the file, and transcoded in FFMPEG using FFMS2 v570 as the source plugin. It was great. Just added 8 lines of audio loaders (8 mono tracks), but that's fine with me unless you have an easier way.

The only issue I ran into is in the attachments. The source is what the colorbars should look like and the badissue.jpg is what came out. Any thoughts on what caused that? I tried forcing other colorspaces (colorspace="YUY2", "YV12", and "RGB24"), but no change in the result. Similar issues come up during the content itself, but mostly in the dark areas. Thoughts?

####### AVS for converting "TestFile" to an EVD #######
v = FFVideoSource("H:\Testfile_ProRes_8chPCM.mov",colorspace="YUY2")
a1 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=1)
a2 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=2)
a3 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=3)
a4 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=4)
a5 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=5)
a6 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=6)
a7 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=7)
a8 = FFAudioSource("H:\Testfile_ProRes_8chPCM.mov",track=8)
a = MergeChannels(a1,a2,a3,a4,a5,a6,a7,a8)
(HasAudio(a)==true) ? AudioDub(v,a) : v
AssumeTFF().Crop(240,0,1440,1080)
Spline64Resize(720,480).SeparateFields().SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7).Weave().assumefps(29.970,true).ResampleAudio(48000).AssumeTFF()

cjplay
22nd October 2011, 06:33
Tried 579 with no luck fixing the color issue when coming from ProRes HQ MOV file. Any ideas?

Yellow_
22nd October 2011, 09:28
Is it scaling your luma maybe?

cjplay
3rd November 2011, 17:46
Tried 580 and it worked. Had to delete the index first, so maybe 579 was working. Thank you for your help!!