fvisagie
4th September 2009, 10:43
Dear All,
In order to render overlay subtitles during encoding with FFmpeg I'm frame serving the DV AVI Type 2 input with Avisynth and TextSub. For frame accuracy and to maintain sync with subtitles I'm using OpenDMLSource (the input file is 36GB, too large for AVIFileSource).
The DV AVI video format is YV12 and when I'm not adding subtitles and using FFmpeg directly, it processes that beautifully. Therefore I'd prefer for AVS to read and directly output YV12 without any conversion.
However, when using AVS the video format FFmpeg receives is rawvideo BGRA.
This creates a couple of problems:
* the colourspace conversion seems to halve the speed of processing compared to using DirectShowSource
* the output video is flipped (I notice in mpeg2dec3.htm: "#YV12->BGR24 convertion natively flips image")
* to correct that I need to add FlipVertical() which slows down processing even further
* all together, be it due to the colourspace conversion and/or FlipVertical(), the output quality is noticeably inferior compared to DirectShowSource
The obvious answer seems to be to call OpenDMLSource with pixel_type="YV12".
However, that produces the error message:
the video decompressor couldn't produce YV12 output
How can I prevent this forced colourspace conversion away from YV12, or is there some other way of by-passing the problems it creates?
Many thanks,
Francois
In order to render overlay subtitles during encoding with FFmpeg I'm frame serving the DV AVI Type 2 input with Avisynth and TextSub. For frame accuracy and to maintain sync with subtitles I'm using OpenDMLSource (the input file is 36GB, too large for AVIFileSource).
The DV AVI video format is YV12 and when I'm not adding subtitles and using FFmpeg directly, it processes that beautifully. Therefore I'd prefer for AVS to read and directly output YV12 without any conversion.
However, when using AVS the video format FFmpeg receives is rawvideo BGRA.
This creates a couple of problems:
* the colourspace conversion seems to halve the speed of processing compared to using DirectShowSource
* the output video is flipped (I notice in mpeg2dec3.htm: "#YV12->BGR24 convertion natively flips image")
* to correct that I need to add FlipVertical() which slows down processing even further
* all together, be it due to the colourspace conversion and/or FlipVertical(), the output quality is noticeably inferior compared to DirectShowSource
The obvious answer seems to be to call OpenDMLSource with pixel_type="YV12".
However, that produces the error message:
the video decompressor couldn't produce YV12 output
How can I prevent this forced colourspace conversion away from YV12, or is there some other way of by-passing the problems it creates?
Many thanks,
Francois