INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Video file format conversion  (Read 772 times)

Dervishing

  • Recent member
  • *
  • Posts: 37
Video file format conversion
« on: February 21, 2024, 08:18:24 pm »

I want to do something very simple... but it seems way too difficult for such a simple thing.

I want to change mkv files to mp4 files. I don't want ANY changes to the video. I don't want any changes to the audio. I don't want any changes to subtitles, or languages, or anything else already part of the mkv file. I only want the original mkv container to be converted to an MP4 container. I don't even need to save the original mkv files. This simple/basic container change should take almost NO TIME to complete since nothing is changing except the container. But Media Center grinds and grinds and grinds on the file (20 GB in this case, on a USB 3.2 SSD). MC takes more than an hour to grind-out the MP4 file, but instead of the MP4 file being close to 20 GB, the file size is 7.2 GB so audio and video have been considerably compressed compared to the original file. This should be super-simple, super-quick, and the mkv and mp4 files should be very close to the same size. What am I missing?
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: Video file format conversion
« Reply #1 on: February 21, 2024, 10:56:33 pm »

I think it's unreasonable to expect MC to change a container from mkv to mp4.
It's a fairly uncommon thing to do.
I've got a couple of the more popular swiss army knife video encoder apps on my system and I just checked if they can do it and it looks like not.
I suggest you google for a niche app that does what you want.
Logged

Dervishing

  • Recent member
  • *
  • Posts: 37
Re: Video file format conversion
« Reply #2 on: February 21, 2024, 11:23:49 pm »

What? Unreasonable? Media Center has a Convert function built-in and it appears to support mkv to mp4. It just does not work--unless I'm missing something obvious. All I'm asking for is that a function already IN Media Center works as indicated--it does not, so far. And just because changing the container isn't common for YOU doesn't mean it is uncommon for everybody. I have an LG TV that will ONLY play MP4 files. It will not play MKV or AVI... other TVs in the house play mkv just fine but I cannot add that functionality to the LG TV.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: Video file format conversion
« Reply #3 on: February 22, 2024, 12:08:51 am »

Transcoding is a lot different than changing the container.
Logged

Dervishing

  • Recent member
  • *
  • Posts: 37
Re: Video file format conversion
« Reply #4 on: February 22, 2024, 12:50:32 am »

>>Transcoding is a lot different than changing the container<<<

I'm not arguing that point. However, Transcoding is computationally intensive and takes a LONG time to do 20 GB, roughly 1 hour on a fast computer (10 cores, here). Changing the container is trivially easy and takes less than a minute to accomplish, even if the file size is 20 GB.
Logged

comox

  • Galactic Citizen
  • ****
  • Posts: 428
Re: Video file format conversion
« Reply #5 on: February 22, 2024, 01:56:21 am »

So is writing tags to an MP4 but you won't find a common app that does that either.
Things in the video world do not always make sense.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2453
Re: Video file format conversion
« Reply #6 on: February 22, 2024, 02:07:03 am »

Maybe it would make more sense as part of a new 'remix' feature, where you could remove/reorder/recompress/recode/add audio, video and subtitle streams.
It's useful to be able to remove unwanted languages or add subtitles without reencoding the other streams. The output container would then just be a simple selection.

For now, you can use ffmpeg or one of the miriad GUIs for it:
ffmpeg -i LostInTranslation.mkv -codec copy LostInTranslation.mp4

(maybe add -movflags +faststart)
Logged

Dervishing

  • Recent member
  • *
  • Posts: 37
Re: Video file format conversion
« Reply #7 on: February 22, 2024, 02:24:04 am »

So is writing tags to an MP4 but you won't find a common app that does that either.
Things in the video world do not always make sense.

? VLC Media Player edits MP4 tags on several platforms. Amvidia supports MP4 Tags for Mac. 3dlite supports MP4 tags for Windows. EasyTag supports MP4 tags for Windows and Linux. And VideoProc Converter AI also does MP4 tags for Windows and Mac.

I've tried VLC Media Player for changing the container... and it has worked well in the past, but the current version has some changes that initially looked promising (an option to use video data without changes, and another option to use the soundtrack data without changes) but even with both of those selected, VLC grinds on a 20 GB video file for an hour and gives you a MUCH smaller output file (which means the video and/or audio have been compressed or otherwise modified to reduce file size). I suppose I can try to find an older version of VLC from when the Transcode and Container-Change options were more confusing, but once you got them right, VLC was speedy at changing the container.
Logged

TheShoe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 819
Re: Video file format conversion
« Reply #8 on: February 22, 2024, 02:45:13 am »

Grab ffmpeg and then something like:

ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4

More info:

https://ffmpeg.org/ffmpeg.html#Stream-copy

