Seeking for a method to remove sections of a video

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Seeking for a method to remove sections of a video

Carlos E. R.
Hi,

I'm new to this list.

I'm seeking for a tool to remove the start and end sections of a movie
recorded from TV, plus sections on the middle (commercials), in Linux. I
have tried several GUI tools and they are either too complex or lack
some crucial feature (like handling two language audio tracks). Some
tools are obsolete and abandoned, do not work (gopchop...).

I have found that ffmpeg can do the perfect conversion and cutting.

My problem is finding out the cut points.

Thus what I seek is a GUI Wrapper for ffmpeg that allows me to move
around the movie selecting start, end, and middle remove sections, and
just generate a script for ffmpeg that I can then edit and adjust with
my own options and run.

I have tried, for instance, ffmpegyag. Well, it is incapable of
visualizing my videos, so I can't select the cut points...


The closest I have is finding the points with Xine, then manually concot
the command line to generate sections, then concatenate using method in
https://trac.ffmpeg.org/wiki/Concatenate

I seek a GUI to automate generating the cut points in a list or script.

Thanks :-)

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Tom Horsley
On Sat, 17 Jun 2017 15:30:36 +0200
Carlos E. R. wrote:

> My problem is finding out the cut points.

I do all this on linux with ffmpeg, and I found the absolute
best way to get the cut points in units that are bound to be
correct is to use ffmpeg to transcode the original video
and add time codes to it. Then I can watch that video in
mplayer and use pause and singlestep to sneak up on the
precise time code I want, and type it into the input file
I use to do the cutting. See this example of the script
I use:

http://tomhorsley.com/game/ffmpeg.html#generatetimestamps

No doubt it would be more effective to hack ffplay to be
able to single step (and even save up 100 or so frames
so it can step backward) and write the timestamps directly
to a file without me having to copy them from the screen,
but that would require a lot more ambition than I have :-).
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Kieran O Leary
In reply to this post by Carlos E. R.
Hi,

On Sat, Jun 17, 2017 at 2:30 PM, Carlos E. R. <[hidden email]>
wrote:

> Hi,
>
> I'm new to this list.
>
> I'm seeking for a tool to remove the start and end sections of a movie
> recorded from TV, plus sections on the middle (commercials), in Linux. I
> have tried several GUI tools and they are either too complex or lack
> some crucial feature (like handling two language audio tracks). Some
> tools are obsolete and abandoned, do not work (gopchop...).
>

I haven't had much success with this tool as the codec choices are too
limited, but as you didn't mention which codecs you use, this might work:
https://github.com/mifi/lossless-cut
Not sure how it handles multiple audio tracks but I'd imagine a quick
change of the source code would rectify that.

-Kieran.
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
On 2017-06-17 18:33, Kieran O Leary wrote:

> Hi,
>
> On Sat, Jun 17, 2017 at 2:30 PM, Carlos E. R. <>
> wrote:
>
>> Hi,
>>
>> I'm new to this list.
>>
>> I'm seeking for a tool to remove the start and end sections of a movie
>> recorded from TV, plus sections on the middle (commercials), in Linux. I
>> have tried several GUI tools and they are either too complex or lack
>> some crucial feature (like handling two language audio tracks). Some
>> tools are obsolete and abandoned, do not work (gopchop...).
>>
>
> I haven't had much success with this tool as the codec choices are too
> limited, but as you didn't mention which codecs you use, this might work:
> https://github.com/mifi/lossless-cut
> Not sure how it handles multiple audio tracks but I'd imagine a quick
> change of the source code would rectify that.
I did not mention codecs, because the idea is just to generate a script with the correct cutpoints for use with ffmpeg:

ffmpeg -i "tvmovie.mpeg" -copyts -ss 00:01:00 -t 02:44:10 -map 0:0 -map 0:1 -map 0:2 -c:v libx264 -preset medium -vf crop=1886:802:0:140 -c:a copy "output.mkv"

I only need some GUI that generates the --ss and -t or -to, the rest I can do myself.

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
In reply to this post by Tom Horsley
On 2017-06-17 18:22, Tom Horsley wrote:

> On Sat, 17 Jun 2017 15:30:36 +0200
> Carlos E. R. wrote:
>
>> My problem is finding out the cut points.
>
> I do all this on linux with ffmpeg, and I found the absolute
> best way to get the cut points in units that are bound to be
> correct is to use ffmpeg to transcode the original video
> and add time codes to it. Then I can watch that video in
> mplayer and use pause and singlestep to sneak up on the
> precise time code I want, and type it into the input file
> I use to do the cutting. See this example of the script
> I use:
>
> http://tomhorsley.com/game/ffmpeg.html#generatetimestamps
>
> No doubt it would be more effective to hack ffplay to be
> able to single step (and even save up 100 or so frames
> so it can step backward) and write the timestamps directly
> to a file without me having to copy them from the screen,
> but that would require a lot more ambition than I have :-).
I can find more or less the cutpoints with xine. But typing them is
something I want to avoid. If I want to be accurate, I do one run with
"--preset ultrafast", correct the points, then do the final run.

But all that is a nuisance. Surely there is some GUI to do the adjustments.


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Frank Tetzel
In reply to this post by Carlos E. R.
> Hi,
>
> I'm new to this list.
>
> I'm seeking for a tool to remove the start and end sections of a movie
> recorded from TV, plus sections on the middle (commercials), in
> Linux. I have tried several GUI tools and they are either too complex
> or lack some crucial feature (like handling two language audio
> tracks). Some tools are obsolete and abandoned, do not work
> (gopchop...).
>
> I have found that ffmpeg can do the perfect conversion and cutting.
>
> My problem is finding out the cut points.
>
> Thus what I seek is a GUI Wrapper for ffmpeg that allows me to move
> around the movie selecting start, end, and middle remove sections, and
> just generate a script for ffmpeg that I can then edit and adjust with
> my own options and run.
>
> I have tried, for instance, ffmpegyag. Well, it is incapable of
> visualizing my videos, so I can't select the cut points...
>
>
> The closest I have is finding the points with Xine, then manually
> concot the command line to generate sections, then concatenate using
> method in https://trac.ffmpeg.org/wiki/Concatenate
>
> I seek a GUI to automate generating the cut points in a list or
> script.
>
> Thanks :-)
>

In the past I used avidemux for simple cutting jobs:
http://fixounet.free.fr/avidemux/

Not sure if it can handle multiple audio tracks.

This is a full GUI application, not a ffmpeg frontend that you want.
Just mentioning it...
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
On 2017-06-18 15:02, Frank Tetzel wrote:

>> Hi,
>>
>> I'm new to this list.
>>
>> I'm seeking for a tool to remove the start and end sections of a movie
>> recorded from TV, plus sections on the middle (commercials), in
>> Linux. I have tried several GUI tools and they are either too complex
>> or lack some crucial feature (like handling two language audio
>> tracks). Some tools are obsolete and abandoned, do not work
>> (gopchop...).
>>
>> I have found that ffmpeg can do the perfect conversion and cutting.
>>
>> My problem is finding out the cut points.
>>
>> Thus what I seek is a GUI Wrapper for ffmpeg that allows me to move
>> around the movie selecting start, end, and middle remove sections, and
>> just generate a script for ffmpeg that I can then edit and adjust with
>> my own options and run.
>>
>> I have tried, for instance, ffmpegyag. Well, it is incapable of
>> visualizing my videos, so I can't select the cut points...
>>
>>
>> The closest I have is finding the points with Xine, then manually
>> concot the command line to generate sections, then concatenate using
>> method in https://trac.ffmpeg.org/wiki/Concatenate
>>
>> I seek a GUI to automate generating the cut points in a list or
>> script.
>>
>> Thanks :-)
>>
>
> In the past I used avidemux for simple cutting jobs:
> http://fixounet.free.fr/avidemux/
>
> Not sure if it can handle multiple audio tracks.
It can't.

I was told that version 3 can do it, but I tried and couldn't.

> This is a full GUI application, not a ffmpeg frontend that you want.
> Just mentioning it...

