How to Fix Variable Frame Rate Footage in Ubuntu _ Ubuntu Tips & Tricks

Transcoding Footage to Fix Audio-Video Desync on Linux

In professional video editing, working with footage that doesn't stick to a solid 24, 30, or 60 frames per second can cause audio-video desync. This issue often arises when importing webcam or cell phone video into video editors, as the frame rate may bounce around and not be consistent. If this is the case, transcoding the footage can help fix the problem.

There are two great free ways to transcode footage on Linux, and today we'll explore one of them: Handbrake. Handbrake is a popular and widely-used video transcoder that allows you to convert your footage into a format suitable for professional video editors. To get started, open up Handbrake and drag your video file onto it. Go over to the "Video" tab and select the desired frame rate. For example, if you want to target a 29.97 fps frame rate, choose that option and then click on the "Constant Frame Rate" checkbox to ensure a solid, non-variable frame rate.

Next, go over to the "Quality" section and drag the slider over to 18. This will enable lossless transcoding, which means your video quality won't be compromised during the conversion process. If you're concerned about audio quality, click on the "Audio" tab and select a bitrate that meets your needs. In this example, we've chosen a bitrate of 320 kbps, which is a good starting point for most videos.

Once you've selected your desired settings, click on the "Destination" button to choose where you want to save your transcoded file. Finally, click on the "Start" button to begin the transcoding process. Handbrake tends to work faster than other video transcoders like ProRes, but the choice ultimately depends on your specific needs and preferences.

For those who prefer to use FFmpeg instead, assuming you've already installed the necessary multimedia codecs, you can use a terminal command to transcode your footage. Open up a terminal window using Ctrl+Alt+T or Super+T, and type in the following command:

`ffmpeg -i input.mp4 -vf fps=30 output.mp4`

This will convert your video file into an MP4 format with a frame rate of 30 fps, using the ProRes codec. You can adjust the frame rate and codec to suit your needs.

FFmpeg offers more advanced options and controls than Handbrake, which can be useful for more complex transcoding tasks. However, it also requires more technical knowledge and expertise to use effectively.

In some cases, even with transcoding, audio-video desync may still occur if the issue is inherent to the original file itself. In these situations, manual editing or realigning of the audio and video may be necessary to achieve a smooth playback experience.

System76 and Tech Videos

The author of this article uses a System76 Lemur laptop as their primary machine for Ubuntu and Linux-related tutorials. System76 is based out of Denver, Colorado, and builds powerful and high-quality Linux-based machines that are designed to work seamlessly with the operating system. The company offers laptops, desktops, servers, and more, making them a one-stop-shop for Linux enthusiasts.

The author has been using their System76 Lemur laptop for a little while now, and they've found it to be an excellent machine. In fact, they're recording all of these tutorials on this very same laptop! The unboxing process will be covered in a future tutorial, but rest assured that the Lemur laptop is a fantastic machine that's perfect for Linux users who want a high-quality device right out of the box.

To learn more about System76 and their products, check out the link in the description below. And if you'd like to support the channel, don't forget to let them know! The author sends all of their viewers to System76, so make sure to use that link for more information and to help out the channel.

For those interested in more Linux-related content, be sure to check out the playlist mentioned above. It features a bunch of related videos covering topics such as Ubuntu, Linux tutorials, and more. The author's name is Banana, and they'll catch you in the next video!

