DISCLOSURE: Movie Studio Zen is supported by its audience. When you purchase through links on this site, we may earn an affiliate commission.

Solved .mts to .mp4 issues Handbrake and VLC

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 17 Apr 2024 19:40 #11

One quick question… I will be applying what I learned here to make .mp4 files for 45 files, 12 of which I have to do Sound Forge corrections to the audio on. Does it matter if I make the .mp4 file from the Sound Forged file or the original file then do the Sound Forge corrections? I can do it either way so better to know now.
Thanks!

Please Log in or Create an account to join the conversation.

Replied by ericlnz on topic .mts to .mp4 issues Handbrake and VLC

Posted 17 Apr 2024 20:09 #12
AC3 stereo is handled in VMS17 by Windows in both Win 10 and 11.  Vegas switched to using Windows components instead of Dolby a few years ago.

It's 5 channel stereo that is a problem.
by ericlnz
The following user(s) said Thank You: Vidchick

Please Log in or Create an account to join the conversation.

Replied by DoctorZen on topic .mts to .mp4 issues Handbrake and VLC

Posted 18 Apr 2024 10:56 #13
Overnight, I did some experimenting with Handbrake, VEGAS Movie Studio Platinum 17 and VEGAS Pro 21.

The problem with your AC-3 Audio not working and being all distorted after converting with Handbrake, is a BUG (or out of date decoding library) caused by VEGAS Movie Studio Platinum 17.
As you already explained, it doesn't matter whether you use Audio Passthrough or Convert Audio with Handbrake - both methods produce an Audio file that is completely distorted when you import it into VEGAS Movie Studio Platinum 17.

There is nothing wrong with the Audio being created by Handbrake.
I suspect the problem is that VEGAS Movie Studio Platinum 17 is too old and can't read newer AC-3 format that Handbrake is creating.
How I confirmed this is by importing the converted Handbrake files into VEGAS Pro 21.
They definitely work OK in VEGAS Pro 21.
It might be time to consider upgrading to VEGAS Pro 21, because this will eliminate this problem.
I would recommend you download the free trial first, and check that it works OK on your computer, however I suspect it should work just fine!
VEGAS Pro Edit 21 is the full version of VEGAS Pro, just by itself - upgrade is 50% during this month - access deal by pressing Advert at top of this page.
FREE TRIAL links are near bottom of sales page, when you click the ad.
VEGAS Pro Suite 21 includes extra programs, like newer version of Sound Forge Audio Studio and professional green screen (chrome key) plugins.


Sound Forge Workflow
I would not be using Sound Forge for rendering videos at all !!
Only use Sound Forge for creating audio files only.

I am about to suggest some different things to what Eric has already told you - I'll try to keep this as simple as possible.
This is my "clean slate" approach.

This is the full workflow I would recommend - this fixes all problems.

STEP 1
Convert Camera A video - converts to .mp4 and also deinterlaces the video.

I do not recommend doubling the frame rate, as Eric suggested! Keep it at 29.97fps Constant Frame Rate.
Since I originally made my Handbrake tutorial, there are some things I would do differently now.
Constant Quality using the slider, creates a video using a Constant Bit Rate.
If you switch to encoding with Average Bit Rate, it uses a Variable Bit Rate, which is more efficient while maintaining quality and keeping file size under control.

If you use the slider, I would recommend a setting of 17 or 16 - this should create a file slightly larger (thus not losing any quality) compared to original .MTS file.
If you use Average Bit Rate, use the same Bit Rate the original .MTS video uses.
I'll show screen shots of my settings below!
To find the original Bit Rate for your .MTS videos, make sure Details is switched on in Windows File Explorer (Documents).

 

Handbrake settings using the slider
Deinterlaced = Decomb
Slider = 17
Framerate = Same as Source
Framerate = Constant
Encoder Profile = High
Encoder Level = Auto
Audio = AAC (avcodec)
Bit Rate = same as original

 

 

 


Handbrake settings using the Average Bit Rate
Deinterlaced = Decomb
Avg Bit Rate (kbps) = Same As Original
Turn on Muti-pass and Turbo for better encode (will be much slower though)
Framerate = Same as Source
Framerate = Constant
Encoder Profile = High
Encoder Level = Auto
Audio = AAC (avcodec)
Bit Rate = same as original

 


STEP 2
Import all videos into VEGAS Movie Studio - Camera A Handbrake versions, Camera B and Camera C.
Create Video Proxies for all videos, using setting in VEGAS Movie Studio.
Remember to set Preview Window = Preview quality, which forces Proxy versions to play while editing.
Set back to BEST quality, to show original video quality.

STEP 3
This is the BEST way to edit audio with Sound Forge and requires no re-rendering.
Make sure you have Sound Forge set as your preferred Audio Editor, then you can open audio files from VEGAS automatically in Sound Forge and have edits in Sound Forge automatically save back into VEGAS, without having to move files around!

 

On your VEGAS Movie Studio timeline, click on Audio file you want to edit with Sound Forge.
Right-click and select Open Copy in Audio Editor.
 

Movie Studio will automatically render a .WAV copy of the audio file onto the timeline and then open this new copy in Sound Forge.
Edit your audio file in Sound Forge and make all your changes.
To save your changes and make them update automatically on the VEGAS Movie Studio timeline, go to File / Save in Sound Forge.
Go back to VEGAS Movie Studio and repeat process for any extra audio files you want to edit with Sound Forge.
You can close Sound Forge when finished.
The new .WAV audio file versions will be automatically saved into the same folder your videos came from.

THE END
Continue with your normal edits now...

I hope I haven't gone on a tangent that doesn't help you.



 
ℹ️ Remember to turn everything off at least once a week, including your brain, then sit somewhere quiet and just chill out.
Unplugging is the best way to find solutions to your problems. If you would like to share some love, post a customer testimonial or make a donation.
The following user(s) said Thank You: Vidchick

Please Log in or Create an account to join the conversation.

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 18 Apr 2024 16:11 #14
Derek,

Wow, great info! Its a lot to digest but makes perfect sense. I always learn so much from your posts. Is Vegas Pro 21 Suite much different in the user interface? I am already behind on this edit and a learning curve on top of all this extra work would be huge. I did manage to get the sound to sound right in MSP17 once I got all the Handbrake settings dialed in. I did already make the Sound Forge alterations in Sound Forge to those 12 files. Sounds like your method is the more preferable and professional and would absolutely be my approach if I weren’t already behind in delivering the edit. 

This was a stage dance performance with speakers at a microphone in between dances. The PA system was turned up way too loud and distorted the music and speaker’s microphone. Just sounds blown out. I had no control of their PA so recorded ambient sound with my Rode mic, line-in on camera. Their expectations of the sound quality really isn’t high because they know they messed that up so as long as I can have it cleaned up some they will be happy. All that said, do you think I could just get away with converting my already Sound Forged .mts files to .mp4 as the settings you laid out in your post, and getting to editing with proxy files? I am fine with moving on to VP21 if my system will handle it but it is already 6years old (though the most important guts just got overhauled recently) and may be on the lower edge of requirements. 

Alternatively, if you think I’m asking for trouble continuing with MSP17, then I’d download Vegas Pro 21 Suite free trial (assuming no huge learning curve), convert my Sound Forged .mts files to .mp4 as the settings you laid out in your post, and editing with proxy files.

Thanks sooo much!!

Update… {{ I just went ahead and downloaded Vegas Pro 21 Suite Post so I have all kinds of new toys to play with when I get this edit done. VP21 user interface is surprisingly similar so I think I’ll be up and running immediately! Only decision is if I keep the 12 Sound Forged files I already made or start over and spend a few hours tweaking them again within VP21. }}
Last Edit:19 Apr 2024 02:40 by Vidchick

Please Log in or Create an account to join the conversation.

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 27 Apr 2024 02:49 #15
I converted all my .mts files to .mp4 in Handbrake using Derek's suggested settings. The one confusing thing was the bitrate. In Derek's example file see 15421kbps as total bitrate but he used 15000kbps in Handbrake. I assume this is something you know to fudge after years of experience but since I am unsure, I used the exact total bitrate for each file. I imported some of the newly made .mp4 files for my A camera and the B camera native .mp4 into Vegas Pro 21. With the preview window set at Best, full, the video looks great, and the audio is fine. Of course, at the 'preview' setting it looks grainy. I have not created proxy files yet since I am just getting this all dialed in.

