You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



[solved] ffmpeg on multiple .aac files in directory using find

Author (Read 24247 times)

0 Members and 1 Guest are viewing this topic.

Re: [solved] ffmpeg on multiple .aac files in directory using find
« Reply #3 on: August 07, 2019, 11:40:34 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Nice :)
 

Re: [solved] ffmpeg on multiple .aac files in directory using find
« Reply #2 on: August 07, 2019, 12:37:40 PM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 110
    Posts
  • Reputation: 6
  • Linux Lite on Dell Lattude D620
    • View Profile

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Update:

I have got help on this on a local forum. I didn't get a solution that I could just enter directly in Terminal, but I got help with a sample shell script that I managed to:
  • Run ffmpeg on all files in current dir
  • Using touch command to set tate for converted files similar to the original file
  • Renaming files so that the original files change the name.
Code: [Select]
#!/bin/bash
for i in *.aac
do
    echo ""
    ffmpeg -i "$i" -vn -c:a copy "NEW_$i"
    touch -cm --reference="$i" "NEW_$i"
    mv "$i" "OLD $i"
    mv "NEW_$i" "$i"
    echo ""
done
I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 

[solved] ffmpeg on multiple .aac files in directory using find
« Reply #1 on: August 06, 2019, 02:24:50 PM »
 

Sprintrdriver

  • Forum Regular
  • ***
  • 110
    Posts
  • Reputation: 6
  • Linux Lite on Dell Lattude D620
    • View Profile

  • CPU: Intel Core2 T5500

  • MEMORY: 3Gb

  • VIDEO CARD: Intel Mobile 945GM/GMS 943/940GML Express
Hi.

I have a folder with multiple .aac audio files. I plan to use them in a car stereo that is very picky on accepting files.

So I found out using ffmpeg to clean out any unused metadata and possible other non-auditible information using this command:
ffmpeg -i 'input.aac' -vn -c:a copy 'output.aac'

I want to be able to do this for several files at once. According to this thread in unix.stackexchange forum, it should be easilly done by using the find command.

However - I have tried several variation of the command (using the example from unix.stackexchange forum), but without any success (ffmpeg claim error about file existing). This is the commands I have tried so far:
Code: [Select]
find . -name "*.aac" -exec ffmpeg -i {}  -vn -c:a copy 2_{}
find . -name "*.aac" -exec ffmpeg -i {}  -vn -c:a copy 2_{} \;
find . -name "*.aac" -exec ffmpeg -i {}  -vn -c:a copy NEW{} \;
find . -name "*.aac" -exec ffmpeg -i {}  -vn -c:a copy NEW{}\;
find . -name "*.aac" -exec ffmpeg -i {}  -vn -c:a copy NEW{} \;
find . -name "*.aac" -exec ffmpeg -i '{}'  -vn -c:a copy 'NEW{}'\;

I usually got an error message like this (for every file):
NEW./input-file-name.aac: No such file or directory

I cannot 'see' the command that ffmpeg actually receive, so I cannot tell if there is an obviously error.
« Last Edit: August 07, 2019, 12:38:59 PM by Sprintrdriver »
I won't let an old, but fully functional computer die just because some company tell me that they won't make no more security updates to their OS. Thanks Linux :)
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section