Skip to content

Commit d3aa6e2

Browse files
update setProfile on output video stream
1 parent 02d8548 commit d3aa6e2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/AvTranscoder/OutputStreamVideo.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ void OutputStreamVideo::setProfile( const std::string& profile )
182182

183183
m_videoDesc.setVideoCodec( prof["codec"] );
184184
m_videoDesc.setTimeBase( 1, 25 ); // 25 fps
185-
// m_videoDesc.set( "pix_fmt", prof["pix_fmt"] );
185+
m_videoDesc.setImageParameters( 1920, 1080, av_get_pix_fmt( prof["pix_fmt"].c_str() ) );
186+
187+
m_videoDesc.set( "b", prof["b"] );
186188

187189
setup();
188190

@@ -194,8 +196,12 @@ void OutputStreamVideo::setProfile( const std::string& profile )
194196
continue;
195197
if( (*it).first == "codec" )
196198
continue;
197-
// if( (*it).first == "pix_fmt" )
198-
// continue;
199+
if( (*it).first == "pix_fmt" )
200+
continue;
201+
if( (*it).first == "width" )
202+
continue;
203+
if( (*it).first == "height" )
204+
continue;
199205

200206
m_videoDesc.set( (*it).first, (*it).second );
201207
}

0 commit comments

Comments
 (0)