ArneVogel/concat

ffmpeg error

Closed this issue · 6 comments

I have ffmpeg installed and ffmpeg -version works etc so I know it is surely installed however I get

Combining parts

ffmpeg error
Deleting chunks
Deleting temp dir
All done!

Please output the ffmpeg err code so we can get useful information from it. Also in this event I feel like we should be prompted as to whether we want to delete the chunks or not - in this event I would much rather just have the chunks than nothing.

Thats weird, the expected behaviour would be that it catches the output of ffmpeg and prints it when it get an ffmpeg error. On what OS are you working? Can you give me the output of running concat with -debug, mainly the ffmpeg command?

Windows 7, 64 bit

I tried it with a shorter vod because the other one was 6GB and I had already tried it 3 times and that's a lot of bandwidth. But it worked with the shorter one, perhaps the issue was trying to concat so many chunks

I also ran into an issue trying a very short vod (7 minutes) using -start="0 0 0" -end="full" and also tried -start="0 0 0" -end="0 1 0" - said the vod wasnt long enough for the end/start supplied

Could you give me the command you are using?

The ffmpeg error sounds a lot like this issue. Can you downloading ffmpeg from here and pasting the ffmpeg.exe you find in the bin folder into the folder concat.exe is located in? This fixed it in the other issue.

Running into the same issue. The tool works great with short footage (< 1h), but once it is longer vods it always shows the ffmpeg error.

Furthermore, concat deletes all the downloaded files no matter what. It would be cool if it would not do that when an error occurs. so i dont have to download everything again and see it fail once more. (maybe add an optional flag for all the people who want to use that edit: nvm the -debug flag seems to keep the files).

ffmpeg throws "Too many open Files" error for me

See log: https://pastebin.com/nRcuXpvp

EDIT
i replaced the concatenation filter with the other ffmpeg way of concatenating (-f concat -i files.txt) and it worked out. (Worked on Ubuntu so far, Windows 10 still randomly throws an ffmpeg error)

func ffmpegCombine(newpath string, chunkNum int, startChunk int, vodID string) {
    filesTxt := newpath + "_files.txt"
    concat := ``
    for i := startChunk; i < (startChunk + chunkNum); i++ {
        s := strconv.Itoa(i)
        concat += "file '" + newpath + "/" + vodID + "_" + s + chunkFileExtension + "'\n"
    }
    err := ioutil.WriteFile(filesTxt, []byte(concat), os.FileMode(0660))
    if err != nil {
        fmt.Println(err.Error())
        fmt.Println("could not create temp file")
        return
    }
    args := []string{"-f", "concat", "-safe", "0", "-i", filesTxt, "-c", "copy", "-bsf:a", "aac_adtstoasc", "-fflags", "+genpts", vodID + ".mp4"}

    if debug {
        fmt.Printf("Running ffmpeg: %s %s\n", ffmpegCMD, args)
    }
    ....

this is to do with your ulimit (at least on *nix, osx), because apparently it has to be higher than the number of VOD's chunks. Increasing it to elevated numbers (e.g. 8192) solved this for me.