Multiplexare con MP4Box

arturo83

New member
Ciao a tutti, ho due files MP4 che differiscono soltanto per le tracce audio e per i sottotitoli.
Un file è in lingua italiana, mentre l'altro è in lingua inglese. La traccia video è la stessa, cambia soltanto la risoluzione.
Ho provato a multiplexare, utilizzando MP4Box, il video con risoluzione maggiore, insieme alle due tracce audio, e ai sottotitoli.
Per fare ciò, ho utilizzato il seguente comando:

Codice:
mp4box.exe -add "D:\InputFile1.mp4"#1:name="":fps=25.000 -add "D:\InputFile1.mp4"#2:lang=ita:name="" -add "D:\InputFile2.mp4"#2:lang=eng:name="" -add "D:\InputFile2.mp4"#4:lang=ita:name="Italian" -add "D:\InputFile2.mp4"#3:lang=eng:name="English (assistive)" -new "D:\OutputFile.mp4"

Tutto è andato a buon fine, ma c'è una cosa che non capisco.
Quando analizzo il file risultante con MediaInfo, nella sezione Video, ho due valori per la dimensione della traccia video: "Stream size" e "Source stream size".
Il valore "Source stream size" del file "OutputFile.mp4" è uguale al valore "Stream size" del file "InputFile1.mp4", che è 283 MiB, mentre il valore "Stream size" del file "OutputFile.mp4" è inferiore a tale valore ed è 268 MiB.
Ho estratto le tracce video dei files "InputFile1.mp4" e "OutputFile.mp4" e le ho confrontate tra loro utilizzando "Beyond Compare" (binary comparison). Il risultato è che le due tracce video sono identiche.
Allora perchè MediaInfo mi mostra due valori diversi tra loro, indicandomi che il valore "Stream size" è inferiore al valore "Source stream size"?
Devo supporre che MP4Box in qualche modo ricomprime, senza perdita di dati, la traccia video all'interno del contenitore MP4?
Questo è il report creato da MediaInfo per il file di output:
Codice:
General
Complete name                            : D:\OutputFile.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom)
File size                                : 325 MiB
Duration                                 : 23 min 6 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 969 kb/s
Encoded date                             : UTC 2022-11-16 14:45:47
Tagged date                              : UTC 2022-11-16 14:45:47

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 23 min 6 s
Source duration                          : 23 min 6 s
Bit rate mode                            : Variable
Bit rate                                 : 1 621 kb/s
Maximum bit rate                         : 20.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.031
Stream size                              : 268 MiB (82%)
Source stream size                       : 283 MiB (87%)
Writing library                          : x264 core 148 r2727 7d026e8
Encoding settings                        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x111 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=120 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=8 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=126 / scenecut=0 / intra_refresh=0 / rc_lookahead=250 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.50 / qpmin=6 / qpmax=51 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:0.80
Encoded date                             : UTC 2022-06-16 15:36:41
Tagged date                              : UTC 2022-11-16 14:46:00
mdhd_Duration                            : 1386160
Codec configuration box                  : avcC

Audio #1
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : ec-3
Duration                                 : 23 min 6 s
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Maximum bit rate                         : 135 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
Stream size                              : 21.2 MiB (6%)
Language                                 : Italian
Service kind                             : Complete Main
Encoded date                             : UTC 2022-06-16 15:36:41
Tagged date                              : UTC 2022-11-16 14:46:00

Audio #2
ID                                       : 3
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : ec-3
Duration                                 : 23 min 6 s
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Maximum bit rate                         : 135 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
Stream size                              : 21.2 MiB (6%)
Language                                 : English
Service kind                             : Complete Main
Encoded date                             : UTC 2022-06-16 16:06:18
Tagged date                              : UTC 2022-11-16 14:46:00

Text #1
ID                                       : 4
Format                                   : Timed Text
Muxing mode                              : sbtl
Codec ID                                 : tx3g
Duration                                 : 23 min 0 s
Bit rate mode                            : Variable
Bit rate                                 : 73 b/s
Frame rate                               : 0.363 FPS
Stream size                              : 12.3 KiB (0%)
Title                                    : Italian / Italian
Language                                 : Italian
Forced                                   : No
Encoded date                             : UTC 2022-06-16 16:06:18
Tagged date                              : UTC 2022-11-16 14:46:00

Text #2
ID                                       : 5
Format                                   : Timed Text
Muxing mode                              : sbtl
Codec ID                                 : tx3g
Duration                                 : 22 min 33 s
Bit rate mode                            : Variable
Bit rate                                 : 82 b/s
Frame rate                               : 0.500 FPS
Stream size                              : 13.6 KiB (0%)
Title                                    : English (assistive) / English (assistive)
Language                                 : English
Forced                                   : No
Encoded date                             : UTC 2022-06-16 16:06:18
Tagged date                              : UTC 2022-11-16 14:46:00
 
Ciao arturo83, MP4Box non ricomprime ma taglia per fotogrammi chiave, quindi potrebbe dipendere da questo la differenza tra "Stream size" e "Source stream size", ma la qualità dovrebbe rimanere la stessa.
 
Ultima modifica:
Top