Please forgive me if I am asking a question that has been asked so many times before.
I needed to convert a .mts file from a camcorder to a .mp4 so that it would be easier for people to play when viewing from my cloud server.
I have not done this for many years, so I just downloaded the last version of mkvtomp4 used all default settings except setting it to mp4 and did the re-wrap.
To my surprise I saw that it changed the bit rate of my audio from 256 to 185 khz and it changed the frame rate of my video from 30 to 60 fps.
Can anyone tell me how to set mkvtomp4 so that nothing changes that does not need to change ?
If not, can someone recommend a different free program to re-wrap .mts files to .mp4 that will change nothing that does not need to be changed ?
TIA
+ Reply to Thread
Results 1 to 30 of 34
-
-
Handbrake does. Try MKVtoolnix GUI to re-wrap to an mkv
-
I am trying to re-wrap to .mp4.
I do not see any option for .mp4 in the MKVtoolnix program.
I found an AAC quality option setting in mkvtomp4 that I can bump up to change the Audio Bitrate, but I am still mystified about the Video frame rate change. -
Perhaps Avidemux? I can do a "copy" of video and audio to the mp4 format (assuming it's compatible)
It might help others to answer your question if your provide a MediaInfo report (text view) of your source file
https://www.videohelp.com/software/MediaInfo -
+1
My understanding is that .mts is the AVCHD container format.
You will read of tons of programs that will 'convert' from mts to mp4 but a simple, and free, program might do it.
Failing that a simple ffmpeg line should do it or try one of the gui's
If you have a short, original, clip you can also upload it here as an attachment and we can also try software. -
Use clever Ffmpeg-GUI. Load your mts, click main, click multiplex, deselect the sultitle stream, click target file and accept the proposed filename, set mp4 as container, click multiplex. Done.
-
[Attachment 60283 - Click to enlarge]
Sorry, Bob is not my uncle.
See jpeg.
The frame rate is just the same as with mkvtomp4 so that oddity/problem still exists.
Also, it did not convert the audio to AAC so there is no sound. -
You have to replace "your.mts" with the path to your source file.
Save the code below as a text file and name it rewrap.cmd or rewrap.bat
Code:ffmpeg.exe -i "your.mts" -c:v copy -c:a copy "your.mp4" pause
Or upload a short sample of your source.Last edited by Sharc; 11th Aug 2021 at 16:41.
-
[Attachment 60284 - Click to enlarge]
It is the same result as the gui ffmpeg.
Later tonight I will shoot a few seconds of a blank wall with the camcorder and then upload the mts file. -
-
If you put MediaInfo in Text mode you'll see that your mts video is field sequential. It's very common for programs to double the frame rate when remuxing. I think you just need to force the frame rate to 29.97 when you remux. I don't have such a file for testing but try adding -r 29.97 to the ffmpeg command line. I think one of these will work:
Code:ffmpeg.exe -r 29.97 -i "your.mts" -c:v copy -c:a copy "your.mp4"
Code:ffmpeg.exe -i "your.mts" -r 29.97 -c:v copy -c:a copy "your.mp4"
-
Source is definitely interlaced.
I will try the revised command line later tonight.
But how would I get it to convert ac3 to aac ? -
Here is an original .mts recorded at 60 interlaced like the one I have been trying to re-wrap.
-
I have a batch file in my SendTo folder so I can right click on any video and select Send To -> RemuxToMp4.bat for a quick remux:
Code:ffmpeg -fflags +genpts -i "%~1" -vcodec copy -acodec copy -movflags faststart "%~dpn1.mp4"
By the way, shooting a clock with a moving second hand was a good choice! -
Thank you for your efforts on my behalf and for the compliment. Some days my brain works good.
Please see attached jpg of the text output of MediaInfo when I run it on the mp4 you posted.
The problem / odditity still shows up.
If when you examine the mp4 file on your computer, you see the correct framerate, then I am thinking that maybe MediaInfo is doing something non-standard on my PC.
If that is the case can you recommend a similar freeware program for me to try to use to examine the files. -
If when you examine the mp4 file on your computer, you see the correct framerate, then I am thinking that maybe MediaInfo is doing something non-standard on my PC.
If that is the case can you recommend a similar freeware program for me to try to use to examine the files. -
This seems to point to a bug/feature/interpretation in the ffmpeg mp4 muxer and its exposure in Mediainfo.
https://video.stackexchange.com/questions/12156/how-can-i-convert-mts-file-avchd-to-mp...-v/17194#17194
Perhaps that is what is going on here.
Scott -
Even the simple commandline of post #12 produces an interlaced TFF output which plays correctly at 29.97fps here (using MPC-HC), and it plays correctly when I stream it to my TV, whereas vdub2 plays it at 59.94fps. DGIndexNV reports the framerate as 29.97fps.
And yes, Media Info reports the frame rate as 59.94fps and the Original framerate as 29.97fps. Probably container vs stream framerate.
I don't know whether one can live with this or whether it causes issues with certain players .....Last edited by Sharc; 12th Aug 2021 at 02:13.
-
Yes, I see the same thing in MediaInfo. And some editors have a problem with it too. My rudimentary understanding is that with "separated fields" interlaced video in MP4 the frame rate flag is supposed to be set to the field rate -- and that is what ffmpeg is doing. The editors (like VirtualDub2) are probably at fault here. Players probably deal with this correctly because they use the timestamps embedded with each frame in the video stream, not the frame rate in the header.
Similar Threads
-
Rewrap MTS to MP4 w/o re-encoding. Why is MP4 smaller? GUI batch tool?
By Razz in forum Video ConversionReplies: 7Last Post: 13th Mar 2021, 16:24 -
From multiple MTS file to mp4
By mcgyver83 in forum MacReplies: 14Last Post: 21st Aug 2020, 09:58 -
MTS file conversion to MP4 or WMV
By David Mullins in forum Video ConversionReplies: 6Last Post: 6th Aug 2020, 08:51 -
Converting from MP4/MKV to MTS
By smithb in forum Video ConversionReplies: 4Last Post: 17th Oct 2019, 13:21 -
Problem with different time length MP4 and MTS for same period of filming
By mtn in forum Newbie / General discussionsReplies: 1Last Post: 12th Oct 2018, 20:59