We'll convert ("remux") it to MP4 without any transcoding (re-encoding), so it'll be very fast, and using only the free tools (available in the official Debian GNU/Linux repositories).
Note: unfortunately, old FLV videos containing VP6 and Sorenson video formats can't be remuxed into MP4 format; if you don't want re-encoding, you can try to remux them into MKV (Matroska); if you just want to fix the seek problems, you can just try FLV-to-FLV remuxing.
- Method #1 (recommended): use
ffmpeg
(it's the main utility from the FFmpeg project).
Install the "ffmpeg" package:
# apt-get install ffmpeg
$ ffmpeg -i input.flv -codec copy output.mp4
$ ffmpeg -i input.flv -codec copy -movflags faststart output_optim.mp4
$ ffmpeg -i input.flv -codec copy -vn output_a.mp4
$ ffmpeg -i input.flv -codec copy -an output_v.mp4
- Method #2 (alternative): using
avconv
(it's a part of Libav project, a fork of FFmpeg).
Install the "libav-tools" package:
# apt-get install libav-tools
$ avconv -i input.flv -codec copy output.mp4
$ avconv -i input.flv -codec copy -vn output_a.mp4
$ avconv -i input.flv -codec copy -an output_v.mp4
- Method #3 (a somewhat ugly one): using MEncoder (a part of the MPlayer project).
Install MEncoder:
# apt-get install mencoder
$ mencoder input.flv -ovc copy -oac copy -of lavf -o output.mp4
** MUXER_LAVF ***************************************************************** REMEMBER: MEncoder's libavformat muxing is presently broken and can generate INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer will play these INCORRECT files as if nothing were wrong! *******************************************************************************
$ mencoder input.flv -ovc copy -oac copy -o output.avi
Source software packages availability for Debian releases:
- ffmpeg: up to Debian 6 "Squeeze", and then again from 9 "Stretch" (also in 8 "Jessie" backports);
- libav: starting from 7 "Wheezy" (also in 6 "Squeeze" backports), up to 8 "Jessie";
- mplayer: up to 7 "Wheezy", and then from 9 "Stretch".
And yes, it should work for Ubuntu too; any current FFmpeg version should also work in other GNU/Linux or *BSD distros, MS Windows, Apple Mac OS X etc.
References:
- ffmpeg Documentation
- Libav documentation : avconv
- 6.1. Selecting codecs and container formats - Chapter 6. Basic usage of MEncoder (MPlayer - The Movie Player documentation)
- Wikipedia:
---
Last updated: 2017-12-28
Last updated: 2017-12-28
I use Avdshare Video Converter to convert FLV to MP4,MOV, MKV, AVI, WMV, MPG, etc
ReplyDeleteHere is the easy guide https://www.avdshare.com/flv-to-mp4-downloader-converter
I'm afraid you missed the point.
DeleteYour program is a clumsy closed-source Win/Mac-only shareware that can't even do a lossless remux.
And more to say, it uses FFmpeg internally!
I use iDealshare VideoGo to batch convert FLV to MP4, AVI, WMV, MOV, VOB, DV, MKV, MPEG, AVCHD, 3GP, TS, RMVB, etc.
ReplyDeleteHere is the easy guide https://www.idealshare.net/video-converter/convert-flv-to-mp4-on-mac-windows.html
Oh no, it's another useless shareware Win/Mac application using FFmpeg internally! ;)
DeleteQuite a nice post, and I've found another detailed guide on how to convert MKV to MP4 using FFmpeg here, besides, alternative to FFmpeg is mentioned in this guide.
ReplyDelete