gpt-4-0125-preview· openai
Suzhen/CodeChat
create a quick ffmpeg6.0 for concat a .flv media in dir to mp4 show only code
- User
create a quick ffmpeg6.0 for concat a .flv media in dir to mp4 show only code
- Assistant
Certainly! To concatenate
.flvfiles in a directory and output a single.mp4file using FFmpeg 6.0, follow these steps:- Create a text file (
mylist.txt) with all the.flvfiles you want to concatenate, in the formatfile 'filename.flv'. For example:
plaintextfile 'video1.flv' file 'video2.flv'- Then, run the FFmpeg command:
bashffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4Make sure all
.flvfiles andmylist.txtare in the same directory as where you run the command, or provide full paths. This command assumes you don't need to re-encode the files. If you encounter any codec issues, you may need to omit-c copyto allow FFmpeg to re-encode the output. - Create a text file (