I can see that the first frame is black on almost all but not all of the .mp4 files made in Handbrake. I did select framerate "same as source' and constant in Handbrake. There is no black frame in the video file outside of Vegas. Each clip is about 11min 22sec. It is not every clip that has a black frame, just  clips 1,3,5,8 all 11:22, and 9 which is 7:29 long. There are others but the rest of the clips are small and random lengths. All files were made the same in Handbrake with the exception of changing the bitrate to match each file.

When first opening VP21 it asked me to select some basic settings, one of which is frame rate. It does not give 29.97fps as an option so I selected 30fps (it gives 24,30,50,60). I am assuming this is one of those drop frame situations, but I have never dealt with that before. In Project Properties/Ruler, I found something that gives a selection for non-drop frame 29.97. It defaulted to the drop frame 29.97. Should I change that? {{{ I did some reading in other Forum posts and see that CPU and graphic card issues can cause these issues, so I've added screens detailing my settings there. }}}

      

Also, there is a watermark that says "Vegas" over the first second or so of each A camera clip. If I mute the video and audio for A camera and randomly click on the B camera track (which is just one continuous clip all the way through instead of multiple clips so no breaks), it shows the Vegas watermark in the preview window at random times on that track which are not related to the beginning of the A camera clips. Is this something I can adjust the settings to remove? Not sure the purpose of that. I found something in Project properties that might address that. Should I change some setting here? Maybe this overlap setting?
{{{{ Thinking on this more.....I think this 'Vegas' watermark thing is because I am using the free trial version of Vegas Pro 21. Not sure if it would remain on my project after rendered but I suspect it will. Guess I'll buy it before that.}}}}

     {{ In reading more of Derek's posts on the forum I have come to the conclusion that I need to just re-convert all of my .mts files to .mp4 in Handbrake using the constant quality method he detailed above rather than the variable bitrate method above. I see in other posts that it is noted that editing programs often have issues with variable bitrates. I already tried putting my newly converted .mts to .mp4 files into MSP17 and got the same black frame issue. I do have everything set to NVidia as Derek stated in other posts, so I don't think that is the issue. }}
Since this started in MSP17 I have left the thread intact to provide the backstory. Now that I am working in VP21 should it be added to Vegas Pro forum?
Thanks.

 
Last Edit:28 Apr 2024 12:50 by Vidchick

Please Log in or Create an account to join the conversation.

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 28 Apr 2024 15:06 #16
The latest..... I re-converted the A camera .mts files to .mp4 files using the constant quality settings suggested by Derek in an earlier post and imported them into both VP21 and MSP17. Both have black frames in some of the video files. Not sure what to do now.  
 
Last Edit:28 Apr 2024 15:11 by Vidchick

Please Log in or Create an account to join the conversation.

Replied by DoctorZen on topic .mts to .mp4 issues Handbrake and VLC

Posted 28 Apr 2024 19:33 #17
Hi Vidchick

I just did some deep Google searches and found other people with the same problem you are experiencing with the black frame issue.
The problem is probably being caused by a weird codec compatibility issue, something to do with the original source videos from your Canon cameras.
One person suggested that if you remove the Audio track from Handbrake, before you convert the video, you will get a perfect video without the added black frame.

All my suggestions with Handbrake, hinge on this random person being correct about how to fix the black frame problem in Handbrake!!

If nothing in my reply helps, I do have a backup plan !!!


My approach/suggestion will be to get your problem fixed quickly, even though it may be a bit "janky".

Handbrake
Before we do a test, can you tell me which build version of Handbrake do you have installed ?
Open Handbrake, click CANCEL at bottom, then go to Help / About.
Current version is 1.7.3

Variable Frame Rates vs Bit Rates
This is a quick comment about two separate terms which can be easily mixed up.
Never user Variable Frame Rates in Handbrake - this is true. Always set to Constant Frame Rate.
However, Variable Bit Rates is a totally different thing and not related.
It is OK and recommended where possible to use Variable Bit Rates when encoding, because it is more efficient and can result in smaller file sizes, while not losing any quality.
Constant Bit Rates tend to create much larger file sizes.

Try this experiment
Pick one of the videos that is creating a black frame in Handbrake. I am talking about the original video from your camera, not the converted video with black frame.
Obviously a short video would be handy for this test.
Import into Handbrake and use all of the following settings I show in the screen shots.
I want to see if converting your source video into a Video only without any audio, fixes the black frame insertion problem.
If doing this fixes your problem, continue to read after my screen shots, for what to do next !

 

 

 

 

 

How to Add Audio to Video only files
If the above experiment works, do this to get Audio into your project.

1. Import converted video only into test project.

 

2. Find original source video from camera that has audio that is same video you converted with Handbrake.
Grab hold of it using a Right-click and not normal Left-click.
Drag under video in VEGAS timeline and let go of mouse button.
Select Audio only - Add Audio Across Time

 

3. To link Video and Audio together as one file, hold Shift button down and select Video, then Audio streams.
Press G for Group - they are now glued together.
Repeat process for all problem videos with black frames.

 
 
ℹ️ Remember to turn everything off at least once a week, including your brain, then sit somewhere quiet and just chill out.
Unplugging is the best way to find solutions to your problems. If you would like to share some love, post a customer testimonial or make a donation.
Last Edit:30 Apr 2024 18:28 by DoctorZen
The following user(s) said Thank You: Vidchick

Please Log in or Create an account to join the conversation.

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 28 Apr 2024 19:54 #18
1.7.3 is my Handbrake build. Just downloaded it last week.

I am converting one file now to test now. 

Please Log in or Create an account to join the conversation.

Replied by Vidchick on topic .mts to .mp4 issues Handbrake and VLC

Posted 28 Apr 2024 20:33 #19
That did work in MSP17 and in VP21! No black frame at beginning. It’s a lot of work but separating video and audio in Handbrake does seem to fix the issue. Just guessing by how many files had black frames before, I may have 20+ out of 43 files to do that to on A camera. You think this grouping audio/video in multiple separate files will behave to do multi-camera editing? Any settings or transitions that you know of that might become an issue?

I have to do a quick and dirty 1 camera edit for the client today but I will get back into this multi-cam edit in the next few days and post a quick update to confirm it worked on the whole project.

Thanks again!!!

Please Log in or Create an account to join the conversation.

Replied by DoctorZen on topic .mts to .mp4 issues Handbrake and VLC

Posted 30 Apr 2024 18:26 #20
Oh wow. That's a relief that my suggestion worked. This is all thanks to a random solution I found on another forum.
This appears to confirm, that the insertion of black frames bug, has something to do with the unique combination of Canon .mts files and Handbrake. It's a codec reading/writing problem.

You think this grouping audio/video in multiple separate files will behave to do multi-camera editing?

Cross fingers, it should not be a problem at all.
Under normal circumstances, all Video files are in reality, two separate streams - one video stream and one audio stream.
I have edited plenty of projects where I swapped the original audio file for a different audio file version and used multi-cam.
Just remember to Group the Video & Audio together, by using the G shortcut.

Long term solution...
When you have time to catch your breathe, could you please send me a sample video from the camera that produces black frames in Handbrake.
I would like to test it myself and see if I can find a better solution for converting it.
Record 20 seconds of something random and make sure that it does produce black frames in Handbrake, before sending it to me.
Use a file sharing service like Google Drive. If you use Google Chrome and are logged in, you can access Drive on an empty new tab.
drive.google.com/drive/home
Upload the video to Google Drive, then send me a copy of the download link.

 
ℹ️ Remember to turn everything off at least once a week, including your brain, then sit somewhere quiet and just chill out.
Unplugging is the best way to find solutions to your problems. If you would like to share some love, post a customer testimonial or make a donation.
The following user(s) said Thank You: Vidchick

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: DoctorZen
Time to create page: 0.977 seconds