View Full Version : Open Quicktime Prores file with no indexing
speedyrazor
16th January 2016, 09:22
Hi, I have been using QTSource for opening Quicktime Prores files, but have found issues with this and after talking with the developer, who no longer supports this, have decided to look for another solution.
The problem is the indexing time to even open a file. I am dealing with large HD movies, 90 mins - 130GB, and indexing using FFmpegSource takes about 10 mins even with a very fast connection to the source file.
So my question is......
Is there anyway I can open a Quicktime Prores file which has multi Track / Channel audio without having to index it first?
Kind regards.
sneaker_ger
16th January 2016, 09:40
Try L-Smash Works (https://www.dropbox.com/sh/3i81ttxf028m1eh/AAABkQn4Y5w1k-toVhYLasmwa?dl=0):
a=lsmashaudiosource("input.mov")
v=lsmashvideosource("input.mov") #add e.g. "fpsnum=24000, fpsden=1001" for variable framerate to constant framerate conversion
AudioDub(v, a)
A README is included telling you how to choose tracks if there is more than one of a kind.
speedyrazor
16th January 2016, 10:39
Try L-Smash Works (https://www.dropbox.com/sh/3i81ttxf028m1eh/AAABkQn4Y5w1k-toVhYLasmwa?dl=0):
a=lsmashaudiosource("input.mov", av_sync=true)
v=lsmashvideosource("input.mov") #add e.g. "fpsnum=24000, fpsden=1001" for variable framerate to constant framerate conversion
AudioDub(v, a)
A README is included telling you how to choose tracks if there is more than one of a kind.
With this I get:
LSMASHAudioSource does not have a name argument “av_sync”
And if i change it to use LWLibavAudioSource it then creates an index file.
And I dont think it likes opening Quicktime Prores files.
sneaker_ger
16th January 2016, 10:47
My bad, "av_sync" is really only for LSMASHAudioSource(). Just remove the argument (I have edited my post to reflect that).
And I dont think it likes opening Quicktime Prores files.
Why do you think that?
If the output looks strange remember that AviSynth natively only supports 8 bit bitdepth. See "format" and "stacked" parameters in readme. Use "stacked=true" and appropriate 16 bit YUV format if you want to edit in high bitdepth, otherwise just choose a format that is 8 bit without "stacked=true".
http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth
speedyrazor
16th January 2016, 10:54
My bad, "av_sync" is really only for LSMASHAudioSource(). Just remove the argument (I have edited my post to reflect that).
Why do you think that?
Just tried it and the video it produces is bright green and the output is 3840x1080 (input is 1920x1080), but on the plus side, no index file is created.
sneaker_ger
16th January 2016, 10:54
See my edit. It's because ProRes is >8 bit.
poisondeathray
16th January 2016, 18:19
use format="YUV422P8"
eg.
LSmashVideoSource("video.mov", format="YUV422P8")
speedyrazor
16th January 2016, 18:27
use format="YUV422P8"
eg.
LSmashVideoSource("video.mov", format="YUV422P8")
Using that the resulting video comes out with the bottom half of the screen bright green.
I get a picture using YUY2. Is there anything wrong with that (being that Prores is 10 bit?)
sneaker_ger
16th January 2016, 18:30
Using that the resulting video comes out with the bottom half of the screen bright green.
That should not happen. Do you have a sample?
I get a picture using YUY2. Is there anything wrong with that (being that Prores is 10 bit?)
Bit-depth and chroma sub-sampling are two different things. You can use YUY2 and it should keep 4:2:2 sampling but dithered down to 8 bit per sample.
poisondeathray
16th January 2016, 18:36
Using that the resulting video comes out with the bottom half of the screen bright green.
I get a picture using YUY2. Is there anything wrong with that (being that Prores is 10 bit?)
I'm using avisynth 2.6. You're probably using 2.58 if it comes out as YUY2
L-smash older version r785
It will become truncated to 8bit, unless you use a stacked workflow. There is a stacked=true for lsmash, but I guess it depends what you're going to do with it in terms of avisynth
speedyrazor
16th January 2016, 18:39
[QUOTE=sneaker_ger;1753593]That should not happen. Do you have a sample?
I have sent you a PM with a link to a small sample.
speedyrazor
16th January 2016, 18:41
It will become truncated to 8bit, unless you use a stacked workflow. There is a stacked=true for lsmash, but I guess it depends what you're going to do with it in terms of avisynth[/QUOTE]
I am using Avisynth 2.6 (MT) with the latest Lsmash.
I want to retain the 10 bit, so I should use stacked=true?
And with what format=?
sneaker_ger
16th January 2016, 18:43
I have no problem opening that file with format="YUV422P8" in AviSynth 2.6.0, no green at the bottom. Either you are not using a 8 bit format or maybe it's a problem with older AviSynth like suggested by poisondeathray.
I am using Avisynth 2.6 (MT) with the latest Lsmash.
I want to retain the 10 bit, so I should use stacked=true?
And with what format=?
Depends on what you want to do with the output.
poisondeathray
16th January 2016, 18:46
Re 10bit. I haven't used lsmash for that, I typically use the modified ffms2 with 10bit support . But I noticed stacked=true in the help file for l-smash, not sure if it's working or how to use it properly. But it should be YUV422P10 for 10bit 422. I'll play with it later if I have time
speedyrazor
16th January 2016, 18:48
So whats the difference between YUV422P8 and YUV422P10.
P8 is 8 bit and P10 is 10 bit?
sneaker_ger
16th January 2016, 18:48
Re 10bit. I haven't used lsmash for that, I typically use the modified ffms2 with 10bit support . But I noticed stacked=true in the help file for l-smash, not sure if it's working or how to use it properly. But it should be YUV422P10 for 10bit 422. I'll play with it later if I have time
The problem is you do not always need stacked. And even if you do the bit-order plays a role, l-smash might use a different one than most other high bitdepth plugins. We really need to know what he wants to do with the output before we can give a definite answer.
So whats the difference between YUV422P8 and YUV422P10.
P8 is 8 bit and P10 is 10 bit?
Yes.
speedyrazor
16th January 2016, 18:49
The problem is you do not always need stacked. And even if you do the bit-order plays a role, l-smash might use a different one than most other high bitdepth plugins. We really need to know what he wants to do with the output before we can give a definite answer.
OK, sorry, I am generally opening the file with Avisynth, the transcoding the file using ffmpeg, to another Prores HQ 10 bit file.
poisondeathray
16th January 2016, 18:51
OK, sorry, I am generally opening the file with Avisynth, the transcoding the file using ffmpeg, to another Prores HQ 10 bit file.
Why do you need avisynth? (What operations are you doing in avisynth)?
Someone can correct me on this , but I think the equivalent stack16 worfklow for lsmash would be format="YUV422P16", stacked=true . So that's MSB, LSB stacked. You would have to use the avisynth stack16 workflow and Dither tools to dither back to other bit depths
speedyrazor
16th January 2016, 18:56
I am doing a convertion from Prores HD 1920x1080 24fps to PAL:
Here is the Avisynth script:
v=lsmashvideosource("movie.mov", stacked=true, format="YUV422P10")
v = v.ColorMatrix(mode="Rec.709->Rec.601", clamp=0)
v = v.Spline64Resize(720, 576)
a1 = lsmashAudioSource("movie.mov", track=1)
a2 = lsmashAudioSource("movie.mov", track=2)
a3 = lsmashAudioSource("movie.mov", track=3)
a4 = lsmashAudioSource("movie.mov", track=4)
a5 = lsmashAudioSource("movie.mov", track=5)
a6 = lsmashAudioSource("movie.mov", track=6)
a7 = lsmashAudioSource("movie.mov", track=7)
a = MergeChannels(a1,a2,a3,a4,a5,a6,a7)
AudioDub(a,v)
AssumeFPS(25, 1, true)
ResampleAudio(48000)
And here is the ffmpeg script:
ffmpeg\ffmpeg.exe -i AvisynthScript.avs -map 0:0 -map 0:1 -map 0:1 -map 0:1 -map 0:1 -map 0:1 -map 0:1 -map 0:1 -map_channel 0.1.0:0.1 -map_channel 0.1.1:0.2 -map_channel 0.1.2:0.3 -map_channel 0.1.3:0.4 -map_channel 0.1.4:0.5 -map_channel 0.1.5:0.6 -map_channel 0.1.6:0.7 -map_channel 0.1.7:0.7 -timecode "00:00:00:00" -c:a pcm_s24le -vcodec prores -profile:v 3 -vtag apch -f mov -pix_fmt yuv422p10le -y OutputFilePAL.mov
Using these two in combination creates a brightly green video.
poisondeathray
16th January 2016, 19:00
I don't think you can feed stacked format into ffmpeg directly. You would have to process it as stack16, dither it back to 10bit. Avisynth has no way to handle >8bit depth unless it's the stack16 format
Why don't you use ffmpeg for everything, the resize, colormatrix, channel mapping etc...
speedyrazor
16th January 2016, 19:07
Why don't you use ffmpeg for everything, the resize, colormatrix, channel mapping etc...
Because the colormatrix in ffmpeg does not support > 8 bit :(
And I like the way Avisynth handles all the other filers, etc.
So..... what are my options?
poisondeathray
16th January 2016, 19:08
Because the colormatrix in ffmpeg does not support > 8 bit :(
good point, but avisynth's colormatrix is 8bit only too (ffmpeg's colormatrix was ported from avisynth)
It might be possible with dither tools or fmtc in vapoursynth to keep everything >8bit . Or use other tools with LUTs, such as resolve, after effects, nukex
sneaker_ger
16th January 2016, 19:09
Dither tools can replace colormatrix and resize for >8 bit IIRC.
speedyrazor
16th January 2016, 19:10
Dither tools can replace colormatrix and resize for >8 bit IIRC.
Could you elaborate please?
poisondeathray
16th January 2016, 19:14
For dither tools, you would process everything in stack16 (all operations, including resize). That's how you normally keep >8bit in avisynth. But I think dither tools can only do it for RGB<>YUV conversions, not YUV to YUV 709 to 601 , correct me if I'm wrong sneaker .
fmtconv in vapoursynth can do it for sure (there are examples in the docs)
sneaker_ger
16th January 2016, 19:22
But I think dither tools can only do it for RGB<>YUV conversions, not YUV to YUV 709 to 601 , correct me if I'm wrong sneaker.
I think you are correct but is it a big problem? Is 16 bit RGB not plenty? Even fmtconv needs to upscale to 4:4:4 for some reason for color conversions.
speedyrazor
16th January 2016, 19:25
I appreciate all your help guys.
So should I be switching to VapourSynth to get 10 bit support by default?
poisondeathray
16th January 2016, 19:27
I think you are correct but is it a big problem? Is 16 bit RGB not plenty. Even fmtconv needs to upscale to 4:4:4 for some reason for color conversions.
Yes, 16bit RGB should be plenty . I don't think it would be a big problem at all, especially under "normal" circumstances. You might be able to display some very minor issues with CGI or test patterns
Yes, fmtconv's matrix needs 4:4:4, but can stay in YUV
speedyrazor
16th January 2016, 20:52
So looking at the sort of thing I do in my Avisynth script, should I switch to VapourSynth for 10 bit support?
And is the transition from Avisynth to VapourSynth an easy one?
speedyrazor
16th January 2016, 21:12
Just looked into VapourSynth, and I see there is no audio support :(
So I guess I'll stick with Avisynth (unless there is an alternative).
In that case, could you guys point me in the right direction to get 10 bit processing sorted in Avisynth with my script please?
Kind regards.
poisondeathray
16th January 2016, 22:09
Or another option is to can use vapoursynth for the video, ffmpeg/sox or avisynth for the audio. ffmpeg can take multiple inputs with -map. So you could use vspipe for the vpy for the video, avs or ffmpeg/sox fo the audio all piped to ffmpeg . For sure vapoursynth works with 10bit, prores output from ffmpeg. I've only used dither tools and 10bit for x264 10bit encoding . There might be some other manipulations you need to do to get ffmpeg to handle the avs script correctly if you're using it for video (I don't think it can't handle stacked directly)
To answer the other question - for me personally, I find vapoursynth more difficult than avisynth. People with programming backgrounds find it easy and love it. Not so inuitive for me
poisondeathray
16th January 2016, 22:17
I'll see if I can get it working in avisynth with ffmpeg and test for validity / 10bit ness, but the template for vapoursynth would look something like this . Again this is verified to work with ffmpeg prores 10bit encoding, and it's 10bit all the way through with YUV all the way through. (with RGB conversion, even 16 bit, you risk clipping)
import vapoursynth as vs
core = vs.get_core()
ret = core.lsmas.LWLibavSource(source=r'PATH\INPUT.mov', format="YUV422P10")
ret = core.fmtc.resample (clip=ret, w=720, h=576, css="444", kernel="spline36")
ret = core.fmtc.matrix (clip=ret, mats="709", matd="601")
ret = core.fmtc.resample (clip=ret, css="422")
ret = core.fmtc.bitdepth (clip=ret, bits=10)
ret = core.std.AssumeFPS(ret, fpsnum=25, fpsden=1)
ret.set_output()
To use ffmpeg with vpy, it would look something liek this (for video only, you would use -map and appropriate parameters with 2 pipes, plus whatever custom parameters like vtag etc..)
vspipe --y4m input.vpy - | ffmpeg -f yuv4mpegpipe -i - -c:v prores -an output.mov
sneaker_ger
16th January 2016, 22:17
To answer the other question - for me personally, I find vapoursynth more difficult than avisynth. People with programming backgrounds find it easy and love it. Not so inuitive for me
High bitdepth evens the ground a bit, though. Get's really ugly in AviSynth:
v=lsmashvideosource("movie.mov", format="YUV422P16", stacked=true)
v=Dither_convert_yuv_to_rgb (v, matrix="709", output="rgb48y", lsb_in=true)
v=Dither_resize16 (v, 720, 576, y=3, u=1, v=1)
r = SelectEvery (v, 3, 0)
g = SelectEvery (v, 3, 1)
b = SelectEvery (v, 3, 2)
v=Dither_convert_rgb_to_yuv (r, g, b, matrix="601", lsb=true, output="YV16")
v=Dither_quantize(v, bitdepth=10, reducerange=true)
v=Dither_out(v)
a1 = lsmashAudioSource("movie.mov", track=1)
a2 = lsmashAudioSource("movie.mov", track=2)
a3 = lsmashAudioSource("movie.mov", track=3)
a4 = lsmashAudioSource("movie.mov", track=4)
a5 = lsmashAudioSource("movie.mov", track=5)
a6 = lsmashAudioSource("movie.mov", track=6)
a7 = lsmashAudioSource("movie.mov", track=7)
a = MergeChannels(a1,a2,a3,a4,a5,a6,a7)
AudioDub(v, a)
AssumeFPS(25, 1, true) # <- this changes the pitch, might want to look at TimeStretch()
ResampleAudio(48000)
And piping also gets ugly (I don't know if there's a way to directly open in ffmpeg):
ffmpeg -i AvisynthScript.avs -f rawvideo - | ffmpeg -f rawvideo -pix_fmt yuv422p10 -s:v 720x576 -r 25 -i - -i AvisynthScript.avs -map 0:0 -map 1:1 -c:v prores -c:a pcm_s24le -y OutputFilePAL.mov
Personally, I'd rather go with VapourSynth and separating video and audio processing. Though I have to wonder why you go 720x576 while still trying to keep 4:2:2 10 bit. I mean, this is surely for DVD or something, right? DVD can't do more than 4:2:0 8 bit which would easily be possible in AviSynth without all those ugly tricks.
poisondeathray
16th January 2016, 22:32
I agree with everything sneaker says. But one scenario you might need at SD 10bit 422 intermediate is submission for broadcast for example.
Also, I'm not sure if the avs input rawvideo pipe is 10bit. Isn't ffmpeg avs input 8bit only ? So the raw video pipe should be 8 bit there ? Should be pretty easy to test on some gradients
speedyrazor
16th January 2016, 22:38
Well..... The Avisynth script looks a mess, while the VapourSynth looks quite nice, as I already develop applications in Python. It's just then feeding that to ffmpeg which is still a bit messy, not really understanding that bit totally. I really appreciate your help on this poisondeathray and sneaker_ger.
poisondeathray
17th January 2016, 05:12
quick update: sneaker's avs script works for true 10bit, i verified the ffmpeg output on various test patterns etc.. in AE
speedyrazor
17th January 2016, 08:53
I am now leaning towards going down the Vapoursynth road and dealing with the audio separately. I do a lot of speed change in avisynth (as seen in my script above), just wanted to check that VapourSynth can do the same frame rate speed up / slowdown?
foxyshadis
17th January 2016, 12:10
Framerate conversion and A/V sync is a tricky subject - even in regular Avisynth. How do you prefer to change the rate? AssumeFPS is already in VS. A basic changefps is documented here (https://www.doom9.org/showthread.php?p=1700526), the time will stay the same. If the video length changes then the audio will have to be resampled in sox.
speedyrazor
17th January 2016, 15:07
In Avisynth, I currently either use AssumeFPS for a speed change, or do a 3:2 pulldown (to get from 23.976 to 29.97) is there a good method for 3:2 pulldown in Vapoursynth?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.