Thanks anyway.

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Anatoly
In reply to this post by Carlos E. R.
> Hi,
>
> I'm new to this list.
>
> I'm seeking for a tool to remove the start and end sections of a movie
> recorded from TV, plus sections on the middle (commercials), in Linux. I
> have tried several GUI tools and they are either too complex or lack
> some crucial feature (like handling two language audio tracks). Some
> tools are obsolete and abandoned, do not work (gopchop...).
>
> I have found that ffmpeg can do the perfect conversion and cutting.
>
> My problem is finding out the cut points.
>
> Thus what I seek is a GUI Wrapper for ffmpeg that allows me to move
> around the movie selecting start, end, and middle remove sections, and
> just generate a script for ffmpeg that I can then edit and adjust with
> my own options and run.
>
> I have tried, for instance, ffmpegyag. Well, it is incapable of
> visualizing my videos, so I can't select the cut points...
>
>
> The closest I have is finding the points with Xine, then manually concot
> the command line to generate sections, then concatenate using method in
> https://trac.ffmpeg.org/wiki/Concatenate
>
> I seek a GUI to automate generating the cut points in a list or script.
>
> Thanks :-)
Do you know that mplayer has -edlout option:
-edlout <filename> (EDL only)
 Creates a new file and writes edit decision list (EDL) records to that
file.
 During  playback,  when the user hits 'i', an entry to skip over the last
two
 seconds of playback will be written to the file.  This  provides  a
starting
 point   from   which   the   user  can  fine-tune  EDL  entries  later.  
See
 DOCS/HTML/en/edl.html for details.


_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Moritz Barsnick
On Mon, Jun 19, 2017 at 17:28:06 +0300, [hidden email] wrote:
> > I seek a GUI to automate generating the cut points in a list or script.
> Do you know that mplayer has -edlout option:
> -edlout <filename> (EDL only)
>  Creates a new file and writes edit decision list (EDL) records to that
> file.

Recently (Sep 19, 2016), ffmpeg gained support for MP4 (or MOV?) "edit
lists". I.e. ffmpeg will take those into consideration when
transcoding. I haven't yet found a tool though which creates those edit
lists - that tool would be helpful for you (the original poster).

Moritz
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Eric Wilde
At 05:24 PM 6/19/2017 +0200, you wrote:

>On Mon, Jun 19, 2017 at 17:28:06 +0300, [hidden email] wrote:
> > Do you know that mplayer has -edlout option:
> > -edlout <filename> (EDL only)
> >  Creates a new file and writes edit decision list (EDL) records to that
> > file.
>
>Recently (Sep 19, 2016), ffmpeg gained support for MP4 (or MOV?) "edit
>lists". I.e. ffmpeg will take those into consideration when
>transcoding. I haven't yet found a tool though which creates those edit
>lists - that tool would be helpful for you (the original poster).

This is good news.  I have never been able to get the EDL feature of
mencoder to work.  The cuts are either too early or too late, when
applied to the original material that they were derived from.  If,
after endless fiddling with them (i.e. change the offset and
re-encode the input file, which is swell when it's an hour or two
long video), you finally get the cuts in the right place, the sound
is broken.

I spent a lot of time on this and finally gave up.

Not only that, but if you use mplayer to try to build the EDL, it is
like trying to swat a fly with a sledge hammer.  There is no way to
accurately position the cut to within a frame, here or there, so it's
just the luck of the draw.

Currently, since nothing works on Linux, I transcode the original
MPEG stream to an AVI stream using ffmpeg and then edit it on Windoze
using VirtualDub.  I know that this means re-encoding it twice, since
the cuts invariably never fall on a key frame, but Virtual Dub's
MPEG2 converter seems to lose it on large recorded videos such as an
hour's worth of HiDef TV (although it works fine for MPEG2 from
DVDs).  So, not the most optimal of solutions but this is the only
one I've found to be workable and reliable, so far.

It would be great if you figured out a better solution.

                                  Eric


_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

James Girotti
In reply to this post by Carlos E. R.
On Sun, Jun 18, 2017 at 9:50 AM, Carlos E. R. <[hidden email]>
wrote:

> On 2017-06-18 15:02, Frank Tetzel wrote:
> >> Hi,
> >>
> >> I'm new to this list.
> >>
> >> I'm seeking for a tool to remove the start and end sections of a movie
> >> recorded from TV, plus sections on the middle (commercials), in
> >> Linux. I have tried several GUI tools and they are either too complex
> >> or lack some crucial feature (like handling two language audio
> >> tracks). Some tools are obsolete and abandoned, do not work
> >> (gopchop...).
> >>
> >> I have found that ffmpeg can do the perfect conversion and cutting.
> >>
> >> My problem is finding out the cut points.
> >>
> >> Thus what I seek is a GUI Wrapper for ffmpeg that allows me to move
> >> around the movie selecting start, end, and middle remove sections, and
> >> just generate a script for ffmpeg that I can then edit and adjust with
> >> my own options and run.
> >>
> >> I have tried, for instance, ffmpegyag. Well, it is incapable of
> >> visualizing my videos, so I can't select the cut points...
> >>
> >>
> >> The closest I have is finding the points with Xine, then manually
> >> concot the command line to generate sections, then concatenate using
> >> method in https://trac.ffmpeg.org/wiki/Concatenate
> >>
> >> I seek a GUI to automate generating the cut points in a list or
> >> script.
> >>
> >> Thanks :-)
> >>
> >
> > In the past I used avidemux for simple cutting jobs:
> > http://fixounet.free.fr/avidemux/
> >
> > Not sure if it can handle multiple audio tracks.
>
> It can't.
>
> I was told that version 3 can do it, but I tried and couldn't.
>
> > This is a full GUI application, not a ffmpeg frontend that you want.
> > Just mentioning it...
>
>
I ultimately run avidemux as a frontend to ffmpeg. I have avidemux save
(copy video and audio) to a FIFO which is then the input for my ffmpeg
command. From my limited testing that way supports multiple audio tracks.
It's not a perfect setup because you have to end cuts on key-frames, not
usually a problem for me though (you can start your cut wherever). Also,
you can see the PTS for a given frame in avidemux. So in the rare-case I
can manually tell ffmpeg where to cut a given segment. Generally, this is
the workflow I use.

Someone suggested mplayer with "--edlout=your_filename". I haven't tried
it, but it could give very accurate times without having to type them
yourself. The problem I foresee is that you cannot do backward frame steps.
That would end up frustrating me because I would likely go a frame too far
and then not have an accurate time.

Back in the day when I ran MythTV it was very easy to this kind of thing.
Their interface for this is great in my opinion. Within a couple minutes, I
could have all the commercials from a movie marked with accuracy to a
single-frame. MythTV is a lot to setup and run if you just want to cut
commercials though.

Good luck and let us know what you decide to use.

-James
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
On 2017-06-19 19:35, James Girotti wrote:
> On Sun, Jun 18, 2017 at 9:50 AM, Carlos E. R. <>
> wrote:


> I ultimately run avidemux as a frontend to ffmpeg. I have avidemux save
> (copy video and audio) to a FIFO which is then the input for my ffmpeg
> command. From my limited testing that way supports multiple audio tracks.
> It's not a perfect setup because you have to end cuts on key-frames, not
> usually a problem for me though (you can start your cut wherever). Also,
> you can see the PTS for a given frame in avidemux. So in the rare-case I
> can manually tell ffmpeg where to cut a given segment. Generally, this is
> the workflow I use.

This is basically telling avidemux to do a copy of video and audio and
cutting at start/end points. At least on avidemux 2 it asks what audio
track to use, and totally ignores other tracks.

And avidemux 3 wants the other audio tracks to be fed from external files.

Another point, avidemux only can use two cut points, one at the start,
one at the end, so no, it can't be used.

I use avidemux to find the crop points, and I can use it to find the cut
points, and write all that to my command line of ffmpeg.



> Someone suggested mplayer with "--edlout=your_filename". I haven't tried
> it, but it could give very accurate times without having to type them
> yourself. The problem I foresee is that you cannot do backward frame steps.
> That would end up frustrating me because I would likely go a frame too far
> and then not have an accurate time.

If it can not go back it is useless.
With xine I can go forward and backwards, in step of different sizes.


> Back in the day when I ran MythTV it was very easy to this kind of thing.
> Their interface for this is great in my opinion. Within a couple minutes, I
> could have all the commercials from a movie marked with accuracy to a
> single-frame. MythTV is a lot to setup and run if you just want to cut
> commercials though.

Indeed.
> Good luck and let us know what you decide to use.

Well, so far, nothing.

I have to leave the original recordings untouched for years till I find
a solution.


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Tom Horsley
In reply to this post by Eric Wilde
On Mon, 19 Jun 2017 13:17:16 -0400
Eric Wilde wrote:

> It would be great if you figured out a better solution.

My solution works great on linux, it just takes forever
and involves more manual work than is optimal :-).
My algorithm:

1. One quick encoding to add the six decimal point
timestamps to the video as a text overlay.

2. Play that video in mencoder using pause, backup,
single step keycodes to sneak up on the exact timestamp
I want. Read the screen and copy the timestamps to a file.

3. A script that takes my timestamps and uses -ss and -t
options to slowly and painfully start from the beginning
of the file, reach the exact timestamp I want and transcode
a chunk of video of the right duration. (Trying to speed
this up by seeking to a keyframe that preceeds the
timestamp never seems to work right, I have to go through
the video linearly from the beginning).

4. Then a script that does a "concat" to merge all the
chunks into the final video.

Any shortcuts I tried never worked. Audio would get out
of sync, etc. The only part that consumes my time
is copying the timecodes into a file. Everything else
is automated and just involves waiting for the computer
to finish :-).
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

James Girotti
In reply to this post by Carlos E. R.
>
> > I ultimately run avidemux as a frontend to ffmpeg. I have avidemux save
> > (copy video and audio) to a FIFO which is then the input for my ffmpeg
> > command. From my limited testing that way supports multiple audio tracks.
> > It's not a perfect setup because you have to end cuts on key-frames, not
> > usually a problem for me though (you can start your cut wherever). Also,
> > you can see the PTS for a given frame in avidemux. So in the rare-case I
> > can manually tell ffmpeg where to cut a given segment. Generally, this is
> > the workflow I use.
>
> This is basically telling avidemux to do a copy of video and audio and
> cutting at start/end points. At least on avidemux 2 it asks what audio
> track to use, and totally ignores other tracks.
>
And avidemux 3 wants the other audio tracks to be fed from external files.
>

 From my testing avidemux(v2.6.8) will copy all tracks. No need to select
which to copy. Then you can let ffmpeg deal with which tracks to
transcode/keep, etc. Also, I might have forgotten to mention that I have
avidemux set to use MKV muxer for output.

Another point, avidemux only can use two cut points, one at the start,
> one at the end, so no, it can't be used.
>

To clarify: with avidemux you can only setup one cut at a time (starting
and ending points). Once you have the region selected, you can just delete
it, then mark the next region you want to delete/remove, repeat. The
interface is a little clunky, but this way you could cut out multiple
sections from one file.


> > Good luck and let us know what you decide to use.
>
> Well, so far, nothing.
>
> I have to leave the original recordings untouched for years till I find
> a solution.
>

Just to throw another one in the mix: comskip (http://www.kaashoek.com/comsk
ip/). I have been playing around with it. There is a SDL GUI that you can
review/adjust the results with after analysis. In the GUI, you can step
forward and back by single-frames. It supports different output formats
including EDL and XML. Major down-side is that I have not figured out how
to stop comskip from analyzing my file first (even telling it not to use
any detection methods).
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
In reply to this post by Tom Horsley
On 2017-06-19 20:03, Tom Horsley wrote:

> On Mon, 19 Jun 2017 13:17:16 -0400
> Eric Wilde wrote:
>
>> It would be great if you figured out a better solution.
>
> My solution works great on linux, it just takes forever
> and involves more manual work than is optimal :-).
> My algorithm:
>
> 1. One quick encoding to add the six decimal point
> timestamps to the video as a text overlay.
Oh.

> 2. Play that video in mencoder using pause, backup,
> single step keycodes to sneak up on the exact timestamp
> I want. Read the screen and copy the timestamps to a file.
>
> 3. A script that takes my timestamps and uses -ss and -t
> options to slowly and painfully start from the beginning
> of the file, reach the exact timestamp I want and transcode
> a chunk of video of the right duration. (Trying to speed
> this up by seeking to a keyframe that preceeds the
> timestamp never seems to work right, I have to go through
> the video linearly from the beginning).
>
> 4. Then a script that does a "concat" to merge all the
> chunks into the final video.
Yes...

> Any shortcuts I tried never worked. Audio would get out
> of sync, etc. The only part that consumes my time
> is copying the timecodes into a file. Everything else
> is automated and just involves waiting for the computer
> to finish :-).

Well, you need to do first one encode run to add the timestamps...

Which is an issue with my recordings, the timestamps in the source are
faulty, I have to use "-copyts".

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Seeking for a method to remove sections of a video

Carlos E. R.
In reply to this post by James Girotti
On 2017-06-19 22:56, James Girotti wrote:

>>
>>> I ultimately run avidemux as a frontend to ffmpeg. I have avidemux save
>>> (copy video and audio) to a FIFO which is then the input for my ffmpeg
>>> command. From my limited testing that way supports multiple audio tracks.
>>> It's not a perfect setup because you have to end cuts on key-frames, not
>>> usually a problem for me though (you can start your cut wherever). Also,
>>> you can see the PTS for a given frame in avidemux. So in the rare-case I
>>> can manually tell ffmpeg where to cut a given segment. Generally, this is
>>> the workflow I use.
>>
>> This is basically telling avidemux to do a copy of video and audio and
>> cutting at start/end points. At least on avidemux 2 it asks what audio
>> track to use, and totally ignores other tracks.
>>
> And avidemux 3 wants the other audio tracks to be fed from external files.
>>
>
>  From my testing avidemux(v2.6.8) will copy all tracks. No need to select
> which to copy. Then you can let ffmpeg deal with which tracks to
> transcode/keep, etc. Also, I might have forgotten to mention that I have
> avidemux set to use MKV muxer for output.
Trying avidemux 2.6.20 (my distro label it as avidemux3); initially says
"audio copy 0 tracks", and it is impossible to select the audio tracks
from the already loaded file:

On the audio menu there is a dialog with 4 audio lines. I enable track
one. First item is "add audio track" and automatically opens a file
dialog to enter the dialog. It refuses to simply take the audio from the
already loaded video file. So I can do nothing here.

I can select an start A point and an end point B, and the encoding would
go from A to B. Instead one can use Menu/Cut, and it deletes instantly
that section. I didn't know that trick! Thanks.

But the result has no audio at all.


Trying avidemux version 2.5.6 (my distro label it as avidemux2)

Says:  H.264 detected.
If the file is using B-frames as reference it can lead to a crash of
stuttering.
Avidemux can use another mode which is safe but YOU WILL LOSE FRAME ACCURACY
Do you want to use that mode?


I choose safe mode.

Now it says:

Multiple audio tracks.
The file you just loaded contains several audio tracks.
Go to Audio->Main Track to select the active one.



I can then select the "main" audio track. The secondary track has to be
selected from an external file, which means no way.


I try to select a section of the video, but at one point it goes to 100%
CPU on the four cores.

The same trick for removing sections works as in avidemux 3.


But... The result has jumpy video from the movie section, and audio from
the previous commercial section, ie, video and audio is not in sync.

I check it with "mediainfo" and there is only one audio track.



So avidemux is out, again :-(



>>> Good luck and let us know what you decide to use.
>>
>> Well, so far, nothing.
>>
>> I have to leave the original recordings untouched for years till I find
>> a solution.
>>
>
> Just to throw another one in the mix: comskip (http://www.kaashoek.com/comsk
> ip/). I have been playing around with it. There is a SDL GUI that you can
> review/adjust the results with after analysis. In the GUI, you can step
> forward and back by single-frames. It supports different output formats
> including EDL and XML. Major down-side is that I have not figured out how
> to stop comskip from analyzing my file first (even telling it not to use
> any detection methods).
Ah.

Well, first stop is that my distro doesn't have it.

Let's see...

«Comskip is a free mpeg commercial detector. It is a windows console
application that reads a mpeg file and analyses the content based on a
large amount of configurable parameters. After analysis it generates a
file in various possible formats containing the location of the
commercials inside the mpeg file. The formats include input files for
Personal Video applications like SageTV or GBPVR, interactive video
editors (VideoRedo, Cuttermaran,Mpeg2Schnitt...) command line video
cutters (mpgtx, cuttermaran, mencoder) and video players (zoomplayer,
mplayer, ...). Comskip can read MPEG and h.264 video and MPEG2, AC3 and
AAC audio from PS , TS and dvr-ms files upto HD resolution (max
2000x1200) at 25fps (PAL) and 29.97fps (NTSC). The h.264 and WTV version
is still in beta test and available for donators. Comskip can NOT read
copy protected recordings.  »

Ah, Windows console application. I use Linux. Maybe it runs under wine.
[...] Well, it does. Not runs, walks, it takes a lonnnnng time searching
for commercials.

[...]

Long like hours. :-(

[...]

I've let it run something like four hours and it still hasn't finished.
I'm aborting it, I have to sleep.


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


_______________________________________________
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".

signature.asc (188 bytes) Download Attachment
Loading...