File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ Transcoder::Transcoder( OutputFile& outputFile )
22
22
, _mainStreamIndex( 0 )
23
23
, _verbose( false )
24
24
{
25
+ // Initialize the OutputFile
25
26
_outputFile.setup ();
27
+
28
+ // Print no output from ffmpeg
29
+ av_log_set_level ( AV_LOG_QUIET );
26
30
}
27
31
28
32
Transcoder::~Transcoder ()
@@ -285,9 +289,6 @@ void Transcoder::process( IProgress& progress )
285
289
286
290
_outputFile.beginWrap ();
287
291
288
- if ( _verbose )
289
- av_log_set_level ( AV_LOG_DEBUG );
290
-
291
292
double totalDuration = getTotalDurationFromProcessMethod ();
292
293
293
294
size_t frame = 0 ;
@@ -325,6 +326,10 @@ void Transcoder::setVerbose( bool verbose )
325
326
(*it)->setVerbose ( _verbose );
326
327
}
327
328
_outputFile.setVerbose ( _verbose );
329
+
330
+ // Print stuff which is only useful for ffmpeg developers.
331
+ if ( _verbose )
332
+ av_log_set_level ( AV_LOG_DEBUG );
328
333
}
329
334
330
335
void Transcoder::addRewrapStream ( const std::string& filename, const size_t streamIndex )
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ enum EProcessMethod
43
43
class AvExport Transcoder
44
44
{
45
45
public:
46
+ /* *
47
+ * @note Set FFmpeg log level to quite.
48
+ */
46
49
Transcoder ( OutputFile& outputFile );
47
50
48
51
~Transcoder ();
@@ -131,8 +134,9 @@ class AvExport Transcoder
131
134
void setProcessMethod ( const EProcessMethod eProcessMethod, const size_t indexBasedStream = 0 );
132
135
133
136
/* *
134
- * @brief Set verbose mode for the Transcoder and its streams .
137
+ * @brief Set verbose mode for the Transcoder, its streams, and its output file .
135
138
* @note If you call it before adding the streams, no verbose mode will be set for the new streams.
139
+ * @note set av log level to AV_LOG_DEBUG
136
140
*/
137
141
void setVerbose ( bool verbose = true );
138
142
You can’t perform that action at this time.
0 commit comments