Resource icon

How to convert FLVs to MP4 fast without re-encoding

(Note for Studio users: OBS Studio can remux FLVs to MP4 as a built-in feature. Just go to File > Remux recordings, select your FLV, and click Remux to convert them quickly to MP4.)

A lot of streamers like to save a local copy of the video they stream out in order to edit it later, upload it to YouTube, or just keep an archive. Usually, this means saving the video as an MP4 in your Broadcast settings. However, we know that OBS is beta software, and streaming is a complicated, resource-intensive process, and sometimes things crash. If you're recording an MP4, and OBS crashes before the MP4 can finish saving, it will be corrupted. FLVs, however, don't have this problem, because the container is designed to be started and stopped at any time. So if you are recording an FLV and OBS crashes, the FLV should not get corrupted.

Furthermore, users of OBS Studio might notice that (for the time being), FLV output is your only recording option. So you might need a way to convert FLVs to MP4 format.

FLVs and MP4s are actually very similar. They both are simply containers for an h.264/AVC video track and a AAC audio track. So the only difference is the container itself. Thus, you can very quickly and easily switch containers without needing to re-encode the video or audio!

Step 1: Download FFmpeg. You can get the latest Windows version from here or the latest Mac version from here. Extract it somewhere that you will remember. If you're on a Mac, I recommend putting ffmpeg into the folder where the video is that you want to convert. For Linux, install it from your favorite package manager or install compile it from source.

Step 1a (Windows, Optional): Add the /bin folder where you extracted FFmpeg into your PATH environment variable to make it easy to access (Control Panel > System > Advanced System Settings > Advanced Tab > Environment Variables > System Variables > PATH > Edit, put a semicolon at the end and type the new path)

Step 2: Open a command prompt/terminal and navigate to where your video is stored.

Step 3: Run the following command (If ffmpeg is not in your path, you will have to type out its full path):
ffmpeg -i input.flv -c copy -copyts output.mp4

(Mac users who copied ffmpeg into the folder with the videos: the command should begin with ./ffmpeg instead of ffmpeg)
Replace "input.flv" with the name of your source FLV file.
Replace "output.mp4" with what you want the name of your resulting MP4 should be.
The "-c copy" means it will just copy the audio and video tracks without re-encoding them.
The "-copyts" flag means it will copy timestamps, which should help with syncing audio and video.

Step 4: There is no step 4. You're done! That was fast.
Author
dodgepong
Views
47,901
First release
Last update
Rating
4.69 star(s) 13 ratings

Latest reviews

Nice, I created a guide to batch convert multiple files inside a folder in Windows
the link is here: https://obsproject.com/forum/resources/guide-batch-convert-flv-to-mp4-losslessly-with-ffmpeg.525/
Perfectly to the point and works like a champ!
Great guide.
Tells you everything you need, and is a big help for people trying to keep their quality w/o risking losing their recording using formats like MP4. One thing that could be added, which is a good program to use (if you're on Windows), is Avanti GUI for FFMPEG.
I seem to be having trouble with using this, I have downloaded the ffmpeg and extracted it and even put it in the folder where the video I need to convert is. If someone could pm me so i can get some help that would be amazing. ^^
OMG that is genius - that you saw the need to write this guide, and how quickly the process does what it does. Thank you SO MUCH - in fact BullHorn7's review says it all - you're my hero! (from someone who joined the forum specifically to thank you!
dodgepong you're my hero.
This is exactly what I was looking for, especially with the crack down on background music from Twitch and other games, I wanted to preserver the teamspeak chatter since often times that is what makes the videos funny.
Tyvm! I knew this would be simple enough, but never looked further into it. If I ever wanted snippets of livestreams, I either screencapped the livestream video or screencapped the downloaded flv file. This is easier to get the entire video with more of an untouched look to it. :)
Top