Audio data is same: your file is really mono and even FFmpeg agrees on that when it decodes (in practice it duplicates the mono channel). There is only 1 byte not same between the 2 files, it is the byte saying that this is the left channel vs the right channel. class pymediainfo.MediaInfo (xml: str, encodingerrors: str 'strict') An object containing information about a media file. If you are not convinced, try to decode each channel in a different file, and compare files. This module is a wrapper around the MediaInfo library. Not blaming FFmpeg here, their developers decided to do that for good reasons (decoding and handling lot of tools not able to deal with channel count change in the middle of a file), just not what you are looking for. ![]() In this case MediaInfo shows the correct value (mono) and FFmpeg shows an incorrect value (stereo). Parametric Stereo is not detected in this file. MediaInfo does not have this limitation so shows stereo only if Parametric Stereo is detected. But AAC may have an hidden Parametric Stereo feature which makes this announcement not the reality 99.99% of the time (HE-AAC is rarely used for mono content).įFmpeg is not able to switch from mono to stereo if stereo is detected after decoder init so it forces its output to stereo due to some anticipation of getting Parametric Stereo at some point. # ls | grep "^MOV" | while read line do targetname=$(mediainfo $line | grep "Encoded date" | sort -u | awk '.AAC content, announced as mono. Using this information, I am able to rename all the video files. What I needed in this case was the line "Encoded date" - the day and time the video was encoded/recorded. How can I say if it is really 2 or 5. I guess many of the channels might be filled with empty data, or something like this. I run mediainfo, but it shows it as 8 Basically it should either be a 2 channel, or 5.1 showing as 6. Told you there's a lot of meta information. 1 I am trying to find the number of channels in a given. Luckily video files have meta data containing a lot of information about the used encoding and the recorded date! This information can be retrieved using" mediainfo: Example: When you move all your photos and videos from the internal to the external SD card, the modified timestamp changes and therefore they all have the same date. On the other hand pymediainfo is more tested, Python only (but needs libmediainfo installed, while with this library you don’t) and supports Python 2 (while this library doesn’t and won’t) and has better crossplatform capabilities (since, again, it uses ABI mode). ![]() Android in particular has the problem that you cannot use the "modified date" of the video file to use as recorded date. ![]() I found it especially annoying when I wanted to sort the videos according to their recording date. The problem with several video sources is however, that each video camera has its own file naming (let alone the video and audio encoding). Especially the cameras on mobile phones are handy to shoot some films. Compared to our parents in the 80's there isn't just one video camera available, nowadays we have many cams everywhere we look. In my family we use videos - of course - to document our kids growing up. Or you could extract the audio with MyMP4BoxGUI and get MediaInfo to look at the extracted. Published on January 16th 2017 - last updated on January 11th 2023 - Listed in Personal Linux Multimedia Maybe the obsolete channel count data gets dumped by MKVMerge during the re-muxing process or it's ignored by MediaInfo when the container is MKA/MKV, but MediaInfo will simply report it as being 6 channel when the AAC audio is in an MKA/MKV container. Rename video files to filename with recorded date using mediainfo
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |