0

I am trying to merge videos in FFmpeg reading through a .txt file, it merges the videos but increases the total timeline. Expected timeline is 2 minutes but after merging the videos the output file has a timeline of 18 hours.I am using the following command in my cmd:

ffmpeg -f concat -i mylist.txt -c copy output.mp4

fahad
  • 21
  • 5
  • 1
    What do you mean by "merging"? Concatenation as in your command (results in longer video), or muxing multiple videos into the same file (results into one file, containing multiple video tracks)? – Michael Hirschler Mar 12 '21 at 07:15
  • Yes use can say concatenation of video having a length of 10-15 seconds each, but the output video is too long – fahad Mar 12 '21 at 07:25
  • Are there multiple streams inside any file of the source videos (defined in mylist.txt)? – Michael Hirschler Mar 12 '21 at 07:29
  • Yes, it contains the name of videos that are to be concatenated. I am new to FFmpeg read documentation but can't understand that. – fahad Mar 12 '21 at 07:32
  • Please provide an `ffprobe [path/to/file]` output from one file in your mylist.txt – Michael Hirschler Mar 12 '21 at 07:54
  • See https://video.stackexchange.com/q/32597/ – Gyan Mar 12 '21 at 08:16
  • I have provided this path "ffprobe -f concat -i mylist.txt -c copy output.mp4" but it still didn't work. It shows this error "Failed to set value 'copy' for option 'c': Option not found" – fahad Mar 12 '21 at 08:31
  • 1
    See Gyan's link. All inputs must share those same attributes. I'm guessing you are trying to concatenate arbitrary inputs that have varying attributes. If you need help determining if this is true, then we need to see info about every input listed in `mylist.txt`. Showing the **complete** output of `ffmpeg -i input1.mp3 -i input2.mp4 -i input3.mp4` will suffice. – llogan Mar 12 '21 at 17:50

0 Answers0