QtAV
QtAV copied to clipboard
Transcoding Video to buffer
Currently, I'm using this to transcode a video to buffer -
buffer = new QBuffer;
buffer->open(QBuffer::ReadWrite);
transcoder->setOutputMedia(buffer);
if (!transcoder->createVideoEncoder())
QMessageBox::warning(0, QString::fromLatin1("Encoder error"), tr("Failed to create encoder."));
encoder = transcoder->videoEncoder();
encoder->setCodecName("libx264");
transcoder->start();
player->play();
But when I check the buffer size, it returns a size 0 and buffer is empty. If I try to replace the buffer
with a filename like "example.mp4"
, it works. Please help
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
news?