"WEBVTTKind: captionsLanguage: enhello everyone my name is anna-marie postbox and welcome back to another bun to tips video brought to you by system76 now you may have seen me at some point on the channel or on social media or what have you talking about the issue of variable framerate footage which is footage that does not stick to a solid 24 30 or 60 frames per second but bounces around usually from webcams or cell phone video and if you import that into professional video editors that can actually cause audio video desync as the video editor wants to read the frame rate as a constant frame rate but it's not so the audio and video slowly become out of sync over time to fix this you need to transcode the footage and there's two great free ways to do it on linux that i will show you how to do here today the first way is with a free program called handbrake link to that will be in the description below and you should be able to get it from the software store if not their website will have a repository for you to install handbrake is a great program which you can use through trance code footage open up handbrake drag your video file on to it go over to the video tab and where it says framerate fps choose your frame rate Fiat 29.97 30 24 23.976 59 94 or 60 whichever one you're targeting and then choose the dot next to constant frame rate not peak frame rate that will lock it to a solid non variable frame rate a constant frame rate as a blur and then under quality over on the right drag the slider over to 18 this will make an exact like for like a lossless copy of your video without losing our video or audio quality and if the audio is important to you from this clip you know if you don't have an external mic click the audio tab and where it has the bitrate for the audio who's 320 as that has the highest basic that you'll get and then click there tell it where to save your destination file and click start and that will transcode your footage to an x264 mp4 format with a lock framerate enabled and there you go if you want to use ffmpeg instead assuming you already installed the multimedia codecs which we've done in a previous tutorial link to that in the playlist and the card icon above description below open up a terminal with ctrl alt T or it's a super key and type in terminal and open it up I've been FM peg space - I space in quotes your video file named mp4 so you're gonna want a CD to your video location first if you haven't already space - VF space FPS equals and then 30 60 24 whatever framerate you're targeting space - see Poland v4 codec for your video Pro res space - profile : V space - space - C : a PCM underscore s1 6l e taste folks your output video file which is gonna be need to be in dot MOV format now post my sample script in the description below for you to work off up if you don't if you put and follow that what just totally understandable a sample of what you need to type will be there so you can copy-paste and replace with your attributes and hit enter and it will transcode the video footage a handbrake tends to work faster than the pro res transcoding but the pro res transcoding it's just sometimes preferred by some depending on what video editor you you're using you're using I can Dalek today either way the end result will be a constant framerate file that you can import into your video editor without audio video desync if there's inherent audio video desync to the file itself even when you play it back in a media player you know regardless of the framerate then this will not fix it because that's something wrong with file itself that just your video editor not reading it and that will require you just manually like trying to chop it up and realign the audio video but otherwise I hope this was helpful for you if it was it's a national like button get subscribed from are some tech videos come check out our sponsor system76 system76 is based out of Denver Colorado and builds powerful and really awesome Linux based machines for us Linux users who want one that made to work with it right out of the box I've been using the system 76 lemur laptop as my main ubuntu machine for a little while now and I've enjoyed it quite a bit the unboxing to it will be in the description below and that's what I'm recording all of these tutorials on and I'm enjoying it very very much they make great machines they have high quality stuff they do laptops desktops servers and more and they've got some pretty cool stuff going all to power makers creators boaters and people like me check out their link in the description below for more information and to help out the channel let them know I sent you and if you want more bunch of related videos that playlist I mentioned YouTube car con and description more Ubuntu and Linux related videos check it out my name's banana more infos box I'll catch you in the next videohello everyone my name is anna-marie postbox and welcome back to another bun to tips video brought to you by system76 now you may have seen me at some point on the channel or on social media or what have you talking about the issue of variable framerate footage which is footage that does not stick to a solid 24 30 or 60 frames per second but bounces around usually from webcams or cell phone video and if you import that into professional video editors that can actually cause audio video desync as the video editor wants to read the frame rate as a constant frame rate but it's not so the audio and video slowly become out of sync over time to fix this you need to transcode the footage and there's two great free ways to do it on linux that i will show you how to do here today the first way is with a free program called handbrake link to that will be in the description below and you should be able to get it from the software store if not their website will have a repository for you to install handbrake is a great program which you can use through trance code footage open up handbrake drag your video file on to it go over to the video tab and where it says framerate fps choose your frame rate Fiat 29.97 30 24 23.976 59 94 or 60 whichever one you're targeting and then choose the dot next to constant frame rate not peak frame rate that will lock it to a solid non variable frame rate a constant frame rate as a blur and then under quality over on the right drag the slider over to 18 this will make an exact like for like a lossless copy of your video without losing our video or audio quality and if the audio is important to you from this clip you know if you don't have an external mic click the audio tab and where it has the bitrate for the audio who's 320 as that has the highest basic that you'll get and then click there tell it where to save your destination file and click start and that will transcode your footage to an x264 mp4 format with a lock framerate enabled and there you go if you want to use ffmpeg instead assuming you already installed the multimedia codecs which we've done in a previous tutorial link to that in the playlist and the card icon above description below open up a terminal with ctrl alt T or it's a super key and type in terminal and open it up I've been FM peg space - I space in quotes your video file named mp4 so you're gonna want a CD to your video location first if you haven't already space - VF space FPS equals and then 30 60 24 whatever framerate you're targeting space - see Poland v4 codec for your video Pro res space - profile : V space - space - C : a PCM underscore s1 6l e taste folks your output video file which is gonna be need to be in dot MOV format now post my sample script in the description below for you to work off up if you don't if you put and follow that what just totally understandable a sample of what you need to type will be there so you can copy-paste and replace with your attributes and hit enter and it will transcode the video footage a handbrake tends to work faster than the pro res transcoding but the pro res transcoding it's just sometimes preferred by some depending on what video editor you you're using you're using I can Dalek today either way the end result will be a constant framerate file that you can import into your video editor without audio video desync if there's inherent audio video desync to the file itself even when you play it back in a media player you know regardless of the framerate then this will not fix it because that's something wrong with file itself that just your video editor not reading it and that will require you just manually like trying to chop it up and realign the audio video but otherwise I hope this was helpful for you if it was it's a national like button get subscribed from are some tech videos come check out our sponsor system76 system76 is based out of Denver Colorado and builds powerful and really awesome Linux based machines for us Linux users who want one that made to work with it right out of the box I've been using the system 76 lemur laptop as my main ubuntu machine for a little while now and I've enjoyed it quite a bit the unboxing to it will be in the description below and that's what I'm recording all of these tutorials on and I'm enjoying it very very much they make great machines they have high quality stuff they do laptops desktops servers and more and they've got some pretty cool stuff going all to power makers creators boaters and people like me check out their link in the description below for more information and to help out the channel let them know I sent you and if you want more bunch of related videos that playlist I mentioned YouTube car con and description more Ubuntu and Linux related videos check it out my name's banana more infos box I'll catch you in the next video\n"