NVEnc icon indicating copy to clipboard operation
NVEnc copied to clipboard

Transcoding MP4 to MP4 not possible - destroyed structure

Open fzold opened this issue 6 months ago • 4 comments

Tested with v8.08 - 09. The encoding is flawless, but in the end you get a non-playable MP4. However, the encoding from MP4 to MKV is fine. This from NVEncC v8.09: Image And if you go back to v.7.82: Image The result is ok.

But I have identified another issue. In both versions - old and new - no psnr or vmaf is possible if you read from mp4. No error, but the status line is not being output.

fzold avatar Jul 18 '25 17:07 fzold

Would you please let me know exactly what option have you used for this encoding and the information of the input file, as I generally have no problem in H.264 mp4 to mp4 encode when using 8.08 - 8.09?

Also, does this also happen in HEVC or AV1 encoding?

rigaya avatar Jul 19 '25 05:07 rigaya

First my script:

ECHO Changing Power Plan to avoid sleep/hibernate (Höchstleistung).
powercfg -s SCHEME_MIN

ECHO Encoding started %date% %time%
SETLOCAL EnableDelayedExpansion

  NVEncC64.exe --log-level info --thread-priority belownormal ^
  --avhw -i "Wendland.S01E03.StillerundderroteFaden1.mp4" ^
  -c h264 --profile high -u p6 --qvbr 25 ^
  --gop-len 50 --bframes 3 --lookahead 20 ^
  --max-bitrate 8000 --avsync cfr ^
  --chapter chapters.txt --key-on-chapter ^
  --colorprim bt709 --colormatrix bt709 --transfer bt709 ^
  --video-metadata title="NVEncC cq 25" ^
  --audio-copy 1 ^
  --metadata date=2023 --metadata season_number=01 --metadata episode_sort=03 --metadata artist="Ulrich Noethen" ^
  --metadata title="Wendland - S01E03 Stiller und der rote Faden" ^
  -o "xWendland.S01E03.StillerundderroteFaden.mp4"

ECHO.
ECHO Encoding finished %date% %time%

ECHO Restoring normal Power Plan.
powercfg -s SCHEME_BALANCED

PAUSE
EXIT /B

Will test a little more.

fzold avatar Jul 19 '25 11:07 fzold

Got it. The source audio was EAC3 2.0. The line --audio-copy 1 for this track is the culprit. If I use external audio: --audio-source audio.ec3:copy it works in v8.09. So I tested AC3 too - same behavior.

Results for h264: AC3 and EAC3 tracks cannot be copied from MP4 to MP4. AAC audio tracks are working.

In MP4 the audio standard is AAC, but AC3, EAC3 is allowed. Nowadays WEB sources use that for multi-channel and Dolby Atmos.

fzold avatar Jul 19 '25 15:07 fzold

My player is mpv on Win11 Pro.

fzold avatar Jul 20 '25 12:07 fzold