DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 19th September 2022
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 345
Default Convert mp4 to mp3

Convert mp4 to mp3

I have a load of mp4 files with spaces in their names, the first line replaces the spaces with _ so that the second line can convert them to mp3.

Code:
#!/bin/sh

for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done

for X in *.mp4;do ffmpeg -i $X $X.mp3;done
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
convmv - convert file names victorvas OpenBSD Packages and Ports 2 30th July 2022 03:05 AM
New Convert NFSv3 NFSv4 bigearsbilly OpenBSD General 1 6th March 2020 12:37 PM
sh script to convert inches to mm and cm J65nko Programming 6 8th August 2019 11:33 PM
Problem with convert aleunix OpenBSD Packages and Ports 2 10th May 2012 01:52 PM
Want to convert my server to raid revzalot OpenBSD Installation and Upgrading 2 16th September 2009 07:56 PM


All times are GMT. The time now is 02:09 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick