Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2024-07-09 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 Replying to [comment:21 Tsuyoshi]:
 > I am also facing the same issue. Is this issue will not be fixed?
 > It seems that if stream does not have B-frame, all of I-frame will be
 marked as Keyframe in container.


 Well, can you give a sample where the P frame actually depends on frames
 before I frames and not just that frame? I do not get why that those I
 frames are even tagged non-IDR. They are IDR by definition.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2023-11-26 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Tsuyoshi):

 I am also facing the same issue. Is this issue will not be fixed?
 It seems that if stream does not have B-frame, all of I-frame will be
 marked as Keyframe in container.
 Here is the procedure to reproduce this issue.

 1. encode BBB file first 30sec.

ffmpeg -t 30 -i bbb.mp4 -preset ultrafast -profile:v baseline
 -sc_threshold 50 encoded.mp4

 dump all I-frames.
 frame, key_frame, pts, pict_type, coded_picture_number
 {{{
 frame,1,0.00,I,0
 frame,0,0.10,I,3
 frame,0,0.13,I,4
 frame,0,0.17,I,5
 frame,0,0.20,I,6
 frame,0,0.23,I,7
 frame,1,4.07,I,122
 frame,0,4.20,I,126
 frame,0,4.23,I,127
 frame,0,4.47,I,134
 frame,1,12.40,I,372
 frame,1,16.30,I,489
 frame,1,20.17,I,605
 frame,1,27.47,I,824
 }}}
 This is stss Box.
 {{{
 [stss] Size=40 Version=0 Flags=0x00 EntryCount=6 SampleNumber=[1, 123,
 373, 490, 606, 825]
 }}}

 2. remux encoded.mp4 file
 ffmpeg -i encoded.mp4 -c copy remuxed.mp4

 dump all I-frames. This is same as encoded.mp4

 frame, key_frame, pts, pict_type, coded_picture_number
 {{{
 frame,1,0.00,I,0
 frame,0,0.10,I,3
 frame,0,0.13,I,4
 frame,0,0.17,I,5
 frame,0,0.20,I,6
 frame,0,0.23,I,7
 frame,1,4.07,I,122
 frame,0,4.20,I,126
 frame,0,4.23,I,127
 frame,0,4.47,I,134
 frame,1,12.40,I,372
 frame,1,16.30,I,489
 frame,1,20.17,I,605
 frame,1,27.47,I,824
 }}}

 All of I-frames are marked as keyframe in stss box.
 {{{
 [stss] Size=72 Version=0 Flags=0x00 EntryCount=14 SampleNumber=[1, 4,
 5, 6, 7, 8, 123, 127, 128, 135, 373, 490, 606, 825]
 }}}


 I think that h264_parser.c should not include following code. Because It
 is just for the specific camera... If we necessary following code, it
 should be more  restricted code.
 {{{
 // heuristic to detect non marked keyframes
 if (p->ps.sps->ref_frame_count <= 1 && p->ps.pps->ref_count[0] <= 1 &&
 s->pict_type == AV_PICTURE_TYPE_I)
 s->key_frame = 1;
 }}}
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-09-07 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 Some users from stackexchange reported similar issues:
 https://video.stackexchange.com/questions/25415/ffmpeg-ffprobe-marks-non-
 idr-keyframes-as-keyframes
 https://video.stackexchange.com/questions/28358/ffmpeg-identify-non-idr-
 frame-i-frame-as-keyframe
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-09-06 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 Replying to [comment:18 Carl Eugen Hoyos]:
 > Where can we find the sample?

 Here you go https://0x0.st/ofKK.mp4
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-09-05 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Carl Eugen Hoyos):

 Where can we find the sample?
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-09-05 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  h264|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by Carl Eugen Hoyos):

 * keywords:   => h264

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-09-05 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 Replying to [comment:15 Balling]:
 To summarize in simpler terms, there was a fix in the past
 (https://trac.ffmpeg.org/ticket/3083) that was made for a Panasonic Lumix
 stream. This fix is detecting and adding new key_frames which should not
 be part of my (and maybe other) videos. I removed this fix, recompiled
 ffmpeg and now I can split my video correctly. The false key_frames are
 coming from that fix.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2022-02-21 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 >I believe

 Do you believe or is that really the case? Because that would be quite
 crazy design.

 >splitting occurs on the newly generated keyframes from the output

 Well, of course, no workaround is needed then.

 >But when splitting a video, you usually don't want to re-encode.

 Yeah, of course.
 >has been made for a specific stream coming from Panasonic Lumix cameras

 Well, obviously you still need to check that the samples in -f segment are
 valid bitstream.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-30 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 The sad part is that the above heuristic has been made for a specific
 stream coming from Panasonic Lumix cameras (#3083)
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-30 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 Replying to [comment:12 Balling]:
 > So s->key_frame = 1; there does not propogate to ffprobe and more
 keyframes are present in the stream?

 I believe s->key_frame = 1 (AVCodecParserContext::key_frame ->
 h264_parse.c) is not what ffprobe displays as key_frame but rather the
 frame decoding (AVFrame::key_frame -> h264dec.c) which is computed
 differently.

 I also noted that -f segment is acting as an output filter; so that when
 re-encoding the video (i.e. without -c copy) the splitting occurs on the
 newly generated keyframes from the output. But when splitting a video, you
 usually don't want to re-encode.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-25 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 So s->key_frame = 1; there does not propogate to ffprobe and more
 keyframes are present in the stream?
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-25 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 See https://trac.ffmpeg.org/ticket/3083
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-25 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by TurboLed):

 Please disregard my previous comment, libx264 is not used with -c copy.

 I have managed to fix locally by commenting this section in h264_parser.c:

 // heuristic to detect non marked keyframes
 if (p->ps.sps->ref_frame_count <= 1 && p->ps.pps->ref_count[0] <= 1 &&
 s->pict_type == AV_PICTURE_TYPE_I)
 s->key_frame = 1;
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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


Re: [FFmpeg-trac] #9523(avcodec:open): segment_times splits at I-frames that are not keyframes

2021-11-22 Thread FFmpeg
#9523: segment_times splits at I-frames that are not keyframes
+---
 Reporter:  TurboLed|Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by TurboLed):

 * component:  avfilter => avcodec

Comment:

 Seems related to how AV_PKT_FLAG_KEY is set in libx264.c.

 Changed component : to avcodec
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

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