News:

--

Main Menu

Writing application Lavf58.76.100 or DXVA2

Started by jacobs, September 23, 2024, 08:00:03 AM

Previous topic - Next topic

jacobs

I want to convert .TS file to .mp4.

I have got Avidemux_2.8.1VC++64bits.

My query is.. in the main panel.. once the .ts video is loaded. Sometimes the Lavcodec" is showing as Lavf58 and some other times as DXVA2 for the very same .ts file

However after converting it to .mp4. Media Info is showing : Writing application                      : Lavf58.76.100 always.

How it affects quality? if its Lavf58 / DXVA2

Kindly advise.
Thank you.

eumagga0x2a

#1
Quote from: jacobs on September 23, 2024, 08:00:03 AMI have got Avidemux_2.8.1VC++64bits.

I would strongly recommend using a most recent 2.8.2 nightly build (cross-compiled "win64" or natively compiled "vsWin64") as it is much more stable (in sense of being less crashy and having fewer known bugs) than the last "stable" (in sense of programming interfaces not changing) release.

Quote from: jacobs on September 23, 2024, 08:00:03 AMSometimes the Lavcodec" is showing as Lavf58 and some other times as DXVA2 for the very same .ts file

Recent 2.8.2 nightlies have a much clearer indication of decoder and display path being used. On the other hand, you mix up totally unrelated things like video decoder (can be "Lavcodec" when video is decoded purely in software on the CPU or "DXVA2" when DXVA2 hardware video decoding interface of Windows is invoked to offload heavy lifting to the GPU) and muxer (here: libavformat with "lavf" being a shorter name for the same library) which combines video and audio tracks in a container file (MP4, MKV, MPEG-TS etc).

Confusingly, Avidemux calls DirectX video display path also "DXVA2". Neither video decoder nor video display has anything to do with the quality of the output: if you export ("save") video in Copy mode, video frames are passed mainly unaltered to the muxer (the format of the stream will be converted from the AnnexB type, required for MPEG-TS, to one needed by MP4, and padding packets, possibly present in the original MPEG-TS stream to keep bitrate more or less constant, will be dropped, but nothing is changed in the actual compressed data). The quality remains exactly the same.

If you re-encode using a lossy codec (H.264, HEVC, VP9, AV1, various MPEG-4 variants, MPEG-2), there will be a quality loss. If you use a lossless codec (FFV1, Ut Video) or output uncompressed video (YV12), there will be no quality loss if the source video uses 4:2:0 chroma subsampling (but you get huge files).

If the source video e.g. uses chroma at full resolution (4:4:4), there will be always quality loss when such a video is re-encoded as Avidemux can pass only 4:2:0 (full luma resolution, quarter chroma resolution) pictures from video decoders to video encoders.