This has been bugging me a couple of years.
my setup is UK Freesat
example
i record a program, then run a python script /ffmpeg that as well as renaming the file it strips out of the .ts subtitles, NAR etc just to leave the video and main audio. it does this in a couple of minutes via ffmpeg stream copy on a small raspberry pi
typically the reduced file size will be upto 50% smaller!!!!
ie 6GB->3GB sometimes and i cant see any noticeable reduction in video quality
when i use tools like mmpeg -i and mediainfo i can see that the extra NAR sound and subtitles and teletext dont equate to GB's of data just a couple of hundred MB.
so where did that extra data go?, the best i can guess when looking at the output of ffmpeg -i is that there are a bunch of streams that come up as unkown that are being stripped
heres some logs
Code: Select all
mediainfo 7941_20210710183500.ts
General
ID : 2050 (0x802)
Complete name : 7941_20210710183500.ts
Format : MPEG-TS
File size : 5.75 GiB
Duration : 1 h 54 min
Overall bit rate mode : Variable
Overall bit rate : 7 162 kb/s
Video
ID : 5400 (0x1518)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=8, N=24
Codec ID : 27
Duration : 1 h 54 min
Bit rate : 6 162 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Scan type, store method : Interleaved fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.119
Stream size : 4.95 GiB (86%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio #1
ID : 5401 (0x1519)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 1 h 54 min
Bit rate mode : Constant
Bit rate : 384 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)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -1 s 56 ms
Stream size : 316 MiB (5%)
Language : English
Service kind : Complete Main
Audio #2
ID : 5402 (0x151A)
Menu ID : 1 (0x1)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : 3
Duration : 1 h 54 min
Bit rate mode : Constant
Bit rate : 256 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 41.667 FPS (1152 SPF)
Compression mode : Lossy
Delay relative to video : -960 ms
Stream size : 211 MiB (4%)
Language : nar
Text
ID : 5404 (0x151C)
Menu ID : 1 (0x1)
Format : DVB Subtitle
Codec ID : 6
Duration : 1 h 54 min
Delay relative to video : 4 s 528 ms
Language : English
Other
ID : 5403 (0x151B)-888
Menu ID : 1 (0x1)
Format : Teletext
Language : English
Menu
ID : 260 (0x104)
Menu ID : 1 (0x1)
Duration : 1 h 54 min
List : 5400 (0x1518) (AVC) / 5402 (0x151A) (MPEG Audio, nar) / 5404 (0x151C) (DVB Subtitle, English) / 5403 (0x151B)-888 (Teletext, en) / 5401 (0x1519) (AC-3, English) / 2322 (0x912) () / 2321 (0x911) () / 2329 (0x919) () / 3851 (0xF0B) () / 3844 (0xF04) () / 3843 (0xF03) () / 3842 (0xF02) () / 3841 (0xF01) () / 3840 (0xF00) () / 3849 (0xF09) () / 3847 (0xF07) () / 3846 (0xF06) ()
Language : / nar / English / English / English
Code: Select all
mediainfo Darkest_Hour_\(2018\).ts
General
ID : 1 (0x1)
Complete name : Darkest_Hour_(2018).ts
Format : MPEG-TS
File size : 3.00 GiB
Duration : 1 h 54 min
Overall bit rate mode : Variable
Overall bit rate : 3 732 kb/s
Video
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=8, N=24
Codec ID : 27
Duration : 1 h 54 min
Bit rate : 3 159 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Scan type, store method : Interleaved fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.061
Stream size : 2.54 GiB (85%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 1 h 54 min
Bit rate mode : Constant
Bit rate : 384 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)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -1 s 577 ms
Stream size : 316 MiB (10%)
Language : English
Service kind : Complete Main
Menu
ID : 4096 (0x1000)
Menu ID : 1 (0x1)
Duration : 1 h 54 min
List : 256 (0x100) (AVC) / 257 (0x101) (AC-3, English)
Language : / English
Service name : Service01
Service provider : FFmpeg
Service type : digital television
Code: Select all
Input #0, mpegts, from '7941_20210710183500.ts':
Duration: 01:54:59.90, start: 72802.961278, bitrate: 7160 kb/s
Program 1
Stream #0:0[0x1518]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x151a](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x151c](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3[0x151b](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:4[0x1519](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:5[0x912]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:6[0x911]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7[0x919]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:8[0xf0b]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:9[0xf04]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:10[0xf03]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:11[0xf02]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:12[0xf01]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:13[0xf00]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:14[0xf09]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:15[0xf07]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:16[0xf06]: Unknown: none ([11][0][0][0] / 0x000B)
Code: Select all
Input #0, mpegts, from 'Darkest_Hour_(2018).ts':
Duration: 01:54:59.90, start: 1.400000, bitrate: 3730 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
Code: Select all
-rw-r--r-- 1 nobody nogroup 5.8G Jul 10 21:30 7941_20210710183500.ts
-rw-r--r-- 1 moz moz 3.0G Jul 24 13:18 'Darkest_Hour_(2018).ts'