- Opengl的片段着色器目前支持的图像格式有限;
- 在WidgetRender中,尽可能使用QImage::Format_RGB32和QImage::Format_ARGB32_Premultiplied图像格式。如下原因:
- Avoid most rendering directly to most of these formats using QPainter. Rendering is best optimized to the Format_RGB32 and Format_ARGB32_Premultiplied formats, and secondarily for rendering to the Format_RGB16, Format_RGBX8888, Format_RGBA8888_Premultiplied, Format_RGBX64 and Format_RGBA64_Premultiplied formats.
- 根据
AVColorSpace
进行色彩空间转换; - 根据
AVColorTransferCharacteristic
进行gamma、PQ、HLG等调整; - 根据
AVColorPrimaries
进行色域转换; - 根据
AVColorRange
进行色彩范围调整;
zscale=p=709;
0,,en,,0000,0000,0000,,Peek-a-boo!
你必须使用 ass_process_chunk
并设置 pts 和持续时间, 和在vf_subtitles.c 中一样。
Dialogue: 0,0:01:06.77,0:01:08.00,en,,0000,0000,0000,,Peek-a-boo!\r\n
使用 ass_process_data
;
subtitles=filename='%1':original_size=%2x%3
如何设置编码参数以获得更小的文件和更好的视频质量?
// fix me?
frame->pts = transcodeCtx->audioPts / av_q2d(transcodeCtx->decContextInfoPtr->timebase())
/ transcodeCtx->decContextInfoPtr->codecCtx()->sampleRate();
transcodeCtx->audioPts += frame->nb_samples;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
setCentralWidget(new QOpenGLWidget(this));
}