I have hundreds of m2ts formatted video files resulting from legal recordings from TV. Now I would like to keep them, but they are huge.

Is there a format I can convert them to which is preferably loss-less? MKV container would be nice, but not necessary, as is readability by iPad.

Linux or Mac solutions are fine.


Edits and Additional Info:

Edit 1:

01:20:56 {master} ~/Documents/Projects/ASM_Optimization$ mediainfo /Volumes/Disque\ dur/Enregistrements/Arte\ -\ A\ la\ decouverte\ de\ la\ Patagonie\ -\ 19-12-2015\ 20h45\ 04h10\ \(1303\).m2ts
General
ID                                       : 47931 (0xBB3B)
Complete name                            : /Volumes/Disque dur/Enregistrements/Arte - A la decouverte de la Patagonie - 19-12-2015 20h45 04h10 (1303).m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 8.01 GiB
Duration                                 : 4h 9mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 4 587 Kbps

Video
ID                                       : 720 (0x2D0)
Menu ID                                  : 47931 (0xBB3B)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : 27
Duration                                 : 4h 9mn
Width                                    : 1 440 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
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

Audio #1
ID                                       : 730 (0x2DA)
Menu ID                                  : 47931 (0xBB3B)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 2
Format profile                           : HE-AAC / LC
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 4h 9mn
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Frame rate                               : 23.438 fps (1024 spf)
Compression mode                         : Lossy
Delay relative to video                  : -84ms
Language                                 : French

Audio #2
ID                                       : 731 (0x2DB)
Menu ID                                  : 47931 (0xBB3B)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 2
Format profile                           : HE-AAC / LC
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 4h 9mn
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Frame rate                               : 23.438 fps (1024 spf)
Compression mode                         : Lossy
Delay relative to video                  : -172ms
Language                                 : qaa

Audio #3
ID                                       : 732 (0x2DC)
Menu ID                                  : 47931 (0xBB3B)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 2
Format profile                           : HE-AAC / LC
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 4h 9mn
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Frame rate                               : 23.438 fps (1024 spf)
Compression mode                         : Lossy
Delay relative to video                  : -318ms
Language                                 : German

Audio #4
ID                                       : 733 (0x2DD)
Menu ID                                  : 47931 (0xBB3B)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 2
Format profile                           : HE-AAC / LC
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 4h 9mn
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Frame rate                               : 23.438 fps (1024 spf)
Compression mode                         : Lossy
Delay relative to video                  : -206ms
Language                                 : qad

Text #1
ID                                       : 70 (0x46)-888
Menu ID                                  : 47931 (0xBB3B)
Format                                   : Teletext Subtitle
Language                                 : French
Language, more info                      : For hearing impaired people

Text #2
ID                                       : 70 (0x46)-889
Menu ID                                  : 47931 (0xBB3B)
Format                                   : Teletext Subtitle
Language                                 : French
  • Lossless video at any reasonable resolution is big. You will have to trade something here. Let's say this is 576 lines (interlaced) at 3:4 aspect ratio (768 pixels wide by 576 pixels high) at 25 frames per second. That gives 576 * 768 * 25 = 11 Mpx/s that we need to store. At lossless, you might hope for 50% compression ratio at best, depending on image content, and assume 24 bpp. That's about 16 MB/s or 56 GB/hour before considering audio, and assuming that 50% compression ratio. – a CVn Jan 18 '16 at 12:13
  • OK - I see your point. I don't know that much about video formats - I added the mediainfo of one of the files - can I compress it lossless? even 50% would be fine with me. – Rainer Jan 18 '16 at 12:24
  • Not really. Your source is anamorphic Full HD AVC. Re-encoding with x264 CRF 23, you may get ~20-30% savings before quality visibly degrades. – Gyan Jan 18 '16 at 12:28
  • I never converted video as this whole container - codec issue is something I am not to comfortable with. So: how could I convert the video to x264 CRF 23? HandBrake I guess - but where can I foind the CRF23 option? – Rainer Jan 18 '16 at 12:31
  • Found it - the Constant Quality slider. – Rainer Jan 18 '16 at 12:36

From this site re iPad playback:

Video formats supported: H.264 video up to 1080p, 60 frames per second, High Profile level 5.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

There are no lossless codecs supported by iPad - if you wish to play these back the most viable option is H.264/MPEG-4.

Lossless formats are by definition going to be huge file sizes (A comment above from @MichaelKjörling above demonstrates this). You will need to decide how you'd prefer to take a hit in file size, such as in resolution, bit rate or compression format, and bear in mind if the compression is too high you will need a good machine to decompress it quick enough for smooth playback.

  • Handbreak would be one easy to use tool for converting MPEG-2 to H.264 MPEG-4 files. With minimal visual quality loss, the final files will be 50-100% smaller than original MPEG-2 files. – Raynet Jan 18 '16 at 12:23
  • @Jono This sounds like a good option. Is there a Built-in preset in Handbrake I could use? Or would be ffmpeg (which options) better? – Rainer Jan 18 '16 at 12:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.