Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: tomer-k on August 12, 2021, 06:47:03 AM

Title: Best compression from TS to MP4
Post by: tomer-k on August 12, 2021, 06:47:03 AM
Hi,
I would like to know which preferences I should choose to have the MP4 small as possible without decreasing the quality of the video.
Title: Re: Best compression from TS to MP4
Post by: eumagga0x2a on August 12, 2021, 12:00:54 PM
TS as MP4 are containers which can contain different types of video streams. Please specify what you have got to get a meaningful piece of advice. Any lossy compression decreases the quality of the video. Lossless compression algorithms require huge bitrates.
Title: Re: Best compression from TS to MP4
Post by: tomer-k on August 12, 2021, 02:46:53 PM
Sorry, but I am not sure that I understand what you mean.
Title: Re: Best compression from TS to MP4
Post by: eumagga0x2a on August 12, 2021, 10:17:41 PM
TS in MPEG-TS means "transport stream". It is a way to store and send video, audio and other data which can be of various formats and codecs (this is what is called "container"). Therefore "TS" provides near to zero information about the actual properties of video and audio streams within the file.

The same applies to MP4 as MP4 is also only a way to store video and audio (and other types of streams, but Avidemux supports only video and audio).

The most general and 100% lossless approach would be to use copy mode for video and audio in Avidemux. The resulting MP4 will be also almost for sure somewhat smaller than the source TS file as MPEG-TS often contains filler data with the goal to reduce bitrate fluctuations. Such data is dropped by Avidemux as it makes no sense in a MP4 or MKV.

If you need to further reduce the size of the output, you will need to re-encode the video using a bitrate lower than the source bitrate. Re-encoding will always worsen the quality unless you use a lossless codec or a lossless encoder configuration. Both result in relatively huge files.

You can use the tool "MediaInfo" to provide information about the properties of streams in the TS file in question.
Title: Re: Best compression from TS to MP4
Post by: tomer-k on August 13, 2021, 02:00:14 PM
Thank you very much, you have been very informative.  :)