Results 1 to 10 of 10

Thread: Find all files by encoding method?

  1. #1
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,467
    Distro
    Ubuntu Mate

    Question Find all files by encoding method?

    Hi.

    Is there a way to find all files in a directory that were encoded with a particular method(s)? For example, files that were encoded with AVC video and AAC audio?

    Kind of like the MediaInfo program but instead lists all files with particular encoding methods.

    Thanks.
    Last edited by Rytron; July 12th, 2015 at 11:42 AM.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  2. #2
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

  3. #3
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Find all files by encoding method?

    easytag is a file browser that scans ID3 tags and shows encoding. There may be a command line tool using ID3 tools, but I don't know the exact syntax.

    tgalati4@Mint17 ~/Music/Podcasts/FLOSS Weekly $ apt-cache search music ID3
    dir2ogg - audio file converter into ogg-vorbis format
    gimmix - graphical music player daemon (MPD) client using GTK+2
    glurp - GTK+ frontend to the Music Player Daemon (MPD)
    gmpc - Gnome Music Player Client (graphical interface to MPD)
    gmpc-data - Gnome Music Player Client - data files
    gmpc-dbg - Gnome Music Player Client - debugging symbols
    gmpc-dev - Gnome Music Player Client (plugin development files)
    id3 - Editor for ID3 tags
    id3tool - Command line editor for id3 tags
    id3v2 - A command line id3v2 tag editor
    kid3 - KDE MP3 ID3 tag editor
    kid3-cli - Command line audio tag editor
    kid3-core - Audio tag editor core libraries and data
    kid3-qt - Audio tag editor
    puddletag - simple, powerful audio tag editor
    python-tagpy - Python module for manipulating tags in music files
    ripit - Textbased audio CD ripper
    ruby-mp3tag - Ruby library for manipulating ID3V1.1 tags in MP3
    xmms2-plugin-id3v2 - XMMS2 - ID3v2 plug-in
    The simple id3 tool does not do it:

    tgalati4@Mint17 ~/Music/Podcasts/FLOSS Weekly $ id3 -l *.mp3
    FLOSS Weekly 319_ Fedora 21.mp3:
    Title : Fedora 21 Artist: TWiT
    Album : FLOSS Weekly Year: 2014, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    FLOSS Weekly 320_ Fossil.mp3:
    Title : Fossil Artist: TWiT
    Album : FLOSS Weekly Year: 2015, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    FLOSS Weekly 321_ Marpa.mp3:
    Title : Marpa Artist: TWiT
    Album : FLOSS Weekly Year: 2015, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    Nor does id3v2:

    tgalati4@Mint17 ~/Music/Podcasts/FLOSS Weekly $ id3v2 -l *.mp3
    id3v1 tag info for FLOSS Weekly 319_ Fedora 21.mp3:
    Title : Fedora 21 Artist: TWiT
    Album : FLOSS Weekly Year: 2014, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    id3v2 tag info for FLOSS Weekly 319_ Fedora 21.mp3:
    TIT2 (Title/songname/content description): Fedora 21
    TPE1 (Lead performer(s)/Soloist(s)): TWiT
    TPE2 (Band/orchestra/accompaniment): TWiT
    TALB (Album/Movie/Show title): FLOSS Weekly
    TYER (Year): 2014
    TCON (Content type): Podcast (255)
    COMM (Comments): ()[eng]: http://twit.tv/floss
    TCOP (Copyright message): These netcasts are released under a Creative Commons Attribution Non-Commercial Share-Alike license. TWiT and TWiT Logo are registered trademarks of Leo Laporte.
    TPUB (Publisher): TWiT
    APIC (Attached picture): (Front Cover)[, 3]: image/jpg, 216421 bytes
    TRCK (Track number/Position in set): 319
    id3v1 tag info for FLOSS Weekly 320_ Fossil.mp3:
    Title : Fossil Artist: TWiT
    Album : FLOSS Weekly Year: 2015, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    id3v2 tag info for FLOSS Weekly 320_ Fossil.mp3:
    TIT2 (Title/songname/content description): Fossil
    TPE1 (Lead performer(s)/Soloist(s)): TWiT
    TPE2 (Band/orchestra/accompaniment): TWiT
    TALB (Album/Movie/Show title): FLOSS Weekly
    TYER (Year): 2015
    TCON (Content type): Podcast (255)
    COMM (Comments): ()[eng]: http://twit.tv/floss
    TCOP (Copyright message): These netcasts are released under a Creative Commons Attribution Non-Commercial Share-Alike license. TWiT and TWiT Logo are registered trademarks of Leo Laporte.
    TPUB (Publisher): TWiT
    APIC (Attached picture): (Front Cover)[, 3]: image/jpg, 216421 bytes
    TRCK (Track number/Position in set): 320
    id3v1 tag info for FLOSS Weekly 321_ Marpa.mp3:
    Title : Marpa Artist: TWiT
    Album : FLOSS Weekly Year: 2015, Genre: Unknown (255)
    Comment: http://twit.tv/floss Track: 0
    id3v2 tag info for FLOSS Weekly 321_ Marpa.mp3:
    TIT2 (Title/songname/content description): Marpa
    TPE1 (Lead performer(s)/Soloist(s)): TWiT
    TPE2 (Band/orchestra/accompaniment): TWiT
    TALB (Album/Movie/Show title): FLOSS Weekly
    TYER (Year): 2015
    TCON (Content type): Podcast (255)
    COMM (Comments): ()[eng]: http://twit.tv/floss
    TCOP (Copyright message): These netcasts are released under a Creative Commons Attribution Non-Commercial Share-Alike license. TWiT and TWiT Logo are registered trademarks of Leo Laporte.
    TPUB (Publisher): TWiT
    APIC (Attached picture): (Front Cover)[, 3]: image/jpg, 216421 bytes
    TRCK (Track number/Position in set): 321
    There is soxi (part of sox) but I don't know if it will work with video files. That you will have to test.
    Last edited by tgalati4; July 12th, 2015 at 03:21 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  4. #4
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Find all files by encoding method?

    With some fancy scripting would could use mediainfo cli very well here.
    A relatively simplistic command that would produce a text file in that dir. you can parse would be to cd to a dir., then
    Code:
    for f in *.*; do mediainfo "$f" |grep 'Complete name\|AVC\|AAC' >> info.txt; done
    Any Complete names that had a Format, Codec id or both below the name would either or both of the above (AVC AAC

  5. #5
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,467
    Distro
    Ubuntu Mate

    Thumbs up Re: Find all files by encoding method?

    Quote Originally Posted by mc4man View Post
    With some fancy scripting would could use mediainfo cli very well here.
    A relatively simplistic command that would produce a text file in that dir. you can parse would be to cd to a dir., then
    Code:
    for f in *.*; do mediainfo "$f" |grep 'Complete name\|AVC\|AAC' >> info.txt; done
    Any Complete names that had a Format, Codec id or both below the name would either or both of the above (AVC AAC
    Cheers mc4man. Your solution is excellent.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  6. #6
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,467
    Distro
    Ubuntu Mate

    Question Re: Find all files by encoding method?

    Quote Originally Posted by mc4man View Post
    With some fancy scripting would could use mediainfo cli very well here.
    A relatively simplistic command that would produce a text file in that dir. you can parse would be to cd to a dir., then
    Code:
    for f in *.*; do mediainfo "$f" |grep 'Complete name\|AVC\|AAC' >> info.txt; done
    Any Complete names that had a Format, Codec id or both below the name would either or both of the above (AVC AAC
    Hello again mc4man. Can you make that mediainfo cli command be recursive?
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  7. #7
    Join Date
    Oct 2013
    Location
    Colorado
    Beans
    560
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Find all files by encoding method?

    Do you mean recursive as in able to handle multiple subdirectories? Try this:
    Code:
    for f in find ./ -type f; do mediainfo "$f" | grep 'Complete name\|AVC\|AAC' >> info.txt; done

  8. #8
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,467
    Distro
    Ubuntu Mate

    Re: Find all files by encoding method?

    Quote Originally Posted by Keith_Helms View Post
    Do you mean recursive as in able to handle multiple subdirectories? Try this:
    Code:
    for f in find ./ -type f; do mediainfo "$f" | grep 'Complete name\|AVC\|AAC' >> info.txt; done
    You are awesome at coding.

    The info.txt looks fine.

    I got this output in the terminal. Not sure if it matters.

    Code:
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    E: File read error
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  9. #9
    Join Date
    Oct 2013
    Location
    Colorado
    Beans
    560
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Find all files by encoding method?

    Yeah, I got some of those error messages too. I looked it up and it appears to be some bug in mediainfo that isn't fixed yet. If you don't want to look at them, you could change the command to:
    Code:
    for f in find ./ -type f; do mediainfo "$f" 2>/dev/null | grep 'Complete name\|AVC\|AAC' >> info.txt; done

  10. #10
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,467
    Distro
    Ubuntu Mate

    Thumbs up Re: Find all files by encoding method?

    Quote Originally Posted by Keith_Helms View Post
    Yeah, I got some of those error messages too. I looked it up and it appears to be some bug in mediainfo that isn't fixed yet. If you don't want to look at them, you could change the command to:
    Code:
    for f in find ./ -type f; do mediainfo "$f" 2>/dev/null | grep 'Complete name\|AVC\|AAC' >> info.txt; done
    Perfect, Keith, you are a CLI guru.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •