hello guys,
I have a serious problem with ffmpeg (zeranoe build latest version).
Basically even if I use a command line like that one:
only the preset option are applied to the encoder, while all other -x265-params are ignored and ffmpeg warn me saying that:Code:ffmpeg.exe -hwaccel auto -y -i testinput.mkv -map 0:v:0 -c:v libx265 -crf 20.0 -preset veryslow -x265-params level=0:profile=undefined:pmode:no-pme:no-high-tier:ref=6:bframes=6:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=40:no-scenecut:b-pyramid:me=umh:subme=4:merange=57:temporal-mvp:weightp:no-weightb:max-merge=2:no-weightb:no-rect:no-amp:vbv-bufsize=0:vbv-maxrate=0:vbv-init=0.9:no-strict-cbr:qcomp=0.8:qstep=4:aq-mode=1:aq-strength=2:cutree:no-early-skip:min-cu-size=8:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.5:psy-rdoq=1:no-b-intra:no-fast-intra:rdoq-level=2:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=3:tu-inter-depth=3:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16 outputwaddawawd.mkv
This happens even if I do not declare preset options (in this case the encoder is set with the default options of the "medium" profile).Code:[libx265 @ 0000000005c324c0] Unknown option: profile. [libx265 @ 0000000005c324c0] Unknown option: pmode:no-pme:no-high-tier:ref. [libx265 @ 0000000005c324c0] Unknown option: open-gop:keyint. [libx265 @ 0000000005c324c0] Unknown option: no-scenecut:b-pyramid:me. [libx265 @ 0000000005c324c0] Unknown option: temporal-mvp:weightp:no-weightb:max-merge. [libx265 @ 0000000005c324c0] Unknown option: no-weightb:no-rect:no-amp:vbv-bufsize. [libx265 @ 0000000005c324c0] Unknown option: no-strict-cbr:qcomp. [libx265 @ 0000000005c324c0] Unknown option: qstep. [libx265 @ 0000000005c324c0] Unknown option: cutree:no-early-skip:min-cu-size. [libx265 @ 0000000005c324c0] Unknown option: no-fast-cfb:ipratio. [libx265 @ 0000000005c324c0] Unknown option: no-b-intra:no-fast-intra:rdoq-level. [libx265 @ 0000000005c324c0] Unknown option: no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth. [libx265 @ 0000000005c324c0] Unknown option: strong-intra-smoothing:no-constrained-intra:nr-intra. [libx265 @ 0000000005c324c0] Unknown option: signhide:sar.
As I know even if I declare a preset and other parameters the preset options are overwrited with the new params I declare. So I cannot understand what's the problem.. maybe a syntax problem or what? by the way the encode works fine.
Thanks in advance!
+ Reply to Thread
Results 1 to 16 of 16
-
-
You have to format it so every entry has "key=value" . In ffmpeg, if something is disabled it's usually "0" , enabled is usually "1"
eg. if you wanted to enable pmode, it would be "pmode=1" , not just "pmode"
You don't have to include options that are default, for example "open-gop" should be "open-gop=1", but it's already default, so you can omit it entirely
Some of the other ones don't make sense, like "profile=undefined" . It should be "profile=main" , there is no undefined
Those are your options on some x265 binaries, notice there is no "undefined"
Code:main, main10, mainstillpicture, main422-8, main422-10, main444-8, main444-10
-
Ok Thank you! I Will try IT out
And Sorry for double post! I haven't double posted.. Maybe was my lagga connection... -
This definitely solve my problems! Thank you so much. I get one last error for profile options:
Code:[libx265 @ 0000000005c324c0] Unknown option: profile.
Code:ffmpeg.exe -hwaccel auto -y -i "H:\test\testinput.mkv" -map 0:v:0 -c:v libx265 -crf 20.0 -preset veryslow -x265-params profile=main:level=0:pmode=1:pme=0:high-tier=0:ref=5:bframes=8:open-gop=1:keyint=250:min-keyint=23:b-adapt=2:bframe-bias=0:rc-lookahead=40:scenecut=0:b-pyramid=1:me=umh:subme=4:merange=57:temporal-mvp=1:weightp=1:weightb=1:max-merge=3:weightb=1:rect=0:amp=0:vbv-bufsize=0:vbv-maxrate=0:vbv-init=0.9:strict-cbr=0:qcomp=0.6:qpstep=4:aq-mode=1:aq-strength=2:cutree=0:early-skip=0:min-cu-size=8:ctu=64:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=4:psy-rd=0.3:psy-rdoq=1:b-intra=1:fast-intra=1:rdoq-level=1:tskip=0:tskip-fast=0:cu-lossless=1:tu-intra-depth=3:tu-inter-depth=3:strong-intra-smoothing=1:constrained-intra=0:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide=1:sar=16 outputffmpeglibx265.mkv
here is the documentation: https://x265.readthedocs.org/en/default/cli.html#cmdoption--profileLast edited by z-machine95; 29th Jun 2015 at 04:54.
-
You can omit the "profile" option. In x265, the profile is per default "Main" for 8 bit output depth and "Main10" for 10 bit output depth, I believe...
-
but if I should apply other non standard profiles how should I define it?
-
in fact I use zeranoe builds. But I have found that internal libx265 is a lot slower that the static x265 build.. For me should be expected more performance throughout ffmpeg internal pipe.. i cannot uderstand maybe zeraoe builds are much worse than I thought.
here are some basic test:
results
libx265 -> 2.2 fps
ffmpeg x265 -> 7.1 fps
vspipe libx265 -> 2.4 fps
vspipe x265 -> 6.81 fps
ffmpeg
x265 [info]: HEVC encoder version 1.7
x265 [info]: build info [Windows][GCC 4.9.2][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: frame threads / pool features : 3 / wpp(17 rows)+pmode
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
x265 [info]: ME / range / subpel / merge : umh / 57 / 4 / 3
x265 [info]: Keyframe min / max / scenecut : 23 / 250 / 0
x265 [info]: Lookahead / bframes / badapt : 40 / 8 / 2
x265 [info]: b-pyramid / weightp / weightb / refs: 1 / 1 / 1 / 5
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 2.0 / 64 / 0
x265 [info]: Rate Control / qCompress : CRF-20.0 / 0.60
x265 [info]: tools: rd=4 psy-rd=0.30 rdoq=1 psy-rdoq=1.00 cu-lossless signhide
x265 [info]: tools: tmvp b-intra fast-intra strong-intra-smoothing deblock sao
static x265 build
x265 [info]: HEVC encoder version 1.7+207-83a7d8244424
x265 [info]: build info [Windows][ICC 1400][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: frame threads / pool features : 3 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
x265 [info]: ME / range / subpel / merge : umh / 57 / 4 / 3
x265 [info]: Keyframe min / max / scenecut : 23 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 40 / 8 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 1
x265 [info]: References / ref-limit cu / depth : 5 / 0 / 0
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 2.0 / 64 / 0
x265 [info]: Rate Control / qCompress : CRF-20.0 / 0.60
x265 [info]: tools: rd=4 psy-rd=1.00 early-skip signhide tmvp b-intra
x265 [info]: tools: fast-intra strong-intra-smoothing deblock(tC=-1:B=-1) sao
ACTUALLY..
if I have to disable lets say rdoq-level how should use :no-rdoq-level=1 to activate the command to deactivate rdoq level or i have to use :rdoq-level=0 ? the rdoq level range il between 0 and 2 so :rdoq-level=0 mean "deactivate rdoq-level or set rdoq level to 0? it's the same thing? -
Enjoy reading the docs.
At level 0 rate-distortion cost is not considered in quant
It {--psy-rdoq} only has effect when --rdoq-level is 1 or 2. -
I am trying to use ffmpeg libx265 to encode interlace video, i.e., 1080i50.
I firstly use virtualdub to break the frame based video into interlaced one.
However, when I put the command as below, it shows me
Unknown options: interlaceMode
ffmpeg -i input.avs -vf "scale=out_color_matrix=bt709" -an -tune zerolatency -c:v libx265 -pix_fmt yuv420p -preset slow -x265-params keyint=33:min-keyint=33:interlaceMode=1:rc-lookahead=20:bframes=2:b-adapt=2:no-open-gop=1:bitrate=6000 -f mpegts -muxrate 9000K -y output.ts
Can help to advise why? from x265 official spec, I saw:
inerlaceMode is indeed supported by x265.
--interlaceMode <false|tff|bff>, --no-interlaceMode
0 progressive pictures (default)
1 top field first
2 bottom field first
HEVC encodes interlaced content as fields. Fields must be provided to the encoder in the correct temporal order. The source dimensions must be field dimensions and the FPS must be in units of fields per second. The decoder must re-combine the fields in their correct orientation for display. -
This parameter looks already wrong due to the uppercase "M". No parameter ever had an uppercase character. There must be a bug in http://x265.readthedocs.org/en/default/cli.html#cmdoption--interlaceMode instead.
The command line help of x265 reports:
Code:--[no-]interlace <bff|tff> Indicate input pictures are interlace fields in temporal order. Default progressive
-
@LigH.de
Yes, option: interlace indeed works! Thanks.
While, another question comes: in the avs script, I used "SeparateFields()" at the end, it turn out to be 1920x1080p video change to 1920x540 video, and the first field and 2nd field become separate frame in the output view.
When I use this avs as input for ffmpeg, it shows me the encoding is based on 1920x540, although the interlaced flag is triggered in the output encoded stream.
Any idea? is it any additional command I should put into avs script, e.g., Weave() at the end of the script?
Thanks -
A patch just arrived to fix the documentation; --[no-]interlace is the correct parameter.
Do not separate fields in the AviSynth script. As you wrote yourself: "the first field and 2nd field become separate frame in the output view". Encoders will see frames. To encode in interlaced mode, only use the "interlace" parameter; the encoder will separate the combed frames on its own.
Weave() is the exact opposite of SeparateFields(); except for a really important reason where you would use both enclosing (e.g. using spatial filters on fields separately), in general don't use either. We may have to know your whole AviSynth script to give a better advice. -
@LigH.de
Thanks for the prompt feedback.
I think the message from x265 interlaceMode is bit misleading: (especially "source dimensions must be field dimensions", i.e., have to be 1920x540, right? and fps should be 50fps)
HEVC encodes interlaced content as fields. Fields must be provided to the encoder in the correct temporal order. The source dimensions must be field dimensions and the FPS must be in units of fields per second. The decoder must re-combine the fields in their correct orientation for display.
I assume I need to separate the frame into two fields and give ffmpeg libx265 as input.
Anyway, my avs script is rather simple:
Stream = AviSource("raw_1080p25.avi")
AssumeFPS(Stream,25)
SeparateFields()
So I believe I should remove SeparateField() and just leave 1080p25 raw video as input for 1080i50 HEVC encoding. Am I right?
Thanks. -
Providing libx265 with fields is the job of ffmpeg via the API, not the job of the user. You will give ffmpeg the frames in frame dimensions and frame fps; ffmpeg will give libx265 its fields in field dimensions and field fps when interlaced mode is enabled.
__
Just another side note:
Only enable interlaced mode if you are certain that it is required (i.e. you can prove in a Bob() result that the temporal progress is fieldwise). A header analysis of e.g. a Blu-ray source is not sufficient, Blu-rays require interlaced AVC in 1080 resolution by specs, no matter whether or not the video content is interlaced.
The x264 encoder has a "fake interlacing" mode to enable MBAFF interlacing, but always prefer progressive mode decisions, just to satisfy the Blu-ray specifications, yet encode efficiently progressive content. I don't know if the Blu-ray successor with HEVC material will have such a nonsensical demand as well; I rather doubt because HEVC officially deprecates all interlacing.Last edited by LigH.de; 19th Aug 2015 at 04:44.
Similar Threads
-
ffmpeg do not apply parameters with libx265
By z-machine95 in forum Video ConversionReplies: 1Last Post: 28th Jun 2015, 16:57 -
2pass encoding (ffmpeg libx265)
By z-machine95 in forum Video ConversionReplies: 18Last Post: 3rd May 2015, 01:43 -
How to get ffmpeg/x264 to use same parameters as input?
By Gyan in forum Video ConversionReplies: 14Last Post: 11th Nov 2014, 05:30 -
How to set ffmpeg showinfo parameters?
By Selur in forum Newbie / General discussionsReplies: 6Last Post: 12th Aug 2014, 00:11 -
ffmpeg - optimal parameters
By francpal in forum Video ConversionReplies: 14Last Post: 4th Mar 2014, 11:47