Transcode, limit output birate to the media bitrate (no need to upscale)
This commit is contained in:
@@ -57,7 +57,9 @@ AudioWidget::playTrack(boost::filesystem::path p)
|
||||
Transcode::InputMediaFile inputFile(p);
|
||||
|
||||
// TODO get the input stream bitrate and min the result with the desired bitrate
|
||||
Transcode::Parameters parameters(inputFile, Transcode::Format::get(Transcode::Format::OGA), bitrate);
|
||||
Transcode::Parameters parameters(inputFile, Transcode::Format::get(Transcode::Format::OGA));
|
||||
|
||||
parameters.setBitrate(Transcode::Stream::Audio, bitrate);
|
||||
|
||||
_mediaPlayer->load( parameters );
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@ VideoWidget::playVideo(boost::filesystem::path p)
|
||||
else
|
||||
encoding = Transcode::Format::FLV;
|
||||
|
||||
Transcode::Parameters parameters(inputFile, Transcode::Format::get(encoding), 128000, 500000);
|
||||
Transcode::Parameters parameters(inputFile, Transcode::Format::get(encoding));
|
||||
|
||||
parameters.setBitrate(Transcode::Stream::Audio, 128000); // TODO
|
||||
parameters.setBitrate(Transcode::Stream::Video, 500000); // TODO
|
||||
|
||||
_mediaPlayer = new VideoMediaPlayerWidget(parameters, this);
|
||||
_mediaPlayer->close().connect(this, &VideoWidget::backToList);
|
||||
|
||||
Reference in New Issue
Block a user