J'ai 90 vidéos d'un série TV que je souhaite ré-encoder. Elles ont toutes ces flux :
- vidéo : 1080p 24 fps HEVC > je veux le # copié
- audio : french 192k 48kHz 2ch AC-3 > je veux le # supprimé
- audio : english 640k 48kHz 6ch E-AC-3 > je veux le # ré-encodé en 224k 48kHz 2ch aac
General
Unique ID : 237946857114532456187968826094242999146 (0xB302E5D190DAB55589650EC91387AB6A)
Complete name :
Format : Matroska
Format version : Version 4
File size : 359 MiB
Duration : 21 min 32 s
Overall bit rate : 2 333 kb/s
Encoded date : UTC 2021-11-04 17:37:32
Writing application : mkvmerge v8.3.0 ('Over the Horizon') 64bit
Writing library : libebml v1.3.1 + libmatroska v1.4.2
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 21 min 32 s
Bit rate : 1 498 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.030
Stream size : 231 MiB (64%)
Writing library : x265 3.2.1+1-b5c86a64bbbe:[Linux][GCC 9.3.0][64 bit] 8bit+10bit+12bit
Encoding settings : cpuid=1049583 / frame-threads=3 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=6 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=1500 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio #1
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 21 min 32 s
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Delay relative to video : -21 ms
Stream size : 29.6 MiB (8%)
Language : French
Service kind : Complete Main
Default : Yes
Forced : No
Audio #2
ID : 3
Format : E-AC-3
Format/Info : Enhanced AC-3
Commercial name : Dolby Digital Plus
Codec ID : A_EAC3
Duration : 21 min 32 s
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Delay relative to video : -21 ms
Stream size : 98.6 MiB (27%)
Language : English
Service kind : Complete Main
Default : No
Forced : No
Text #1
ID : 4
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 3 min 49 s
Bit rate : 2 b/s
Count of elements : 4
Stream size : 83.0 Bytes (0%)
Title : Forced
Language : French
Default : Yes
Forced : Yes
Text #2
ID : 5
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 20 min 59 s
Bit rate : 104 b/s
Count of elements : 316
Stream size : 16.0 KiB (0%)
Language : French
Default : No
Forced : No
Text #3
ID : 6
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 20 min 58 s
Bit rate : 101 b/s
Count of elements : 339
Stream size : 15.6 KiB (0%)
Language : English
Default : No
Forced : No
ffmpeg -i $f -map 0:0 -map 0:a:1 -c:v copy -ac 2 -c:a:1 libfdk_aac -b:a 224k output.mkv
qui donne un mkv avec un flux audio 224k 2ch ogg.ffmpeg -i $f -map 0:0 -map 0:a:1 -c:v copy -ac 2 -c:a libfdk_aac -b:a 224k output.mkv
qui donne un mkv avec un flux audio 640k 2ch aac.ffmpeg -i $f -map 0:0 -map 0:a -c:v copy -ac 2 -c:a:2 libfdk_aac -b:a 224k output.mkv
qui donne un mkv avec 2 flux audio 224k 2ch ogg.Impossible d'obtenir en sortie le flux anglais en 224k 48kHz 2ch aac. Soit ça sort en ogg, soit j'ai pas le bon débit. Je ne comprends pas comment faire, mais je pense que je dois merder sur l'option map.
Note : j'ai essayé avec le codec aac natif et j'ai eu les mêmes sorties.
Est-ce que quelqu'un serait quoi faire ?