ffmpeg tricks, timestamp-counter, slow motion, action camera

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg tricks, timestamp-counter, slow motion, action camera

Morten W. Petersen
Hi there.

I learned some new ffmpeg tricks today, I guess it's interesting for those
who
record videos:

http://blogologue.com/blog_entry?id=1533406754X26

It's about adding a timestamp-counter to a video, and slowing it down.

This was recorded using my phone, but I'm also biking around with an action
camera, where I now have quite a bit of footage.

Not sure what I'll do with that video, but ffmpeg has some stabilization
tools
for example.  Are there any approaches to working with video from such
cameras?

I've used different GUI video-tools until now, are there any front-ends to
ffmpeg that would make it easier (not a lot of repetitive commands or
waiting for the application to process them) to go through large amounts of
video and easily copy/cut segments and then discard the rest?

-Morten


--
Videos at https://www.youtube.com/user/TheBlogologue
Twittering at http://twitter.com/blogologue
Blogging at http://blogologue.com
Playing music at https://soundcloud.com/morten-w-petersen
Also playing music and podcasting here:
http://www.mixcloud.com/morten-w-petersen/
On Google+ here https://plus.google.com/107781930037068750156
On Instagram at https://instagram.com/morphexx/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Joel Roth
Morten W. Petersen wrote:
>...are there any front-ends to
> ffmpeg that would make it easier (not a lot of repetitive commands or
> waiting for the application to process them) to go through large amounts of
> video and easily copy/cut segments and then discard the rest?

Hi Morten,

I was interested in something similar, and wrote a utility
to trim, compress and rename video files in a directory.
It can trim segments out of one or source files.

It looks for a file CONTENTS with lines such as this:

# source files                     output filename    start time    end time
# ---------------                  ---------------    ----------    --------
  00000.MTS 00001.MTS 00002.MTS :  20180218-1 :        0    :       15:30

So you have to use another program to play the source files and note the cut
points in a text file. Then your run the script, fix the errors, run it again,
and come back later check the results.  Not sure if that suits your definition
of "easily"...

Here is the help page.

fftrim [-mn] [long options...]
        --source-dir STR  video sources directory
        --target-dir STR  target directory for completed files
        -n                simulate: show output commands but do not run them
        -m                simulate: show output commands omitting file checks

I will post/github code if there is interest.

cheers,


--
Joel Roth
 

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Morten W. Petersen
Den man. 6. aug. 2018, 09.46 skrev Joel Roth <[hidden email]>:

> Morten W. Petersen wrote:
> >...are there any front-ends to
> > ffmpeg that would make it easier (not a lot of repetitive commands or
> > waiting for the application to process them) to go through large amounts
> of
> > video and easily copy/cut segments and then discard the rest?
>
> Hi Morten,
>

Hey Joel.


> I was interested in something similar, and wrote a utility
> to trim, compress and rename video files in a directory.
> It can trim segments out of one or source files.
>
> It looks for a file CONTENTS with lines such as this:
>
> # source files                     output filename    start time    end
> time
> # ---------------                  ---------------    ----------
> --------
>   00000.MTS 00001.MTS 00002.MTS :  20180218-1 :        0    :       15:30
>
> So you have to use another program to play the source files and note the
> cut
> points in a text file. Then your run the script, fix the errors, run it
> again,
> and come back later check the results.  Not sure if that suits your
> definition
> of "easily"...
>
> Here is the help page.
>
> fftrim [-mn] [long options...]
>         --source-dir STR  video sources directory
>         --target-dir STR  target directory for completed files
>         -n                simulate: show output commands but do not run
> them
>         -m                simulate: show output commands omitting file
> checks
>
> I will post/github code if there is interest.
>

I think this is interesting, and it shouldn't be difficult to write a
frontend to it.

If you post the code on GitHub, it would make it easier for someone to
write a GUI.

-Morten

>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Joel Roth
Morten W. Petersen wrote:

> Den man. 6. aug. 2018, 09.46 skrev Joel Roth <[hidden email]>:
>
> > Morten W. Petersen wrote:
> > >...are there any front-ends to
> > > ffmpeg that would make it easier (not a lot of repetitive commands or
> > > waiting for the application to process them) to go through large amounts
> > of
> > > video and easily copy/cut segments and then discard the rest?
> >
> > Hi Morten,
> >
>
> Hey Joel.
>
>
> > I was interested in something similar, and wrote a utility
> > to trim, compress and rename video files in a directory.
> > It can trim segments out of one or source files.
> >
>
> I think this is interesting, and it shouldn't be difficult to write a
> frontend to it.
>
> If you post the code on GitHub, it would make it easier for someone to
> write a GUI.
 
Okay, here it is, slightly cleaned up, and possibly added a
couple bugs :-) One thing I notice is the output files
are hardcoded to mp4.

https://github.com/bolangi/fftrim

cheers,

Joel

