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
Labels

Comments

@mrta
Copy link

@mrta 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

This comment has been minimized.

Copy link
Member

@lazka 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

This comment has been minimized.

Copy link
Author

@mrta mrta commented Nov 4, 2016

mutagen.File(filepath)

or

from mutagen.mp4 import MP4
MP4(filepath)

@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 4, 2016

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

@mrta

This comment has been minimized.

Copy link
Author

@mrta mrta commented Nov 4, 2016

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

@lazka lazka added the enhancement label Nov 4, 2016
@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 4, 2016

ok

@lazka lazka closed this 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
2 participants
You can’t perform that action at this time.