Last active
July 7, 2022 17:54
-
-
Save ssp/4452136 to your computer and use it in GitHub Desktop.
Command to repackage a MP4 video from a FLV container to a MP4 container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Stored at: https://gist.github.com/4452136 | |
# Assumes the given path points to a FLV file with MP4 video. | |
# Use ffmpeg to repackage the file. | |
ffmpeg -i "$1" -acodec copy -vcodec copy "$1".mp4 | |
# old version: | |
# Not used anymore as VLC seems to have a bug that creates broken | |
# MP4 files which do not play back correctly. | |
# | |
# Call VLC to repackage the video/audio to a MP4 container. | |
# Path to VLC executable | |
#VLCPATH=/Applications/Vision/VLC.app/Contents/MacOS/VLC | |
# Call VLC: | |
# * -I dummy: without a graphical interface | |
# * $1: input file name | |
# * conversion specification | |
# ** mp4 container, no change to the streams | |
# ** write to original file name with ».mp4« appended | |
# * vlc://quit: exit vlc when done | |
#$VLCPATH -I dummy "$1" ":sout=#standard{mux=mp4,dst=$1.mp4,access=file}" vlc://quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Free method: Handbrake, Freemake Video Converter, Formatfactory
Paid yet professional and easy method: iDealshare VideoGo https://www.idealshare.net/video-converter/convert-flv-to-mp4-on-mac-windows.html