Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Is there a way to get duration of a recording? (John D. Gwinner)
   2. Re: Is there a way to get duration of a recording? (tosiara)
   3. Re: Is there a way to get duration of a recording? (Dougie Nisbet)


----------------------------------------------------------------------

Message: 1
Date: Fri, 8 Feb 2019 01:57:03 +0000
From: "John D. Gwinner" <j...@gwinner.org>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: [Motion-user] Is there a way to get duration of a recording?
Message-ID:
        
<byapr01mb42135e3dd14ba5493abe6562c3...@byapr01mb4213.prod.exchangelabs.com>
        
Content-Type: text/plain; charset="us-ascii"

I'm inserting the metadata about a recorded event into a database.

Is there a way to get the duration of the recorded video? I didn't see it under 
Conversion Specifiers.

However, I think I could do this:

set rec_duration='%{fps}*%q';

would that work? Going to go test it ... pardon me while I jump around like a 
maniac.

                == John ==

[cid:image002.jpg@01D4BF0E.5AF9BA70]<https://www.amazon.com/Getting-Started-React-VR-immersive-ebook/dp/B077VR6FMQ/>

John Gwinner .
M 310-227-9140
cto4you.com<http://cto4you.com/>

My book at 
Amazon<https://www.amazon.com/Getting-Started-React-VR-immersive-ebook/dp/B077VR6FMQ/>




-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 2216 bytes
Desc: image002.jpg

------------------------------

Message: 2
Date: Fri, 8 Feb 2019 09:58:42 +0200
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Is there a way to get duration of a
        recording?
Message-ID:
        <CACHTdwRzcR4CCVLF89N5GJn=hb0oj1px5wtcxkhm3v9tygv...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

%q is frame number of one second, ex, if your fps is 5, you will have
frames numbers 1,2,3,4 and 5 every second
The only reliable way to get the length of a movie is to run a script
with mediainfo command on_movie_end, example:

mediainfo 20190208-0750-207.mp4 | grep Duration | head -n 1 | awk '{
print $3 $4 }'

But if you need to do that inside motion, you should count all frames
send to the movie encoder and then calculate: TOTAL_FRAMES_SENT / FPS
= SECONDS


On Fri, Feb 8, 2019 at 4:13 AM John D. Gwinner <j...@gwinner.org> wrote:
>
> I?m inserting the metadata about a recorded event into a database.
>
>
>
> Is there a way to get the duration of the recorded video? I didn?t see it 
> under Conversion Specifiers.
>
>
>
> However, I think I could do this:
>
>
>
> set rec_duration='%{fps}*%q';
>
>
>
> would that work? Going to go test it ... pardon me while I jump around like a 
> maniac.
>
>
>
>                 == John ==
>
>
>
> John Gwinner .
> M 310-227-9140
> cto4you.com
>
>
> My book at Amazon
>
>
>
>
>
>
>
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user



------------------------------

Message: 3
Date: Fri, 8 Feb 2019 11:19:26 +0000
From: Dougie Nisbet <dou...@katsura.uk>
To: motion-user@lists.sourceforge.net
Subject: Re: [Motion-user] Is there a way to get duration of a
        recording?
Message-ID: <dec587bd-e0fa-6763-1566-0a9641a8e...@katsura.uk>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

On 08/02/2019 07:58, tosiara wrote:
> mediainfo 20190208-0750-207.mp4 | grep Duration | head -n 1 | awk '{
> print $3 $4 }'

What a fiendishly useful command! I've been using du to get file size 
and ffprobe to check for file corruption but mediainfo may do that too I 
guess.

Dougie

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 152, Issue 4
*******************************************

Reply via email to