I've spent a few weeks going through and testing all the answers on here for lossless cutting using FFMPEG on Android. No matter what I try I always get loss. In the app we're building we need to be millisecond precise.
I've tried so many variations of the command with a lot of them being more than half a second off. This is for both copy and re-encoding. With this i have tried the -ss before and after as well as in both positions but I don't see any difference. These are the two commands that have worked the best be still not close enough:
//copy
"-ss $startTime -t $endTime -i $input -f segment -c copy $output"
//encode
"-i $input -ss $startTime -c:v libx264 -crf 12 -preset ultrafast -t $endTime $output"
Has anyone used a command or even other library that has given more accurate results?