File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/AvTranscoder/properties Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -338,11 +338,11 @@ size_t VideoProperties::getBitRate() const
338
338
// return bit rate of stream if present or VBR mode
339
339
if (_codecContext->bit_rate || _codecContext->rc_max_rate )
340
340
return _codecContext->bit_rate ;
341
+ LOG_WARN (" The bitrate of the stream '" << _streamIndex << " ' of file '" << _formatContext->filename << " ' is unknown." )
341
342
342
343
if (_levelAnalysis == eAnalyseLevelHeader)
343
344
{
344
- LOG_WARN (" The bitrate of the stream '" << _streamIndex << " ' of file '" << _formatContext->filename << " ' is unknown. "
345
- " Need a deeper analysis: see eAnalyseLevelFirstGop." )
345
+ LOG_INFO (" Need a deeper analysis: see eAnalyseLevelFirstGop." )
346
346
return 0 ;
347
347
}
348
348
@@ -457,16 +457,14 @@ float VideoProperties::getDuration() const
457
457
const float duration = StreamProperties::getDuration ();
458
458
if (duration != 0 )
459
459
return duration;
460
+ LOG_WARN (" The duration of the stream '" << _streamIndex << " ' of file '" << _formatContext->filename << " ' is unknown." )
460
461
461
462
if (_fileProperties->isRawFormat ())
462
463
{
463
- LOG_INFO (" Get the stream bitrate to compute the duration ." )
464
+ LOG_INFO (" Estimate the duration from the file size and the bitrate ." )
464
465
const size_t bitRate = getBitRate ();
465
466
if (bitRate)
466
- {
467
- LOG_INFO (" Get the file size to compute the duration." )
468
467
return _fileProperties->getFileSize () / bitRate * 8 ;
469
- }
470
468
}
471
469
return 0 ;
472
470
}
You can’t perform that action at this time.
0 commit comments