> -Morten
>
> >
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

--
Joel Roth
 

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Morten W. Petersen
Den man. 6. aug. 2018, 23.52 skrev Joel Roth <[hidden email]>:

> Morten W. Petersen wrote:
> >
> > I think this is interesting, and it shouldn't be difficult to write a
> > frontend to it.
> >
> > If you post the code on GitHub, it would make it easier for someone to
> > write a GUI.
>
> Okay, here it is, slightly cleaned up, and possibly added a
> couple bugs :-) One thing I notice is the output files
> are hardcoded to mp4.
>
> https://github.com/bolangi/fftrim


Ah, Perl, OK. 🙂

Well I guess one can write a quick wrapper and GUI in Python, and then call
fftrim.

It is file processing after all, and Perl should be good at that, I just
never took the time to learn Perl.

-Morten
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Joel Roth
Morten W. Petersen wrote:

> Den man. 6. aug. 2018, 23.52 skrev Joel Roth <[hidden email]>:
>
> > Morten W. Petersen wrote:
> > >
> > > I think this is interesting, and it shouldn't be difficult to write a
> > > frontend to it.
> > >
> > > If you post the code on GitHub, it would make it easier for someone to
> > > write a GUI.
> >
> > Okay, here it is, slightly cleaned up, and possibly added a
> > couple bugs :-) One thing I notice is the output files
> > are hardcoded to mp4.
> >
> > https://github.com/bolangi/fftrim
>
>
> Ah, Perl, OK. 🙂

Better than okay, it's wonderful! Changed my life, it has.

> Well I guess one can write a quick wrapper and GUI in Python, and then call
> fftrim.

In general people would want to click on a timeline to mark
their cuts. Isn't creating a GUI for that a pretty big job?

> It is file processing after all, and Perl should be good at that, I just
> never took the time to learn Perl.

Search and substitute functions in perl use syntax like vi,
ed, sed and awk. Perl regular expression syntax also began
life elsewhere, so not all new but yes there is a lot
mastering to a language.  I did try some python recently,
and found it to be fun. The indenting reminds me of working
with YAML.

have fun,

joel

> -Morten
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

--
Joel Roth
 

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Morten W. Petersen
On Wed, Aug 8, 2018 at 8:50 AM, Joel Roth <[hidden email]> wrote:

> Morten W. Petersen wrote:
>
[...]

> > Ah, Perl, OK. 🙂
>
> Better than okay, it's wonderful! Changed my life, it has.
>

OK.  Good for you. :)


>
> > Well I guess one can write a quick wrapper and GUI in Python, and then
> call
> > fftrim.
>
> In general people would want to click on a timeline to mark
> their cuts. Isn't creating a GUI for that a pretty big job?
>

I guess that depends on how focused you are, and how lazy/smart you are.

Python has bindings for GUI widgets for example.

As for me, I have a lot of video stored on in Google Drive.  This is because
I don't have a lot of local storage.

I was thinking about creating a local NAS/fileserver, but I've had to
prioritize
other things in life.

But say I had access to a server, and had videos stored there.  Then I could
find some streaming server, and create a small trimming client in for
example
HTML, Javascript and CSS.

I just need to store the times locally, then these could be pushed back to
the
server, which runs fftrim in batch mode and that's that.

Or, I could skip fftrim, stream videos from my Google Drive, save the video
I want to keep locally, delete the raw footage and then upload the video I
want to preserve.

But anyway, I have a lot of things to think about now, so I'm not going to
entertain the idea of creating a GUI any further at this point.



> > It is file processing after all, and Perl should be good at that, I just
> > never took the time to learn Perl.
>
> Search and substitute functions in perl use syntax like vi,
> ed, sed and awk. Perl regular expression syntax also began
> life elsewhere, so not all new but yes there is a lot
> mastering to a language.  I did try some python recently,
> and found it to be fun. The indenting reminds me of working
> with YAML.
>

Ah yes.  I've played with Linux since maybe the middle of the
nineties, and never really learned sed, awk etc. at any advanced
level.

The commando-line, with pipes etc. is powerful and convenient.

-Morten


--
Videos at https://www.youtube.com/user/TheBlogologue
Twittering at http://twitter.com/blogologue
Blogging at http://blogologue.com
Playing music at https://soundcloud.com/morten-w-petersen
Also playing music and podcasting here:
http://www.mixcloud.com/morten-w-petersen/
On Google+ here https://plus.google.com/107781930037068750156
On Instagram at https://instagram.com/morphexx/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg tricks, timestamp-counter, slow motion, action camera

Rob Hallam-2
On 8 August 2018 at 14:00, Morten W. Petersen <[hidden email]> wrote:

> Python has bindings for GUI widgets for example.

There also exists python bindings for ffmpeg, if you haven't found
them already.

For example:

https://github.com/kkroening/ffmpeg-python

Combining the two should get you somewhere quickly.

Good luck!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".