NOTE: subtitles may be a problem...  i used to use mp4box (https://github.com/gpac/gpac/wiki/MP4Box), but I mostly go the other direction, MP4->MKV.
Logged

thecrow

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 449
Re: Video file format conversion
« Reply #9 on: February 22, 2024, 06:33:59 am »

What? Unreasonable? Media Center has a Convert function built-in and it appears to support mkv to mp4. It just does not work--unless I'm missing something obvious. All I'm asking for is that a function already IN Media Center works as indicated--it does not, so far. And just because changing the container isn't common for YOU doesn't mean it is uncommon for everybody. I have an LG TV that will ONLY play MP4 files. It will not play MKV or AVI... other TVs in the house play mkv just fine but I cannot add that functionality to the LG TV.

It sounds like MC's Convert function is working, but what you want is a re-mux not a convert.
Logged

EnglishTiger

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1006
Re: Video file format conversion
« Reply #10 on: February 22, 2024, 07:38:45 am »

One thing the OP is either not aware of, or hasn't taken into consideration - the fact that any conversion of an MKV, which can contain multiple Audio Streams, will result in an MP4 file that only has 1 Audio Stream in it and that single stream will be an AAC (Lossy) stream; one of the reasons for the output MP4 being smaller than the MKV  file.
Logged
Win NUC - VENOEN 11Th NUC Mini PC Core i7 1165G7,Dual HDMI 2.0+Mini DP,Windows 11 Mini Desktop Computer,Thunderbolt 4.0,1 Lan, USB-C,Wifi,Bluetooth 5.0,32GB RAM Toshiba MQ04ABF100 ‎500Gb 5400 RPM ‎eSATA HD, Gigabyte GP-GSM2NE3512GNTD 1Tb NVMe SSD, Samsung 870 QVO 8 TB SATA 2.5 Inch SSD (MZ-77Q8T0) in Sabrent Ultra Slim USB 3.0 to 2.5-Inch SATA External Aluminium Hard Drive Enclosure (EC-UK30)

Apple 2020 Mac mini M1 Chip (8GB RAM, 512GB SSD)
Sabrent Thunderbolt 3 to Dual NVMe M.2 SSD Tool-Free Enclosure with Sabrent 2TB Rocket NVMe PCIe M.2 2280 High Performance SSD + Crucial P3 Plus 4TB M.2 PCIe

ET Skins & TrackInfo Plugins - https://englishtiger.uk/index.html

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2453
Re: Video file format conversion
« Reply #11 on: February 22, 2024, 07:44:12 am »

MP4 supports multiple audio streams in multiple formats, including FLAC and TrueHD. Older players may not support it, but on PC that's not an issue.
Logged

EnglishTiger

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1006
Re: Video file format conversion
« Reply #12 on: February 22, 2024, 09:33:27 am »

MP4 supports multiple audio streams in multiple formats, including FLAC and TrueHD. Older players may not support it, but on PC that's not an issue.

Strange I used MC to convert my Beatles Abbey Road MKV to MP4 and whilst the MKV had 6 Audio Streams in it the MP4 only had 1 AAC stream in it with an Audio Bitrate of 225 kbps whilst the lowest rate for the MKV was 1509 for the DTS 5.1 stream.
Logged
Win NUC - VENOEN 11Th NUC Mini PC Core i7 1165G7,Dual HDMI 2.0+Mini DP,Windows 11 Mini Desktop Computer,Thunderbolt 4.0,1 Lan, USB-C,Wifi,Bluetooth 5.0,32GB RAM Toshiba MQ04ABF100 ‎500Gb 5400 RPM ‎eSATA HD, Gigabyte GP-GSM2NE3512GNTD 1Tb NVMe SSD, Samsung 870 QVO 8 TB SATA 2.5 Inch SSD (MZ-77Q8T0) in Sabrent Ultra Slim USB 3.0 to 2.5-Inch SATA External Aluminium Hard Drive Enclosure (EC-UK30)

Apple 2020 Mac mini M1 Chip (8GB RAM, 512GB SSD)
Sabrent Thunderbolt 3 to Dual NVMe M.2 SSD Tool-Free Enclosure with Sabrent 2TB Rocket NVMe PCIe M.2 2280 High Performance SSD + Crucial P3 Plus 4TB M.2 PCIe

ET Skins & TrackInfo Plugins - https://englishtiger.uk/index.html

casper3127

  • Recent member
  • *
  • Posts: 17
Re: Video file format conversion
« Reply #13 on: June 20, 2024, 04:42:14 pm »

For a simple container swap from MKV to MP4 without re-encoding, you should use a tool that just changes the container format while keeping the codecs intact. I recommend trying FFmpeg, a free command-line tool that can handle this quickly and efficiently without altering the video or audio quality. It should be much faster since it won't actually process the video/audio streams. Besides, learn how to clip on Windows.
Logged
Pages: [1]   Go Up