Skip to content

readFile throws the exception "Check if the path exists" #156

Answered by KathRains
KathRains asked this question in Q&A
Discussion options

You must be logged in to vote

For those who can face the same problem. I found the working solution:

        await ffmpeg.run('-i', name, '-ss', '0', '-to', start.toString(), '-c', 'copy', 'output1.mov');
        await ffmpeg.run('-i', name, '-ss', (start + length).toString(), '-c', 'copy', 'output2.mov');

        
        const filesList = [`file output1.mov`, `file output2.mov`];
        ffmpeg.FS('writeFile', 'filesList.txt', filesList.join('\n'));

        await ffmpeg.run('-f', 'concat', '-safe', '0', '-i', 'filesList.txt', '-c', 'copy', 'result.mov');
        const data = ffmpeg.FS('readFile', 'result.mov');

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by KathRains
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants