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

Mp4 error if track has no audio data #272

Closed
mrta opened this issue Nov 4, 2016 · 5 comments
Closed

Mp4 error if track has no audio data #272

mrta opened this issue Nov 4, 2016 · 5 comments

Comments

@mrta
Copy link

mrta commented Nov 4, 2016

If Mp4 has no audio data this is the error. But i would like to edit my mp4 file even if there is no audio data

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 131, in wrapper_func
return func(h, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mutagen/_file.py", line 295, in File
return Kind(fileobj, filename=filething.filename)
File "/usr/local/lib/python2.7/dist-packages/mutagen/_file.py", line 48, in init
self.load(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 123, in wrapper
return func(self, h, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mutagen/mp4/init.py", line 991, in load
self.info = MP4Info(atoms, fileobj)
File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 152, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mutagen/mp4/init.py", line 874, in init
raise MP4StreamInfoError("track has no audio data")
mutagen.mp4.MP4StreamInfoError: track has no audio data

@lazka
Copy link
Member

lazka commented Nov 4, 2016

If Mp4 has no audio data this is the error. But i would like to edit my mp4 file even if there is no audio data

What are you trying to do?

@mrta
Copy link
Author

mrta commented Nov 4, 2016

mutagen.File(filepath)

or

from mutagen.mp4 import MP4
MP4(filepath)

@lazka
Copy link
Member

lazka commented Nov 4, 2016

I mean what is your use case. mutagen is an audio metadata library after all

@mrta
Copy link
Author

mrta commented Nov 4, 2016

My use case is tagging mp4 files. Often files with video and audio track. Sometimes without audio track.

@lazka
Copy link
Member

lazka commented Nov 4, 2016

ok

@lazka lazka closed this as completed in fea7986 Dec 15, 2016
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

2 participants