Team OS : Your Only Destination To Custom OS !!

Welcome to TeamOS Community, Register or Login to the Community to Download Torrents, Get Access to Shoutbox, Post Replies, Use Search Engine and many more features. Register Today!

Tips & Tricks [Linux] Managing multimedia files

mobi0001

The Power Is Yours!!!
Uploader
Power User
✅ Verified Member
Member
Downloaded
62.3 GB
Uploaded
11.3 TB
Ratio
186
Seedbonus
949
Upload Count
88 (103)
Member for 3 years
Managing multimedia files

Have you ever found an audio track you liked that was part of a video file, and you just wanted the audio? We can extract the audio from a video file and save it separately using the command line tool. This can be accomplished by passing the ffmpeg program the -i flag and the name of the original video file, followed by the name of the file where we will save our audio:
ffmpeg -i video.mp4 just-audio.mp3
The -i flag just lets ffmpeg know which of the files we are specifying is the original input file, in this case it is video.mp4.

Similarly, ffmpeg can convert one video type into another. This example converts an .avi file into an .mp4 video file:
ffmpeg -i original.avi new-and-improved.mp4
Also, on the subject of ffmpeg, this tool can take screenshots for us from a video file. The following example takes one screenshot 12 minutes and 44 seconds into a video called family-trip.mp4. The image will be saved under the name family-snapshot.png.
ffmpeg -ss 12:44 -i family-trip.mp4 -frames 1 -f image2 family-snapshot.png

* * * * *

Sometimes I encounter audio files which are difficult to hear due to having a very low volume. We can boost the audio output using the command. The sox command will adjust volume up or down using the -v flag followed by a multiplier. The following example doubles (x2) the audio volume of a file.
sox -v 2.0 original-music.ogg louder-music.ogg
We can do the reverse, making a loud file softer by using a multiplier smaller than 1.0:
sox -v 0.25 original-music.ogg quieter-music.ogg
The sox command has other uses, for example it can be used to trim audio files. The following example extracts the sixty seconds from 1:30 to 2:30 in an audio file and saves this to a separate file. The new, shortened file is called just-a-minute.mp3.
sox original-music.mp3 just-a-minute.mp3 trim 1:30 60
The sox package features a second tool called play, which can be used to play an audio file from the command line. This is handy for times when we are making adjustments to audio files and want to immediately test our output.
play my-music.ogg

What is your favourite audio or video editing command line trick?
 

Thibor69

✅ Verified Member
Member
Downloaded
616.5 GB
Uploaded
2.6 TB
Ratio
4.32
Seedbonus
29,131
Upload Count
0 (0)
Member for 5 years
Wow awesome info there. I use Linux on my second PC as a media server ( got to love PLEX ) so I store all my media on that Linux box ( 30+ Terabytes ) this will come in very handy to know. I like to read and learn anything Linux command line related. :rock:
Please post any tips or shortcuts you have when you have the time. I have been learning how to edit my bash file to do all sorts of cool things.

Cheers
 

mobi0001

The Power Is Yours!!!
Uploader
Power User
✅ Verified Member
Member
Downloaded
62.3 GB
Uploaded
11.3 TB
Ratio
186
Seedbonus
949
Upload Count
88 (103)
Member for 3 years
Wow awesome info there. I use Linux on my second PC as a media server ( got to love PLEX ) so I store all my media on that Linux box ( 30+ Terabytes ) this will come in very handy to know. I like to read and learn anything Linux command line related. :rock:
Please post any tips or shortcuts you have when you have the time. I have been learning how to edit my bash file to do all sorts of cool things.

Cheers
To be very honest I am not a software developer, or a technical person. I am more into this as I love technology. I learnt hardware knowledge but I was always eager to know what lies to run these hardware. I still cannot write or understand codes, scripts etc. However, I can make do and understand to a certain point what the code or script is trying to do. Since you mentioned BASH, would you be kind enough to share your bash file setup once? I would like to learn more.
 

Thibor69

✅ Verified Member
Member
Downloaded
616.5 GB
Uploaded
2.6 TB
Ratio
4.32
Seedbonus
29,131
Upload Count
0 (0)
Member for 5 years
To be very honest I am not a software developer, or a technical person. I am more into this as I love technology. I learnt hardware knowledge but I was always eager to know what lies to run these hardware. I still cannot write or understand codes, scripts etc. However, I can make do and understand to a certain point what the code or script is trying to do. Since you mentioned BASH, would you be kind enough to share your bash file setup once? I would like to learn more.

Sure thing.... I will post it here or to your PM later ok....
 

PsyTom

Power User
✅ Verified Member
Member
Downloaded
1.4 TB
Uploaded
502.1 TB
Ratio
367.69
Seedbonus
1,662,990
Upload Count
0 (0)
Member for 3 years
this comes handy, thanks for sharing.
 
Top