wang-bin / QtAV

A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
http://qtav.org
3.99k stars 1.51k forks source link

Transcoding Video to buffer #832

Open Yureien opened 7 years ago

Yureien commented 7 years ago

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!](https://www.bountysource.com/issues/42457933-transcoding-video-to-buffer?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F307703&utm_medium=issues&utm_source=github).
isgursoy commented 4 years ago

news?