This is likely the best place to ask this. How can I transcode only the video inside the .ts container (e.g. with ffmpeg), while preserving (copying) all other content? All metadata, multiple audio streams, and subtitles should be preserved, only the video transcoded to a lower bitrate (or preferably to HEVC). Here is an example of a recording I would like to change the video stream (without altering anything else):
Input #0, mpegts, from 'file:/media2/TVrecordedOld1/Elokuva_ Lego Batman elokuva/Elokuva_ Lego Batman elokuva.ts':
Duration: 01:48:21.09, start: 6151.005289, bitrate: 7520 kb/s
Program 3291
Metadata:
service_name : MTV3 HD
service_provider: MTV3
Stream #0:0[0xcdc]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn
Stream #0:10xcdd: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:20xce3: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:30xce1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:40xcdf: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:50xce0: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
No Program
Stream #0:6[0x12]: Data: epg