Javacv: Where is the log information printed?

Created on 4 Dec 2020  ·  6Comments  ·  Source: bytedeco/javacv

info like this:
[mp3 @ 0x7f000c002740] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'path':
Metadata:
genre : Blues
Duration: 00:00:19.48, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, fltp, 128 kb/s
[mp3 @ 0x7f000c002600] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'path':
Metadata:
genre : Blues
Duration: 00:00:19.48, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, fltp, 128 kb/s
Output #0, wav, to '':
Metadata:
ISFT : Lavf58.29.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
Output #0, wav, to '':
Metadata:
ISFT : Lavf58.29.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
i want to print this info by log4j2 to a log file,how can it be done?

question

Most helpful comment

The answer's the same:

On the console. If you're not seeing anything, make sure FFmpegLogCallback.set() has been called.

It worked, thank you

All 6 comments

On the console. If you're not seeing anything, make sure FFmpegLogCallback.set() has been called.

On the console. If you're not seeing anything, make sure FFmpegLogCallback.set() has been called.

Is this information output through System.out? I want to change the output location through components such as log4j2

Yes, but we can set the "org.bytedeco.javacpp.logger" system property to
"slf4j'' to change that to SLF4J. We can also subclass FFmpegLogCallback.

Yes, but we can set the "org.bytedeco.javacpp.logger" system property to "slf4j'' to change that to SLF4J. We can also subclass FFmpegLogCallback.

Yes, but we can set the "org.bytedeco.javacpp.logger" system property to "slf4j'' to change that to SLF4J. We can also subclass FFmpegLogCallback.

I tried to set the system parameters and change the log level to debug. There will be the following log output where I expected, but the output address of _the log information in my question has not changed_.
log example:
2020-12-07 15:46:55.980 [ForkJoinPool.commonPool-worker-1] DEBUG - [Slf4jLogger.java:debug:48] - [] - Loading class org.bytedeco.ffmpeg.global.avutil
2020-12-07 15:46:55.982 [ForkJoinPool.commonPool-worker-1] DEBUG - [Slf4jLogger.java:debug:48] - [] - Loading class org.bytedeco.ffmpeg.global.avutil
2020-12-07 15:46:55.987 [ForkJoinPool.commonPool-worker-1] DEBUG - [Slf4jLogger.java:debug:48] - [] - Loading /home/xxx/.javacpp/cache/ffmpeg-4.2.1-1.5.2-linux-x86_64.jar/org/bytedeco/ffmpeg/linux-x86_64/libavutil.so.56
2020-12-07 15:46:55.990 [ForkJoinPool.commonPool-worker-1] DEBUG - [Slf4jLogger.java:debug:48] - [] - Loading /home/xxx/.javacpp/cache/ffmpeg-4.2.1-1.5.2-linux-x86_64.jar/org/bytedeco/ffmpeg/linux-x86_64/libjniavutil.so
2020-12-07 15:46:56.038 [ForkJoinPool.commonPool-worker-1] DEBUG - [Slf4jLogger.java:debug:48] - [] - Loading class org.bytedeco.ffmpeg.global.avutil

The answer's the same:

On the console. If you're not seeing anything, make sure FFmpegLogCallback.set() has been called.

The answer's the same:

On the console. If you're not seeing anything, make sure FFmpegLogCallback.set() has been called.

It worked, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenhl05 picture chenhl05  ·  4Comments

eldhosengeorge picture eldhosengeorge  ·  3Comments

y4nnick picture y4nnick  ·  3Comments

fif10 picture fif10  ·  3Comments

ahmedaomda picture ahmedaomda  ·  4Comments