Git Product home page Git Product logo

Comments (6)

phw avatar phw commented on July 18, 2024

From the given info it's not possible to see what the issue is. Can you share an affected file and the full stack trace?

from mutagen.

Tailslide avatar Tailslide commented on July 18, 2024

I added the stack trace above.
The file is copyrighted is there some way I can send it to you direct or is a hex dump of the first bit sufficient?

from mutagen.

Tailslide avatar Tailslide commented on July 18, 2024

I think what's going on is I have some dts files inside a wav container and some that are not inside a wav container that I misnamed from .dts to .wav. Looks like foobar supports addings tags to .dts files but I'm not sure if it's supported or how I would open these in mutagen.

from mutagen.

phw avatar phw commented on July 18, 2024

If those are not actually WAVE files than this would of course explain a lot :) The stack trace also shows that parsing the file fails already at the very beginning, so it's definitely not a WAVE file.

mutagen has currently no support for reading .dts files. I am not super familiar with .dts files, but AFAIK those are basically just bare DTS audio streams with some very basic file structure that in itself does not allow metadata (similar to how .aac files are for AAC audio). The discussion at https://forum.videohelp.com/threads/381761-Container-for-DTS-audio indicates that foobar2000 supports tucking APE tags at the end of the .dts file for metadata support, but this could cause compatibility issues with other software (again similar to .aac).

For best compatibility you would better wrap the DTS audio into a proper container format. Matroska (as a .mka file in this case) would be frequently recommended here, but as mutagen does not yet support Matroska it probably does not bring you any further. I think it should also be possible to use a MP4 container instead. In regards to tagging that would probably offer the best compatibility. No idea about playback compatibility, though.

from mutagen.

phw avatar phw commented on July 18, 2024

I got myself a .dts file. It's really just the bare DTS encoded audio, without anything extra or any supporting file structure. So there is not really much tagging to be done here. It is in general possible to put an APE tag at the end, as foobar2000 does, but playback software not supporting this would just attempt to interpret this as audio data and fail in unexpected ways. A typical issue with this kind of tagging is that software reports a longer playback duration as it uses the byte size of the audio to estimate the duration.

I would actually try to put those files into a MP4 container and see whether your playback software can handle it. You can do this with ffmpeg with something like ffmpeg -i source.dts -c:a copy output.mp4.

Or use .mka as the output, but mutagen won't be able to tag them in this case.

from mutagen.

Tailslide avatar Tailslide commented on July 18, 2024

Everything you say matches up with what I see playing around with the files. I wound up converting them all to multichannel FLAC since this seems the best compromise despite triggering my programmer OCD by being a one way conversion to a larger file. The files in .wav containers would only play in stereo on some players and when I converted the .dts files to FLAC it complained about corruption at the end presumably from whatever meta that foobar is attaching to the end. I heard some horror stories about trying to stream multichannel FLAC to receivers but this seems like the least bad option.

Thanks for taking a look at this.. I’ll close this (non) issue.

from mutagen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.