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

Stop making backup file #9

Closed
ghost opened this issue Nov 13, 2016 · 6 comments
Closed

Stop making backup file #9

ghost opened this issue Nov 13, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 13, 2016

When I run:

tageditor -s artist=Jessie -f alfa.m4a

The file alfa.m4a.bak is also created. This could be a problem if the original
file is large. How do I stop this?

@Martchus
Copy link
Owner

Sometimes the file must be completely rewritten because the layout changes. In this case the original file is renamed (to backup file) and a new file is created from this. The good thing is that in the error case the original file can be restored.

To prevent this, you could allow use of padding using --min-padding and --max-padding. By default those are set to 0 so the file is rewritten almost all the time. See file layout.

@ghost
Copy link
Author

ghost commented Nov 13, 2016

@Martchus thanks for the help. This fixed it for me:

tageditor -s artist=Jessie --max-padding 10 -f alfa.m4a

although --max-padding would likely need to be larger for the general case. I
feel that this should be better explained in the README. I had previously read
over the section you linked, but it is not clear that the default
--max-padding is 0.

At first I was going to suggest that the default be changed, but I could see how
some might prefer it to be 0.

@Martchus
Copy link
Owner

I'll try to improve the documentation.

The default is just the default because I didn't want to change the behaviour when introducing the padding constraints.

BTW: I found your mp4v2 library which states to be able to modify MP4 files. Hence I guess you're aware of the MP4 file structure - so if you have any further advice to improve this you're welcome. How does your library handles this?

@ghost
Copy link
Author

ghost commented Nov 13, 2016

Sadly it is not my library; the original project was abandoned and I
imported it to GitHub. I did this because at the time MP4v2 was the only project
that could do in place editing of MP4 tags.

So I fixed it enough to get it building on Windows and uploaded
a release.

The project is starting to show its age; notably it completely fucks up
DASH files.

@Martchus
Copy link
Owner

Martchus commented Nov 13, 2016

Ok.

The underlying library of this application should handle DASH files correctly, at least a file from MTX test data is tested. So this would be an advantage over MP4v2.

Additionally, I see that mp4tags (from MP4v2) always sets tags 'the fast way'. Since it has also disadvantages (padding, no backup in error case, lesser aptitude for streaming) I decided to give the user more control about the file structure.

I'll close this issue when I updated the README.md.

@ghost
Copy link
Author

ghost commented Nov 16, 2016

Fixed with the following, thanks 4cacaff

@ghost ghost closed this as completed Nov 16, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant