Re: [FFmpeg-user] How to extract m3u8 stream URL from webpage with 2 players?

2022-01-09 Thread Reino Wijnsma
On 2022-01-09T17:39:05+0100, Bo Berglund  wrote:
> But I found its GitHub home so I could check out the sources after seeing that
> it as FreePascal/Lazarus to use as dev tools and that is exactly what I use
> daily. :)
> https://github.com/benibela/xidel
>
> But I came to a halt anyway since the sources has layer after layer of
> dependencies, which are not explained in the readme file.
>
> The first dependency on "internettools" could be resolved since the same 
> author
> had this also on his GitHub:
> https://github.com/benibela/internettools
>
> But then a bunch of other dependencies appeared which I decided were too much 
> to
> hunt down.
> So I had to give up
> Too bad.

I'm not sure why you're trying to compile Xidel from (the wrong) source when 
you can easily grab binaries from 
https://sourceforge.net/projects/videlibri/files/Xidel/ (binaries from the 
development map are recommended).

But if you insist...

http://videlibri.sourceforge.net/xidel.html:
> The source history is stored in a mercurial repository 
>  together with the 
> VideLibri source and dependencies, licensed as GPLv3+. There are mirrors on 
> GitHub  and GitLab 
> . _These mirrors have the Xidel source 
> only_, in order to compile it you need to download the dependencies from 
> their own repositories first. Or use the above source tarball, which also 
> contains dependencies.

tarball --> programs/internet/xidel/README.md 
:
> You can compile it by calling build.sh

$ curl -OL 
"https://sourceforge.net/projects/videlibri/files/Xidel/Xidel%20development/xidel-0.9.9.20211225.8285.b90e197a0a24.src.tar.gz;

$ tar -xf xidel-0.9.9.20211225.8285.b90e197a0a24.src.tar.gz

$ xidel-0.9.9.20211225.8285.b90e197a0a24-src/programs/internet/xidel/build.sh -s

This should be enough.
However, r8285 is not the latest dev-build. r8308 is, but... it's missing a 
dependency . :D

-- 
Reino

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Michael Koch

Am 09.01.2022 um 21:12 schrieb Steven Kan:



On Jan 9, 2022, at 9:28 AM, Michael Koch  wrote:

Am 09.01.2022 um 18:14 schrieb Steven Kan:

I’m a little late to this party, and it’s not strictly an ffmpeg solution, but 
have a look at Lossless Cut:

https://mifi.no/losslesscut/

It does exactly what you want, graphically, with the option to cut at key 
frames (or not),

Are you sure? I saw this note at the bottom:
"This app is not for exact cutting. Start cut time will be "rounded" to the nearest 
previous keyframe, which may be a fraction of a second before your desired cut point, or up to 
several seconds, depending on the encoding."

Michael

When you actually click Export, it pops up another dialog box that allows you 
specify “keyframe cut” or “normal cut.”


Yes, but it also says
"Normal cut: Accurate time but could leave an empty portion at the 
beginning of the video. Equiv to ffmpeg -i -ss ..."


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Moritz Barsnick
On Sun, Jan 09, 2022 at 09:59:24 -0500, John Van Ostrand wrote:
> I wonder if you could use netcat to direct the stream from Stdout to a
> network socket then use netcat at the other end to put it into the Stdin of
> the remote ffmpeg.

You don't need netcat, ffmpeg has TCP, UDP, HTTP (and further)
streaming options built in.

The "nut" container is a good choice for streaming for ffmpeg to
ffmpeg, it can handle quite a lot of codecs.

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Convert to XAVC

2022-01-09 Thread Moritz Barsnick
On Thu, Jan 06, 2022 at 16:28:26 -0800, Hanna Frangiyyeh wrote:
> Any idea what filter is to be used to convert to XAVC mxf format.

As far as I can tell, the x264 encoder has an xAVC-compatible mode.
Check the x264 option "avcintra-flavor" with the value "sony".

Cheers,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Steven Kan


> On Jan 9, 2022, at 9:28 AM, Michael Koch  wrote:
> 
> Am 09.01.2022 um 18:14 schrieb Steven Kan:
>> I’m a little late to this party, and it’s not strictly an ffmpeg solution, 
>> but have a look at Lossless Cut:
>> 
>> https://mifi.no/losslesscut/
>> 
>> It does exactly what you want, graphically, with the option to cut at key 
>> frames (or not),
> 
> Are you sure? I saw this note at the bottom:
> "This app is not for exact cutting. Start cut time will be "rounded" to the 
> nearest previous keyframe, which may be a fraction of a second before your 
> desired cut point, or up to several seconds, depending on the encoding."
> 
> Michael

When you actually click Export, it pops up another dialog box that allows you 
specify “keyframe cut” or “normal cut.”

I haven’t done any comparison testing, since keyframe is almost always good 
enough for my limited needs. 

But give it a try! It’s free!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Leo Butler via ffmpeg-user
Simon van Bernem via ffmpeg-user  writes:

>  Those look very promising, but my version of ffmpeg doesn'tknow the segment 
> filter. I found it in the changelog for version5, but the website lets me 
> only download 4.4 and the github'slast release is 3.0 from 2016. Is the 
> segment filter not availablefor the general public yet?
> Regards,Simon
>
> Am Sonntag, 9. Januar 2022, 15:53:27 MEZ hat Nicolas George 
>  Folgendes geschrieben:  
>  
>  Simon van Bernem via ffmpeg-user (12022-01-08):
>> Hi,
>> I am trying to remove parts of a video (with audio) using the select
>> filter. I constructed this command to remove seconds 20-25:
>> 
>> (newlines only for readability)
>> 
>> ffmpeg -i input.mkv
>>   -vf "select='1-between(t,20,25)', setpts=N/FRAME_RATE/TB"
>>   -af "aselect='1-between(t,20,25)', asetpts=N/SR/TB" output.mkv
>> 
>> This works great, except that when I use multiple "between" clauses
>> to discard multiple sections, audio and video will start to get out of
>> sync.
>
> The select filter is very generic, and therefore not very robust. It
> does not update the timestamps, hence the need to update them
> afterwards. Furthermore, it works with whole frames, which can
> accumulate for audio.
>
> For your use case, consider the segment and concat filters.

If you do not want any re-coding, then I suggest using the concat
muxer. I use this for cutting editing screencasts before adding chapter
markers, etc., and doing a transcoding.

See section 20.5 of the ffmpeg manual.

https://ffmpeg.org/ffmpeg-all.html#toc-concat-1

Otherwise, as Nicolas says, use the concat filter with multiple inputs,
e.g.

ffmpeg -ss time1 -t duration1 input1 -ss time2 -t duration2 input2
...concat=n=2:v=1:a=1...

Leo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Anyone using FFplayout?

2022-01-09 Thread Matt C
Thanks, looking for 24/7 video play out on a Decklink card..


From: ffmpeg-user  on behalf of Carl Zwanzig 

Sent: Sunday, January 9, 2022 7:01 PM
To: ffmpeg-user@ffmpeg.org 
Subject: Re: [FFmpeg-user] Anyone using FFplayout?

On 1/6/2022 11:52 AM, Matt C wrote:
> I have it installed from the Docker set up but cannot get anything to
> play from the playlist/ gui.  Is there any sort or forum or anything on
> setting it up?
It doesn't look like it's ready for turn-key use.

If you're looking for something to do the playout for a radio station or
cable channel, there seem to be a fair number of open-source solutions for
that which are in productive use, most of them based on the ffmpeg libraries.

Late,r

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Anyone using FFplayout?

2022-01-09 Thread Carl Zwanzig

On 1/6/2022 11:52 AM, Matt C wrote:

I have it installed from the Docker set up but cannot get anything to
play from the playlist/ gui.  Is there any sort or forum or anything on
setting it up?

It doesn't look like it's ready for turn-key use.

If you're looking for something to do the playout for a radio station or 
cable channel, there seem to be a fair number of open-source solutions for 
that which are in productive use, most of them based on the ffmpeg libraries.


Late,r

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Michael Koch

Am 09.01.2022 um 18:14 schrieb Steven Kan:

I’m a little late to this party, and it’s not strictly an ffmpeg solution, but 
have a look at Lossless Cut:

https://mifi.no/losslesscut/

It does exactly what you want, graphically, with the option to cut at key 
frames (or not),


Are you sure? I saw this note at the bottom:
"This app is not for exact cutting. Start cut time will be "rounded" to 
the nearest previous keyframe, which may be a fraction of a second 
before your desired cut point, or up to several seconds, depending on 
the encoding."


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Rob Hallam
On Sun, 9 Jan 2022 at 17:15, Steven Kan  wrote:
> I’m a little late to this party, and it’s not strictly an ffmpeg solution, 
> but have a look at Lossless Cut:
> https://mifi.no/losslesscut/
> It does exactly what you want, graphically, with the option to cut at key 
> frames (or not),

Interesting suggestion! Not OP -- it may well suit them just grand --
but this caught my eye as a caveat:

> Known issues & limitations
> Cutting times are not accurate! Start cut time will be "rounded" to the 
> nearest previous keyframe. This means that you often have move the start cut 
> time to few frames after the desired keyframe.

(more snipped, see:
https://github.com/mifi/lossless-cut#known-issues--limitations)

It seems that it might do OP just grand though, like a wrapper script
around a bunch of `-c copy` and concatenation invocations.

Cheers,
Rob
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Steven Kan
I’m a little late to this party, and it’s not strictly an ffmpeg solution, but 
have a look at Lossless Cut:

https://mifi.no/losslesscut/

It does exactly what you want, graphically, with the option to cut at key 
frames (or not), includes audio, can concatenate, is free, and uses ffmpeg 
under the hood, thus making it on-topic for this list. 
--
Sent from my iPhone
Steven Kan
+1-818-620-3062 (m)

> On Jan 9, 2022, at 3:48 AM, Simon van Bernem via ffmpeg-user 
>  wrote:
> 
> 
> 
> My specific usecase is removing multiple parts
> 
> of a video. So e.g. I want to "remove the part
> 
> from 0:10 to 0:15 and the part from 1:15 to 4:10 and the part from 10:00 to 
> the end".
> 
> How would that look like with this approach?
> 
> Can you have multiple -ss and -to pairs?
> 
> Can you express to discard a section, not keep
> 
> it?
> 
> 
> 
> Regards,
> 
> Simon
> 
> 
> 
> 
> 
> 
> 
> 
>> 
>> Am 09.01.2022 in 12:39, Stephen Liu via ffmpeg-user  
>>   schrieb:
>> 
>> 
>> Hi, 
>> I run following command on Terminal to trim a section of the video (for VCD 
>> video):- 
>> $ ffmpeg -i imput.VOB -target pal-vcd -ss 00:02:10 -to 00:03:18 -c:v copy 
>> -c:a copy output.VOB 
>> 
>> -ss starting time (hrs:min:sec) 
>> -to stop time (hrs:min:sec) 
>> 
>> This command line works for me seamlessly. 
>> 
>> Regards 
>> 
>> On Sunday, January 9, 2022, 06:43:39 PM GMT+8, MacFH - C E Macfarlane - News 
>>wrote: 
>> 
>>> On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote: 
>>> 
>>> On Sat, Jan 08, 2022 at 08:20:46PM +, MacFH - C E Macfarlane - News 
>>> wrote: 
 
 To select parts of a video, I use ... 
 
 FFMPEG -ss-i-codec copy -to   
 
 ... however it's tedious, because with this method the video will only 
 break 
 at certain points between compression units (can't remember the proper 
 terminology), and it can take some experimentation to find the precise 
 timing of these to get the audio right as well, and often, because of the 
 way the compression works, the first extracted frame is often an unwanted 
 last frame of a previous scene. 
 
 I have long lamented that FFMPEG doesn't make this both easier and to 
 allow 
 greater resolution, if necessary recreating the start and end compression 
 units to get the exact timing wanted. 
>>> 
>>> If you get rid of the "-codec copy" you can have any precision you'd like. 
>> 
>> But the entire video will be re-encoded, which is undesirable because, 
>> as the codecs use lossy compression, there will be further degradation 
>> of the entire video clip just gain some precision at each end. 
>> ___ 
>> ffmpeg-user mailing list 
>> ffmpeg-user@ffmpeg.org 
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user 
>> 
>> To unsubscribe, visit link above, or email 
>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". 
>> 
>> ___ 
>> ffmpeg-user mailing list 
>> ffmpeg-user@ffmpeg.org 
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user 
>> 
>> To unsubscribe, visit link above, or email 
>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". 
>> 
> 
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to extract m3u8 stream URL from webpage with 2 players?

2022-01-09 Thread Rob Hallam
On Sun, 9 Jan 2022 at 16:39, Bo Berglund  wrote:
> Well, I am on Ubuntu so Windows stuff is not useful...

In a pinch, a VM or wine can sometimes be of use.

> So I had to give up
> Too bad.

Did you try their .deb?

https://www.videlibri.de/xidel.html#downloads

Also listed in their GitHub releases:

https://github.com/benibela/xidel/releases/tag/Xidel_0.9.8

Or did that also lead to unresolvable dependencies?

Cheers
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to extract m3u8 stream URL from webpage with 2 players?

2022-01-09 Thread Bo Berglund
On Sat, 8 Jan 2022 20:24:35 +0100, Reino Wijnsma  wrote:

>> This tool xidel you use, from where is that?
>> How can it be installed?
>https://www.videlibri.de/xidel.html
>
>I'm using the Windows binary in a Bash environment, but last I heared quite 
>some 
>Linux packagemanagers also have it, though most likely not the latest build 
>.
>

Well, I am on Ubuntu so Windows stuff is not useful...
But I found its GitHub home so I could check out the sources after seeing that
it as FreePascal/Lazarus to use as dev tools and that is exactly what I use
daily. :)
https://github.com/benibela/xidel

But I came to a halt anyway since the sources has layer after layer of
dependencies, which are not explained in the readme file.

The first dependency on "internettools" could be resolved since the same author
had this also on his GitHub:
https://github.com/benibela/internettools

But then a bunch of other dependencies appeared which I decided were too much to
hunt down.
So I had to give up
Too bad.


-- 
Bo Berglund
Developer in Sweden

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Phil Rhodes via ffmpeg-user
 I tried to do something a bit like this some years ago for audio only. Don't 
ask me for the details as it's been a while, but we tried several solutions and 
never really got it to work. This was under Windows.
The idea was to create a wireless free space link using off the shelf wifi gear.
P
On Sunday, 9 January 2022, 14:59:45 GMT, John Van Ostrand 
 wrote:  
 
 On Sun., Jan. 9, 2022, 8:45 a.m. Adam Nielsen via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> > >  [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data
> > >  stream and may not be recognized upon reading.
> >
> > You cannot mux random data into mpegts, this is not a limitation of
> FFmpeg.
> >
> > A small change to the FFmpeg source code probably makes possible what
> > you want, but since the resulting stream does not conform to any
> > specification, the developers will not do it.
>
> It doesn't have to be MPEG-TS, the only thing receiving this stream
> will be another FFmpeg instance, so it doesn't worry me whether it
> conforms to any standards or not, all I need is something FFmpeg can
> send to itself over UDP.
>
> Since FFmpeg can read raw compressed video from a file in a number of
> different codecs, I assumed it could do the same via UDP, but perhaps
> not.
>

I wonder if you could use netcat to direct the stream from Stdout to a
network socket then use netcat at the other end to put it into the Stdin of
the remote ffmpeg.

>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Simon van Bernem via ffmpeg-user
 Those look very promising, but my version of ffmpeg doesn'tknow the segment 
filter. I found it in the changelog for version5, but the website lets me only 
download 4.4 and the github'slast release is 3.0 from 2016. Is the segment 
filter not availablefor the general public yet?
Regards,Simon

Am Sonntag, 9. Januar 2022, 15:53:27 MEZ hat Nicolas George 
 Folgendes geschrieben:  
 
 Simon van Bernem via ffmpeg-user (12022-01-08):
> Hi,
> I am trying to remove parts of a video (with audio) using the select
> filter. I constructed this command to remove seconds 20-25:
> 
> (newlines only for readability)
> 
> ffmpeg -i input.mkv
>   -vf "select='1-between(t,20,25)', setpts=N/FRAME_RATE/TB"
>   -af "aselect='1-between(t,20,25)', asetpts=N/SR/TB" output.mkv
> 
> This works great, except that when I use multiple "between" clauses
> to discard multiple sections, audio and video will start to get out of
> sync.

The select filter is very generic, and therefore not very robust. It
does not update the timestamps, hence the need to update them
afterwards. Furthermore, it works with whole frames, which can
accumulate for audio.

For your use case, consider the segment and concat filters.

Regards,

-- 
  Nicolas George
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread John Van Ostrand
On Sun., Jan. 9, 2022, 8:45 a.m. Adam Nielsen via ffmpeg-user, <
ffmpeg-user@ffmpeg.org> wrote:

> > >   [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data
> > >   stream and may not be recognized upon reading.
> >
> > You cannot mux random data into mpegts, this is not a limitation of
> FFmpeg.
> >
> > A small change to the FFmpeg source code probably makes possible what
> > you want, but since the resulting stream does not conform to any
> > specification, the developers will not do it.
>
> It doesn't have to be MPEG-TS, the only thing receiving this stream
> will be another FFmpeg instance, so it doesn't worry me whether it
> conforms to any standards or not, all I need is something FFmpeg can
> send to itself over UDP.
>
> Since FFmpeg can read raw compressed video from a file in a number of
> different codecs, I assumed it could do the same via UDP, but perhaps
> not.
>

I wonder if you could use netcat to direct the stream from Stdout to a
network socket then use netcat at the other end to put it into the Stdin of
the remote ffmpeg.

>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Nicolas George
Simon van Bernem via ffmpeg-user (12022-01-08):
> Hi,
> I am trying to remove parts of a video (with audio) using the select
> filter. I constructed this command to remove seconds 20-25:
> 
> (newlines only for readability)
> 
> ffmpeg -i input.mkv
>   -vf "select='1-between(t,20,25)', setpts=N/FRAME_RATE/TB"
>   -af "aselect='1-between(t,20,25)', asetpts=N/SR/TB" output.mkv
> 
> This works great, except that when I use multiple "between" clauses
> to discard multiple sections, audio and video will start to get out of
> sync.

The select filter is very generic, and therefore not very robust. It
does not update the timestamps, hence the need to update them
afterwards. Furthermore, it works with whole frames, which can
accumulate for audio.

For your use case, consider the segment and concat filters.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Simon van Bernem via ffmpeg-user
 Hi Stephen,
I already know about this approach of doing it, but was specificallytrying to 
get the select filter working because its syntax is so muchsimpler. It seems 
like that isn't gonna work and solutions like thisare the goto, which makes me 
a little sad because that is quite acomplex expression for a quite simple 
thing. Thanks for sharinganyway!

Simon

Am Sonntag, 9. Januar 2022, 15:13:56 MEZ hat Stephen Liu via ffmpeg-user 
 Folgendes geschrieben:  
 
  Hi Simon,
Try the command on following document, using the trim filter;

Commands to manipulate a video ->
Remove video segments (without audio)
https://transang.me/practical-ffmpeg-commands-to-manipulate-a-video/#:~:text=setpts%20%3A%20change%20the%20PTS%20(presentation,timestamp)%20of%20the%20frame%20filter.=STARTPTS%20%3A%20The%20PTS%20of%20the%20first%20frame.

It has a very detailed explanation.
If it works, please come back sharing your result to others
Stephen


    On Sunday, January 9, 2022, 08:38:32 PM GMT+8, Rob Hallam 
 wrote:  
 
 On Sun, 9 Jan 2022 at 11:34, Michael Koch  wrote:

> Is it possible to re-encode only the beginning and the end, and use
> -codec copy for the central part?

How apropos! *

I've been trying to do essentially this for years- it was the reason I
subscribed to and posted to this list initially. It would be great to
have a mode which has the frame-exact + sync nature of a re-encode,
without the re-encode!

The trouble I've run into the few times I've tried it is that when I
try and glue the parts back together via concat, things do not work
nicely. Perhaps if there were a way to replicate all the codec
properties of the original stream when re-encoding, it might work; but
it's also possible that something else like PTS would throw it off.

Rob

* typed and posted while waiting on ffmpeg to visually "losslessly"
re-encode so that I can do a frame exact cut, currently at 0.601x
realtime
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Stephen Liu via ffmpeg-user
 Hi Simon,
Try the command on following document, using the trim filter;

Commands to manipulate a video ->
Remove video segments (without audio)
https://transang.me/practical-ffmpeg-commands-to-manipulate-a-video/#:~:text=setpts%20%3A%20change%20the%20PTS%20(presentation,timestamp)%20of%20the%20frame%20filter.=STARTPTS%20%3A%20The%20PTS%20of%20the%20first%20frame.

It has a very detailed explanation.
If it works, please come back sharing your result to others
Stephen


On Sunday, January 9, 2022, 08:38:32 PM GMT+8, Rob Hallam 
 wrote:  
 
 On Sun, 9 Jan 2022 at 11:34, Michael Koch  wrote:

> Is it possible to re-encode only the beginning and the end, and use
> -codec copy for the central part?

How apropos! *

I've been trying to do essentially this for years- it was the reason I
subscribed to and posted to this list initially. It would be great to
have a mode which has the frame-exact + sync nature of a re-encode,
without the re-encode!

The trouble I've run into the few times I've tried it is that when I
try and glue the parts back together via concat, things do not work
nicely. Perhaps if there were a way to replicate all the codec
properties of the original stream when re-encoding, it might work; but
it's also possible that something else like PTS would throw it off.

Rob

* typed and posted while waiting on ffmpeg to visually "losslessly"
re-encode so that I can do a frame exact cut, currently at 0.601x
realtime
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Adam Nielsen via ffmpeg-user
> >   [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data
> >   stream and may not be recognized upon reading.  
> 
> You cannot mux random data into mpegts, this is not a limitation of FFmpeg.
> 
> A small change to the FFmpeg source code probably makes possible what
> you want, but since the resulting stream does not conform to any
> specification, the developers will not do it.

It doesn't have to be MPEG-TS, the only thing receiving this stream
will be another FFmpeg instance, so it doesn't worry me whether it
conforms to any standards or not, all I need is something FFmpeg can
send to itself over UDP.

Since FFmpeg can read raw compressed video from a file in a number of
different codecs, I assumed it could do the same via UDP, but perhaps
not.

Thanks,
Adam.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Gyan Doshi




On 2022-01-09 03:36 pm, Carl Eugen Hoyos wrote:

Am Sa., 8. Jan. 2022 um 07:54 Uhr schrieb Adam Nielsen via ffmpeg-user
:


   [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data
   stream and may not be recognized upon reading.

You cannot mux random data into mpegts, this is not a limitation of FFmpeg.


Well, one can. The muxer already doesn't reject any codec as the warning 
shows.




A small change to the FFmpeg source code probably makes possible what
you want, but since the resulting stream does not conform to any
specification, the developers will not do it.



I added an option -recast_ media to ffmpeg in 79ebdbb9b9
With this, the user can manually assign a decoder and process the 
packets in such a stream.


e.g.

ffmpeg -recast_media -c:0 mjpeg -iudp://[ff01:1::1]:5004 -map 0:v ...



Regards,
Gyan
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Rob Hallam
On Sun, 9 Jan 2022 at 11:34, Michael Koch  wrote:

> Is it possible to re-encode only the beginning and the end, and use
> -codec copy for the central part?

How apropos! *

I've been trying to do essentially this for years- it was the reason I
subscribed to and posted to this list initially. It would be great to
have a mode which has the frame-exact + sync nature of a re-encode,
without the re-encode!

The trouble I've run into the few times I've tried it is that when I
try and glue the parts back together via concat, things do not work
nicely. Perhaps if there were a way to replicate all the codec
properties of the original stream when re-encoding, it might work; but
it's also possible that something else like PTS would throw it off.

Rob

* typed and posted while waiting on ffmpeg to visually "losslessly"
re-encode so that I can do a frame exact cut, currently at 0.601x
realtime
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Simon van Bernem via ffmpeg-user
 
 
My specific usecase is removing multiple parts
 
of a video. So e.g. I want to "remove the part
 
from 0:10 to 0:15 and the part from 1:15 to 4:10 and the part from 10:00 to the 
end".
 
How would that look like with this approach?
 
Can you have multiple -ss and -to pairs?
 
Can you express to discard a section, not keep
 
it?
 

 
Regards,
 
Simon
 

 

 
 
 
 
>  
> Am 09.01.2022 in 12:39, Stephen Liu via ffmpeg-user   
>  schrieb:
>  
>  
>  Hi, 
> I run following command on Terminal to trim a section of the video (for VCD 
> video):- 
> $ ffmpeg -i imput.VOB -target pal-vcd -ss 00:02:10 -to 00:03:18 -c:v copy 
> -c:a copy output.VOB 
>
> -ss starting time (hrs:min:sec) 
> -to stop time (hrs:min:sec) 
>
> This command line works for me seamlessly. 
>
> Regards 
>
>  On Sunday, January 9, 2022, 06:43:39 PM GMT+8, MacFH - C E Macfarlane - News 
>wrote: 
>  
>  On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote: 
> >  
> >  On Sat, Jan 08, 2022 at 08:20:46PM +, MacFH - C E Macfarlane - News 
> > wrote: 
> >>  
> >>  To select parts of a video, I use ... 
> >>  
> >>  FFMPEG -ss-i-codec copy -to   
> >>  
> >>  ... however it's tedious, because with this method the video will only 
> >> break 
> >>  at certain points between compression units (can't remember the proper 
> >>  terminology), and it can take some experimentation to find the precise 
> >>  timing of these to get the audio right as well, and often, because of the 
> >>  way the compression works, the first extracted frame is often an unwanted 
> >>  last frame of a previous scene. 
> >>  
> >>  I have long lamented that FFMPEG doesn't make this both easier and to 
> >> allow 
> >>  greater resolution, if necessary recreating the start and end compression 
> >>  units to get the exact timing wanted. 
> >  
> >  If you get rid of the "-codec copy" you can have any precision you'd like. 
>
> But the entire video will be re-encoded, which is undesirable because, 
> as the codecs use lossy compression, there will be further degradation 
> of the entire video clip just gain some precision at each end. 
> ___ 
> ffmpeg-user mailing list 
> ffmpeg-user@ffmpeg.org 
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user 
>
> To unsubscribe, visit link above, or email 
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". 
>  
> ___ 
> ffmpeg-user mailing list 
> ffmpeg-user@ffmpeg.org 
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user 
>
> To unsubscribe, visit link above, or email 
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". 
>
 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Stephen Liu via ffmpeg-user
 Hi,
I run following command on Terminal to trim a section of the video (for VCD 
video):-
$ ffmpeg -i imput.VOB -target pal-vcd -ss 00:02:10 -to 00:03:18 -c:v copy -c:a 
copy output.VOB

-ss starting time (hrs:min:sec)
-to stop time (hrs:min:sec)

This command line works for me seamlessly.

Regards

On Sunday, January 9, 2022, 06:43:39 PM GMT+8, MacFH - C E Macfarlane - 
News  wrote:  
 
 On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote:
>
> On Sat, Jan 08, 2022 at 08:20:46PM +, MacFH - C E Macfarlane - News wrote:
>>
>> To select parts of a video, I use ...
>>
>> FFMPEG -ss  -i  -codec copy -to  
>>
>> ... however it's tedious, because with this method the video will only break
>> at certain points between compression units (can't remember the proper
>> terminology), and it can take some experimentation to find the precise
>> timing of these to get the audio right as well, and often, because of the
>> way the compression works, the first extracted frame is often an unwanted
>> last frame of a previous scene.
>>
>> I have long lamented that FFMPEG doesn't make this both easier and to allow
>> greater resolution, if necessary recreating the start and end compression
>> units to get the exact timing wanted.
> 
> If you get rid of the "-codec copy" you can have any precision you'd like.

But the entire video will be re-encoded, which is undesirable because, 
as the codecs use lossy compression, there will be further degradation 
of the entire video clip just gain some precision at each end.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread Michael Koch

Am 09.01.2022 um 11:43 schrieb MacFH - C E Macfarlane - News:

On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote:


On Sat, Jan 08, 2022 at 08:20:46PM +, MacFH - C E Macfarlane - 
News wrote:


To select parts of a video, I use ...

FFMPEG -ss  -i  -codec copy -to  

... however it's tedious, because with this method the video will 
only break

at certain points between compression units (can't remember the proper
terminology), and it can take some experimentation to find the precise
timing of these to get the audio right as well, and often, because 
of the
way the compression works, the first extracted frame is often an 
unwanted

last frame of a previous scene.

I have long lamented that FFMPEG doesn't make this both easier and 
to allow
greater resolution, if necessary recreating the start and end 
compression

units to get the exact timing wanted.


If you get rid of the "-codec copy" you can have any precision you'd 
like.


But the entire video will be re-encoded, which is undesirable because, 
as the codecs use lossy compression, there will be further degradation 
of the entire video clip just gain some precision at each end.


Is it possible to re-encode only the beginning and the end, and use 
-codec copy for the central part?


Michael
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Pixel format for sdl output device

2022-01-09 Thread Michael Koch

Am 09.01.2022 um 11:11 schrieb Carl Eugen Hoyos:

Am Fr., 7. Jan. 2022 um 22:16 Uhr schrieb Michael Koch
:

At the end of the
filter chain I had to insert "format=bgra". It doesn't work if I use
rgb24 or bgrp or no format at all.
Why does the sdl output device need a
pixel format with alpha channel?

You can use bgr0 which is a format without alpha channel.
If you change your screen pixel format (in your operating
system) from 32bit to 24bit, you can use RGB24 (or BGR24)
which once upon a time was slower.


thank you for your answer. "bgr0" does indeed work, but is a little bit 
slower than "bgra".


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Removing parts of a video using the select filter

2022-01-09 Thread MacFH - C E Macfarlane - News

On 08/01/2022 23:43, amindfv--- via ffmpeg-user wrote:


On Sat, Jan 08, 2022 at 08:20:46PM +, MacFH - C E Macfarlane - News wrote:


To select parts of a video, I use ...

FFMPEG -ss  -i  -codec copy -to  

... however it's tedious, because with this method the video will only break
at certain points between compression units (can't remember the proper
terminology), and it can take some experimentation to find the precise
timing of these to get the audio right as well, and often, because of the
way the compression works, the first extracted frame is often an unwanted
last frame of a previous scene.

I have long lamented that FFMPEG doesn't make this both easier and to allow
greater resolution, if necessary recreating the start and end compression
units to get the exact timing wanted.


If you get rid of the "-codec copy" you can have any precision you'd like.


But the entire video will be re-encoded, which is undesirable because, 
as the codecs use lossy compression, there will be further degradation 
of the entire video clip just gain some precision at each end.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] ffmpeg 4.4.1 security issue

2022-01-09 Thread Carl Eugen Hoyos
Am Do., 6. Jan. 2022 um 14:13 Uhr schrieb Dama, Nikhil via ffmpeg-user
:

> My security team denied the download of the package, and here is the
> following explanation that they gave:
> DOWNLOAD DENIED: Muliple known vulnerabilities like CVE-2021-38171

Because of the extreme reaction by your security team it should really
be noted that if this CVE allows code execution (I don't know) only you (as
the person who starts ffmpeg) can use the vulnerability to take over your
system (with your user rights)...

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Pixel format for sdl output device

2022-01-09 Thread Carl Eugen Hoyos
Am Fr., 7. Jan. 2022 um 22:16 Uhr schrieb Michael Koch
:
>
> At the end of the
> filter chain I had to insert "format=bgra". It doesn't work if I use
> rgb24 or bgrp or no format at all.

> Why does the sdl output device need a
> pixel format with alpha channel?

You can use bgr0 which is a format without alpha channel.
If you change your screen pixel format (in your operating
system) from 32bit to 24bit, you can use RGB24 (or BGR24)
which once upon a time was slower.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Can MJPEG be live streamed without transcoding?

2022-01-09 Thread Carl Eugen Hoyos
Am Sa., 8. Jan. 2022 um 07:54 Uhr schrieb Adam Nielsen via ffmpeg-user
:

>   [mpegts @ 0x6725d0] Stream 0, codec mjpeg, is muxed as a private data
>   stream and may not be recognized upon reading.

You cannot mux random data into mpegts, this is not a limitation of FFmpeg.

A small change to the FFmpeg source code probably makes possible what
you want, but since the resulting stream does not conform to any
specification, the developers will not do it.

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".