Which FFmpeg command do I use to passthrough FLV to MP4

.mp4ffmpegflvtranscode

I've a number of downloaded FLV files which I would like to convert to MP4. They are already in the correct format so I am told all I need to do is to remux the video and audio streams into an MP4 container using copy/pass through.

I'm on Windows 7 64 bit and already have FFmpeg as part of get_iPlayer.

I'm struggling to work out the command line for this please?

Also would it be possible to batch process a number of FLV files in the same way?

Best Answer

It should be something like:

ffmpeg -i yourvideo.flv -codec copy output.mp4

You can use FOR command to loop through files (it recurses down your tree):

FOR /R C:\dir\ %%F IN (*.flv) do ffmpeg -i "%%F" -codec copy "%~nF.mp4"

Just to clarify, %~nF returns only the name portion of the filename (without the extension).

Related Question