hello everyone,
I have problems encoding certain file with ffmpeg (libx265).
Mediainfo of Input File:
This is my command line:General
Unique ID : 214632529464478837194436786441379772648 (0xA178B8B7BB495D9392F9CE3F620DF8E8)
Complete name : H:\videotest\Transformers_test.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 58.3 MiB
Duration : 31s 741ms
Overall bit rate mode : Variable
Overall bit rate : 15.4 Mbps
Encoded date : UTC 2015-05-19 09:55:27
Writing application : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
Writing library : libebml v1.3.1 + libmatroska v1.4.2
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.816000000
NUMBER_OF_FRAMES : 2889
NUMBER_OF_BYTES : 14456668
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 31s 740ms
Width : 1 280 pixels
Height : 680 pixels
Display aspect ratio : 1.882
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Title :
Language : English
Default : Yes
Forced : No
Audio #1
ID : 2
Format : TrueHD
Codec ID : A_TRUEHD
Duration : 31s 741ms
Bit rate mode : Variable
Maximum bit rate : 7 662 Kbps
Channel(s) : 8 channels
Channel positions : Front: L C R, Side: L R, Back: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossless
Title : TrueHD 7.1
Language : English
Default : No
Forced : No
Audio #2
ID : 3
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 31s 741ms
Bit rate mode : Variable
Bit rate : Unknown / 768 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossless / Lossy
Delay relative to video : 10ms
Title : DTS-HD MA 5.1
Default : No
Forced : No
Audio #3
ID : 4
Format : DTS
Format/Info : Digital Theater Systems
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 31s 741ms
Bit rate mode : Constant
Bit rate : 1 510 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 10ms
Stream size : 5.71 MiB (10%)
Title : DTS 5.1
Default : No
Forced : No
Audio #4
ID : 5
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 31s 741ms
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 31ms
Stream size : 2.42 MiB (4%)
Title : AC3 5.1
Language : Italian
Default : Yes
Forced : No
Text #1
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : FORCED
Language : Italian
Default : No
Forced : No
Text #2
ID : 7
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : Italian
Default : No
Forced : No
Text #3
ID : 8
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English
Default : No
Forced : No
Text #4
ID : 9
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English
Default : No
Forced : No
x265 return this error: "Picture height must be an integer or multiple of the specified chroma subsampling".Code:"H:\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i "H:\videotest\Transformers_test.mkv" -map 0:v:0 -vf scale=1024:545 -sws_flags lanczos -c:v libx265 -crf 20.0 -preset 5 -x265-params level=0:profile=undefined:pmode:no-pme:pme:no-high-tier:ref=3:bframes=4:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=20:no-scenecut:b-pyramid:me=hex:subme=2: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.6:qstep=4:aq-mode=1:aq-strength=1.0:cutree:no-early-skip:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.3:psy-rdoq=1:b-intra:no-fast-intra:rdoq-level=1:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=1:tu-inter-depth=1:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16 "H:\videotest\outpda1.mkv"
so I thought that declaring the Mod instead of the height could solve the problem:
now x265 give another error: "Picture size must be at least one CTU".Code:"H:\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i "H:\videotest\Transformers_test.mkv" -map 0:v:0 -vf scale=1024:2 -sws_flags lanczos -c:v libx265 -crf 20.0 -preset 5 -x265-params level=0:profile=undefined:pmode:no-pme:pme:no-high-tier:ref=3:bframes=4:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=20:no-scenecut:b-pyramid:me=hex:subme=2: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.6:qstep=4:aq-mode=1:aq-strength=1.0:cutree:no-early-skip:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.3:psy-rdoq=1:b-intra:no-fast-intra:rdoq-level=1:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=1:tu-inter-depth=1:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16 "H:\videotest\output3.mkv"
but 1024x~545 is greater than 64^2 ...
There is a bad command or what?
Thanks to all!
EDIT:
another ffmpeg error I cannot solve.
I have same input and i have just trying to convert multiple audio track with multiple codec:
but the ouput is always with any combination of audio codec or encoding mode with all selected audio tracks converted with last declared configuration. For example in this case all 4 tracks are encoded as AC3 384 Kbps.Code:"H:\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i "H:\videotest\Transformers_test.mkv" -map 0:v:0 -c:v libx265 -crf 20.0 -preset 0 -x265-params level=0:tune=fast-decode:profile=main:pmode:no-pme:pme:no-high-tier:ref=3:bframes=4:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=20:no-scenecut:b-pyramid:me=hex:subme=2: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.6:qstep=4:aq-mode=1:aq-strength=1.0:cutree:no-early-skip:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.3:psy-rdoq=1:b-intra:no-fast-intra:rdoq-level=1:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=1:tu-inter-depth=1:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16 -map 0:a:0 -c:a flac -compression_level 12 -lpc_type 3 -lpc_passes 2 -map 0:a:1 -c:a libvorbis -b:a 192k -map 0:a:2 -c:a libmp3lame -compression_level 0 -q:a 4 -map 0:a:3 -c:a ac3 -b:a 384k -map 0:s:0 -c:s copy -map 0:s:1 -c:s copy -map 0:s:2 -c:s copy -map 0:s:3 -c:s copy "H:\videotest\outputtest.mkv"
This is the report of the converted file:
again I really appreciate a solution. Thanks in advance.General
Unique ID : 273889716783695802576847921308564261411 (0xCE0D3D9E9A78C2436E7BAA6ACBB50A23)
Complete name : H:\videotest\outputtest.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 18.6 MiB
Duration : 31s 746ms
Overall bit rate : 4 923 Kbps
Writing application : Lavf56.33.101
Writing library : Lavf56.33.101
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L3.1
Codec ID : V_MPEGH/ISO/HEVC
Bit rate : 3 289 Kbps
Width : 1 280 pixels
Height : 680 pixels
Display aspect ratio : 1.882
Frame rate mode : Variable
Original frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Title : Transformers 4 - L'era dell'estinzione
Writing library : x265 1.7:[Windows][GCC 4.9.2][64 bit]
Encoding settings : wpp / ctu=32 / min-cu-size=16 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=0 / subme=2 / merange=57 / no-rect / no-amp / max-merge=2 / temporal-mvp / early-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=250 / min-keyint=25 / scenecut=0 / rc-lookahead=20 / lookahead-slices=0 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=1 / no-weightp / no-weightb / aq-mode=1 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=3 / psy-rd=0.30 / rdoq-level=0 / psy-rdoq=0.00 / no-signhide / deblock / no-sao / no-sao-non-deblock / b-pyramid / no-cutree / rc=crf / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30
Language : English
Default : Yes
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.823000000
NUMBER_OF_FRAMES : 739
NUMBER_OF_BYTES : 22011965
Audio #1
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 31s 746ms
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 1.45 MiB (8%)
Title : TrueHD 7.1
Writing library : Lavc56.39.101 ac3
Language : English
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.822000000
NUMBER_OF_FRAMES : 36988
NUMBER_OF_BYTES : 16088232
Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 31s 746ms
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 10ms
Stream size : 1.45 MiB (8%)
Title : DTS-HD MA 5.1
Writing library : Lavc56.39.101 ac3
Default : No
Forced : No
DURATION : 00:00:30.816000000
NUMBER_OF_FRAMES : 2889
NUMBER_OF_BYTES : 14456668
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Audio #3
ID : 4
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 31s 746ms
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 10ms
Stream size : 1.45 MiB (8%)
Title : DTS 5.1
Writing library : Lavc56.39.101 ac3
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.816000000
NUMBER_OF_FRAMES : 2889
NUMBER_OF_BYTES : 5815557
Audio #4
ID : 5
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 31s 746ms
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 31ms
Stream size : 1.45 MiB (8%)
Title : AC3 5.1
Writing library : Lavc56.39.101 ac3
Language : Italian
Default : Yes
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.816000000
NUMBER_OF_FRAMES : 963
NUMBER_OF_BYTES : 2465280
Text #1
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Title : FORCED
Language : Italian
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:00.000000000
NUMBER_OF_FRAMES : 0
NUMBER_OF_BYTES : 0
Text #2
ID : 7
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : Italian
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:31.573000000
NUMBER_OF_FRAMES : 10
NUMBER_OF_BYTES : 335
Text #3
ID : 8
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:31.573000000
NUMBER_OF_FRAMES : 11
NUMBER_OF_BYTES : 359
Text #4
ID : 9
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English
Default : No
Forced : No
_STATISTICS_WRITING_APP : mkvmerge v7.8.0 ('River Man') 64bit built on Mar 27 2015 16:31:37
_STATISTICS_WRITING_DATE_UTC : 2015-05-19 09:55:27
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:31.573000000
NUMBER_OF_FRAMES : 12
NUMBER_OF_BYTES : 419
+ Reply to Thread
Results 1 to 5 of 5
-
Last edited by z-machine95; 23rd May 2015 at 07:14.
-
You cannot use odd numbers as scaling target and 545 is odd - try 546 (preferrably divisable with 4 = 548). You should declare the scaler as -vf "scale=1024:546:flags=lanczos" instead of using -sws_flags switch.
P.S: Why would you scale to a size of 1024 x 2 pixels as you do in your second command line? Makes no sense..I'm the developer behind FFQueue. My posts might reflect this! ;-) -
-
"Mod" is short for modulus meaning it should be dividable with 2. You are using -c:a multiple times, only the last is used. You must declare a stream identifier for the codec (-c:a:0 -c:a:1 -c:a:2 and so on) in order to use different codecs. You must also declare stream id to quality and/or bit rate (-q:a:ID / -b:a:ID) if they should give the wanted result.
I'm the developer behind FFQueue. My posts might reflect this! ;-) -
Similar Threads
-
CROP (NOT Resize!) 16x9 To 4X3
By DeathStalker77 in forum EditingReplies: 15Last Post: 16th Feb 2015, 06:57 -
crop and resize for MKV encode?
By spiritgumm in forum Video ConversionReplies: 3Last Post: 20th Jan 2014, 16:16 -
crop and resize question?
By beav in forum Newbie / General discussionsReplies: 7Last Post: 8th Jul 2013, 05:40 -
FitCD 4:3 and 16:9 crop/resize
By sambat in forum Authoring (DVD)Replies: 2Last Post: 24th Dec 2012, 14:35 -
Crop and resize bluray
By AMDgutten in forum Video ConversionReplies: 7Last Post: 22nd Aug 2012, 21:21