1

I'd like to use the new codec x265 (libx265) to encode my video collection.

For this I created a lovely bash script under linux which works in general very well! But something is strange:

I prohibit the output of ffmpeg to echo on my own way. With x264 (the "old" one) everything works fine. But as soon as I use x265 I get always this kind of output on my terminal:

x265 [info]: HEVC encoder version 1.7
x265 [info]: build info [Linux][GCC 5.1.0][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x265 [info]: Main profile, Level-2.1 (Main tier)
x265 [info]: Thread pool created using 2 threads
x265 [info]: frame threads / pool features       : 1 / wpp(5 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut       : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb / refs: 1 / 1 / 0 / 3
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 64 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=0.30 signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao

This is the way I encode my video with ffmpeg:

ffmpeg -i /input/file -c:v libx265 -c:a copy -loglevel quiet /output/file.mp4 <>/dev/null 2>&1

I thought that the

<>/dev/null 2>&1

and the

-loglevel quiet

will do this but apparently I'm mistaken.

How can I solve this problem?

Thanks for your help!

5

It looks like ffmpeg doesn't tell the x265 encoder to use the loglevel you're telling ffmpeg to use. So if you want ffmpeg and the x265 encoder within ffmpeg to be quiet, you need to set log level options for both of them.

If you have an ffmpeg command that looks like this:

ffmpeg -loglevel error -stats -i "inputfile.xyz" -c:v libx265 -x265-params parameter1=value:parameter2=value outputfile.xyz

You can add the log-level=error option to the list of x265-params like this:

ffmpeg -loglevel error -stats -i "inputfile.xyz" -c:v libx265 -x265-params log-level=error:parameter1=value:parameter2=value ....
  • Thank you for your answer. That is the solution I searched for! Even if my answer comes a bit too late I guess ^^ – linux_lover Jun 17 '16 at 16:43
0

<>/dev/null will only connect standard input and output to /dev/null, and 2>&1 is applied after <>/dev/null, effectively doing nothing.

Changing it to >/dev/null 2>&1 will do what you want.

  • Thanks! That solves the problem. But you have a mistake in your answer: I wrote 2>&1 and not 1>&2 but anyway.. it works :) – linux_lover Sep 13 '15 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.