Length of video file in minutes


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Length of video file in minutes
# 1  
Old 04-19-2019
Length of video file in minutes

I need to extract the length of a video file in minutes, not seconds or hours.


How do I get the amount of minutes exclusively?
# 2  
Old 04-19-2019
Quote:
Originally Posted by locoroco
I need to extract the length of a video file in minutes, not seconds or hours.


How do I get the amount of minutes exclusively?
My crystal ball isn't working well today. Maybe you can help me get a clearer picture...

What operating system are you using?

What shell are you using?

What type of files contain these video files?

What is it that you do that shows you the number of seconds or hours representing the length of these video files? What is the format of the output produced by what you do?

How do you want to calculate minutes? (As a whole number truncated to the number of complete minutes? As a whole number rounded to the nearest number of minutes? As a whole number rounded up to the next minute if there is a picosecond more than the next whole number less than that number? As a floating point value with some specified number of decimal places?)
# 3  
Old 04-19-2019
There are many command line tools (especially linux command line tools) which will return the length of an audio or video file in various string formats. Then it is relatively trivial to convert this string to minutes or seconds..

Which command line tools has you tried so far?

Shall I Google them for you (the original poster)?

I'm happy to Google them for you and post some of them here, but please provide system info (Linux, Solaris, etc).
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check file creation Time minutes and if file older then 5 minutes execute some stuff

Hello all, Info: System RedHat 7.5 I need to create a script that based on the creation time, if the file is older then 5 minutes then execute some stuff, if not exit. I thought to get the creation time and minutes like this. CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
Discussion started by: charli1
3 Replies

2. Shell Programming and Scripting

Grep a log file for the last 5 minutes of contents every 5 minutes

Hi all, System Ubuntu 16.04.3 LTS i have the following log INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042 INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Discussion started by: charli1
15 Replies

3. UNIX for Beginners Questions & Answers

How to convert days hours minutes seconds to minutes?

Hi, please help with below time conversion to minutes. one column values: 2 minutes 16 seconds 420 msec 43 seconds 750 msec 0 days 3 hours 29 minutes 58 seconds 480 msec 11 seconds 150 msec I need output in minutes(total elapsed time in minutes) (2 Replies)
Discussion started by: ramu.badugula
2 Replies

4. Shell Programming and Scripting

Flat file-make field length equal to header length

Hello Everyone, I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table. Input Data- ------ ------------------------ ---- ----------------- WFI001 Xxxxxx Control Work Item A Number of Records ------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies

5. UNIX for Advanced & Expert Users

trim 165 MB video clip with ffmpeg (only last 3 minutes)

Hi original video clip > ls -alh reallynotpr0n.flv -rw-r--r-- 1 jonny staff 165M Nov 18 19:57 reallynotpr0n.flvtrying to cut only last 3 minutes of the clip out. > ffmpeg -i reallynotpr0n.flv -vcodec copy -acodec copy -ss 00:52:00 -t 00:03:48 trimmed_video.avi ffmpeg version 0.7.7,... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

6. UNIX for Dummies Questions & Answers

Convert a tab delimited/variable length file to fixed length file

Hi, all. I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file: 10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783 19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657 And this is the expected... (2 Replies)
Discussion started by: Everton_Silveir
2 Replies

7. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

8. Shell Programming and Scripting

Convert minutes to hours, minutes, seconds

How would you convert lets say a 1000 minutes to hours, minutes, seconds (1 Reply)
Discussion started by: Vozx
1 Replies
Login or Register to Ask a Question