[FFmpeg-user] convert mkv to mp4

KoSza koszanova at gmail.com
Sun Feb 16 19:56:56 EET 2025


>
> Hi,
>
> I'm going to answer in general, with several pointers:
> - First, please avoid top-posting on this mailing-list - see
> https://ffmpeg.org/mailing-list-faq.html#What-is-top_002dposting_003f-1
> - Second regarding file permissions, again, this is not ffmpeg related.
> Please google "changing unix file permissions" and/or "setting default unix
> permissions for new files"
> - Finally, regarding the ffmpeg part, your command line specifically
> includes "-c copy" which is means "don't do any reencoding", so the output
> obviously uses the same codecs as the source. Only the "enveloppe"
> (wrapper) changes from mkv to mp4, but the actual streams it contains are
> untouched.
> To reencode video probably requires a combination of "-c:a copy" (meaning:
> avoid any *audio* reencoding) and "-c:v xxxx" (meaning reencode video with
> codec xxxx).
>
> Now admittedly I don't know which exact expression is required for HDR10+
> encoding, or even if it is supported at all. Unfortunately, a quick Google
> search for this question leads to
>
> https://superuser.com/questions/1651568/how-to-convert-dolby-vision-hdr-to-hdr10
> which starts with
> "Update January 2025: This remains an open question. Current answers below
> do not solve the issue."
>
> So I'll let more knowledgeable people answer on this specific point.
>
> KR,
>
> Vincent


Hello,

-Forgive meI will do my best. This complete system is strange for me and I
am stil learning.
-Permissions: I could not deicede if ffmpeg was doing it or it was
mysystem. I just faced this was the permission problem, other way I did
not. I will check it, but this was the smallest problem.
-exactly this is the goal. Just to change container, without reencoding. My
harware is not too heavy duty, and if it can work withpout encoding, I
would choose that.
The working solution is given by Ferdi just after your letter, adding
"-strict unofficial" solved the problem.

- So as I (somehow) have some other versions that the latest installed I
must call the latest with specifying the complete path
- "-c copy" for just changing container
- "-c:s mov_text" for transforming the subs the format valid for mp4
- "-strict unofficial" to keep the DolbyVision part of the mkv

/volume1/@appstore/ffmpeg7/bin/ffmpeg -i input.mkv -map 0 -c copy -c:s
mov_text -strict unofficial output.mp4

Thank you for helping out.
Kosza


More information about the ffmpeg-user mailing list