Re: [FFmpeg-user] ISSUE ABOUT EXTRACTING

2024-03-01 Thread Hervé ANSELME
Hello Ferdi,
thanks for these infos about the command ffprobe to see the keyframes locations.
Regards,
HA


From: ffmpeg-user  on behalf of Ferdi Scholten 

Sent: Thursday, February 29, 2024 18:19
To: ffmpeg-user@ffmpeg.org 
Subject: Re: [FFmpeg-user] ISSUE ABOUT EXTRACTING

Hi,
> thanks for these infos ; so now, it brings another question : how is it 
> possible to know the locations of the keyframes ?
> Thanks for your advices.
> Regards,
> HA
>
No top posting please!!

The following command will show all key frames and they're time in the
video.

ffprobe -loglevel error -skip_frame nokey -select_streams v:0
-show_entries frame=pts_time sourcevideo.mkv
___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Mark Filipak

On 29/02/2024 17.40, Ferdi Scholten wrote:



Hi, Ferdi,

Thank you for the tip. I checked it against what I'm doing.

The 'pts_time's that it returns do not correlate with the exact times that are computed from frame 
counts. For example, pts_time=760.607200 should be exactly 760.3[364635..] (based on PTS=2854113 
in a 24/1.001fps video having timebase = 90kHz). That is from my investigation into 
cutting/concatenation errors that I'm continuing to work on. There truly is something amiss inside 
FFmpeg's computations.


It would be welcome to have someone check my work. It's lonely work and 
incredibly meticulous.

--Mark.

Hi Mark

I have been following your work on this, and admire your persistence in it.
However I think this is also related to the type of codec and container that is 
used.


I can't imagine why that would be.


Your work as far as I know is about Transport Streams.


Not at all, program streams only.

--Mark.

___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Ferdi Scholten




Hi, Ferdi,

Thank you for the tip. I checked it against what I'm doing.

The 'pts_time's that it returns do not correlate with the exact times 
that are computed from frame counts. For example, pts_time=760.607200 
should be exactly 760.3[364635..] (based on PTS=2854113 in a 
24/1.001fps video having timebase = 90kHz). That is from my 
investigation into cutting/concatenation errors that I'm continuing to 
work on. There truly is something amiss inside FFmpeg's computations.


It would be welcome to have someone check my work. It's lonely work 
and incredibly meticulous.


--Mark.

Hi Mark

I have been following your work on this, and admire your persistence in it.
However I think this is also related to the type of codec and container 
that is used. Your work as far as I know is about Transport Streams. 
Those are different from X265 in an MP4 or MKV container.
For what I can check on my own is when using MP4 or MKV containers the 
times given for key frames with above command are exactly as specified 
when encoding the original video with given specific I-frame intervals.
When cutting or trimming a video in an MKV container (what I do 
regularly) on keyframes, I get a video with exactly the specific length 
of time in between those keyframes as a result. However, I have never 
checked the correctness of PTS etc. for those cut video's, as they were 
always exactly what I wanted.


However, for this topic it is more about teaching the topic starter 
about the limits of codec:copy and it's limits in extracting and 
inserting streams.

___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Mark Filipak

On 29/02/2024 12.19, Ferdi Scholten wrote:


The following command will show all key frames and they're time in the video.

ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pts_time 
sourcevideo.mkv


Hi, Ferdi,

Thank you for the tip. I checked it against what I'm doing.

The 'pts_time's that it returns do not correlate with the exact times that are computed from frame 
counts. For example, pts_time=760.607200 should be exactly 760.3[364635..] (based on PTS=2854113 in 
a 24/1.001fps video having timebase = 90kHz). That is from my investigation into 
cutting/concatenation errors that I'm continuing to work on. There truly is something amiss inside 
FFmpeg's computations.


It would be welcome to have someone check my work. It's lonely work and 
incredibly meticulous.

--Mark.

___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Ferdi Scholten

Hi,

thanks for these infos ; so now, it brings another question : how is it 
possible to know the locations of the keyframes ?
Thanks for your advices.
Regards,
HA


No top posting please!!

The following command will show all key frames and they're time in the 
video.


ffprobe -loglevel error -skip_frame nokey -select_streams v:0 
-show_entries frame=pts_time sourcevideo.mkv

___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Hervé ANSELME
Hi,
thanks for these infos ; so now, it brings another question : how is it 
possible to know the locations of the keyframes ?
Thanks for your advices.
Regards,
HA

From: ffmpeg-user  on behalf of Ferdi Scholten 

Sent: Thursday, February 29, 2024 15:50
To: ffmpeg-user@ffmpeg.org 
Subject: Re: [FFmpeg-user] ISSUE ABOUT EXTRACTING

Hello all,
> using release 6.1 of ffmpeg, I have an issue about extracting a part from a 
> mkv video, into another mkv video.
>
> If it can help, there are a few infos about the source video (the video from 
> which I extract) ; infos provided by the VLC MEDIA PLAYER software :
>
>   [cid:e9bf5d83-4a7e-410b-b522-08d2d7c75fc1]
>
> I use the command to extract from "position" (if we can say so) 1320 seconds 
> to "position" 3183 seconds :
>
>   ffmpeg.exe -i "C:\temp\source video.mkv" -ss 1320 -to 3183 -codec copy 
> "D:\temp\new video.mkv"
>
> and in the new video, at the beginning, there are a few seconds missing 
> (about 2-3 seconds) : a few seconds I see in the source video, but not in the 
> new video.
>
> Does anybody have an idea about a way to solve it ?
>
> Please let me know if you require another technical infos, to help ; thanks 
> in advance.
>
> Regards,
> HA
>
When using codec:copy you can only cut on keyframes so your video will
be cut on the nearest keyframe to the time you specified. Keyframes can
be seconds to minutes apart depending on the type of video and codec used.

So to use exact timing you either need to transcode both source and
detination, or use raw video material for both.
___
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] ISSUE ABOUT EXTRACTING

2024-02-29 Thread Ferdi Scholten

Hello all,

using release 6.1 of ffmpeg, I have an issue about extracting a part from a mkv 
video, into another mkv video.

If it can help, there are a few infos about the source video (the video from 
which I extract) ; infos provided by the VLC MEDIA PLAYER software :

  [cid:e9bf5d83-4a7e-410b-b522-08d2d7c75fc1]

I use the command to extract from "position" (if we can say so) 1320 seconds to 
"position" 3183 seconds :

  ffmpeg.exe -i "C:\temp\source video.mkv" -ss 1320 -to 3183 -codec copy 
"D:\temp\new video.mkv"

and in the new video, at the beginning, there are a few seconds missing (about 
2-3 seconds) : a few seconds I see in the source video, but not in the new 
video.

Does anybody have an idea about a way to solve it ?

Please let me know if you require another technical infos, to help ; thanks in 
advance.

Regards,
HA

When using codec:copy you can only cut on keyframes so your video will 
be cut on the nearest keyframe to the time you specified. Keyframes can 
be seconds to minutes apart depending on the type of video and codec used.


So to use exact timing you either need to transcode both source and 
detination, or use raw video material for both.

___
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] ISSUE ABOUT EXTRACTING

2024-02-28 Thread Hervé ANSELME
Hello all,

using release 6.1 of ffmpeg, I have an issue about extracting a part from a mkv 
video, into another mkv video.

If it can help, there are a few infos about the source video (the video from 
which I extract) ; infos provided by the VLC MEDIA PLAYER software :

  [cid:e9bf5d83-4a7e-410b-b522-08d2d7c75fc1]

I use the command to extract from "position" (if we can say so) 1320 seconds to 
"position" 3183 seconds :

  ffmpeg.exe -i "C:\temp\source video.mkv" -ss 1320 -to 3183 -codec copy 
"D:\temp\new video.mkv"

and in the new video, at the beginning, there are a few seconds missing (about 
2-3 seconds) : a few seconds I see in the source video, but not in the new 
video.

Does anybody have an idea about a way to solve it ?

Please let me know if you require another technical infos, to help ; thanks in 
advance.

Regards,
HA

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
  Sans 
virus.www.avast.com
___
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".