Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVF Batch Converter fails to copy video tracks #42

Open
mcorke opened this issue Dec 14, 2021 · 0 comments
Open

AVF Batch Converter fails to copy video tracks #42

mcorke opened this issue Dec 14, 2021 · 0 comments

Comments

@mcorke
Copy link

mcorke commented Dec 14, 2021

In the AVF Batch Converter app, if you choose "Don't Recompress Video" and then select "Copy video tracks from files" you end up with the resulting file having no video track and being automatically trashed due to an error in the process. I haven't really dug in and spent a ton of time finding an elegant fix, but I have a solution that seems to work. At issue is that in VVAVFTranscoder.m, in transcodeFileAtPath, the variable 'imgBufferIsFineOrIrrelevant' is set to NO if 'tmpImgBuffer' is NULL. I'm assuming there's no 'tmpImgBuffer' when copying a video track, and therefore with 'imgBufferIsFineOrIrrelevant' being set to NO it doesn't copy the track, throws an error, and the resulting output file is automatically trashed. I have added a relatively crude fix that checks for 'transcodeThisTrack' in addition to checking if 'tmpImgBuffer' is NULL. If the track isn't being transcoded - i.e. it is being copied - then 'imgBufferIsFineOrIrrelevant' remains == YES and the process succeeds with no error. This requires adding a local variable for 'transcodeThisTrack'. N.B. I haven't done exhaustive testing on this, but so far seems OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant