What would keep FFmpeg executing well past the end of the streams?

I'm snipping off source frames 0..2996 and source frames 3516...
That works, but FFmpeg execution does not terminate.

In the source:

[Parsed_showinfo_0 @ 000000000270c940] n:2997 ... iskey:1 type:I
   ..to..
[Parsed_showinfo_0 @ 000000000270c940] n:3515 ... iskey:0 type:P
   ..shot change here..
[Parsed_showinfo_0 @ 000000000270c940] n:3516 ... iskey:1 type:I

As you see, the frames I want are 2997..3515. So, the video snipping
filter is

set _SNIPv_=select=between(n\,2997\,3515),setpts=PTS-2997

In the target I get:

[Parsed_showinfo_0 @ 00000000026ebb80] n:   0 ... iskey:1 type:I
   ..to..
[Parsed_showinfo_0 @ 00000000026ebb80] n: 518 ... iskey:0 type:P

Frame 518 is the target's ending frame, confirmed. So I got what I
wanted, but FFmpeg execution does not terminate there. ...I let it run
for a few minutes.

While FFmpeg was running (doing nothing), the bottom line of the cmd
window shows this:
  frame=  469 fps=0.7 q=28.0 size=    3072KiB time=00:00:19.26
bitrate=1306.0kbits/s speed=0.0297x elapsed=0:10:25.54

'fps=' and 'speed=' kept dropping, 'elapsed=' kept increasing.
'frame=', 'q=', 'size=', 'time=', and 'bitrate=' don't change.

When I finally 'q' quit, here's the result:

  [q] command received. Exiting.
  [out#0/mp4 @ 0000000001e4c380] video:7467KiB audio:0KiB subtitle:0KiB
other streams:0KiB global headers:0KiB muxing overhead: 0.097348%
  frame=  519 fps=0.8 q=-1.0 Lsize=    7474KiB time=00:00:21.43
bitrate=2855.9kbits/s speed=0.0341x elapsed=0:10:29.30

Below is my cmd factory. Please not that it kills audio, subtitles, and
data streams.

  set _GET_=e:\Movies1\SOLARIS [2002].mp4
  set _PUT_=c:\work\SOLARIS [2002] - part.mp4
    :: before get
  set _is_16x9HD24'p_=-analyzeduration 500000000 -probesize 500000000
-colorspace bt709 -color_primaries bt709 -color_trc bt709 -r:v
24000/1001 -start_at_zero -copyts -dn -canvas_size 1920x1080
-fix_sub_duration
    :: after get
    :: filter_complex
  set _SNIPv_=select=between(n\,2997\,3515),setpts=PTS-2997
  : (48000 samples/s)/(24/1.001 frames/s) = 2002 samples/frame
  set _SNIPa_=aselect=between(n\,2997*2002\,3515*2002),asetpts=PTS-2997*2002
    :: put
  set _put_24Ktb_=-fps_mode:v passthrough -fps_mode:a passthrough
-enc_time_base:v 1:24000
  set _CODEv_=-map "[v]" -c:v:0 libx264
    :: run
  c: & cd %_WORK_%
  start /wait cmd /k ffmpeg %_is_16x9HD24'p_% -i "%_GET_%" ^
-filter_complex "[0:v:0]%_SNIPv_%[v]" ^
-map_chapters -1 -sn -an ^
%_CODEv_% "%_PUT_%"

The cmd factory, above, is similar to many that I've built.

The FFREPORT, below, is 677721 lines. I've excerpted 10 lines.

  [Parsed_select_0 @ 0000000001e4ca00] n:2996.000000 pts:2996.000000
t:124.958167 key:0 interlace_type:P pict_type:P scene:nan ->
select:0.000000 select_out:-1
  [Parsed_select_0 @ 0000000001e4ca00] n:2997.000000 pts:2997.000000
t:124.999875 key:1 interlace_type:P pict_type:I scene:nan ->
select:1.000000 select_out:0
  [libx264 @ 0000000004d60a00] frame=   0 QP=18.39 NAL=3 Slice:I Poc:0
I:8160 P:0    SKIP:0    size=65508 bytes
      ..to..
  [Parsed_select_0 @ 0000000001e4ca00] n:3515.000000 pts:3515.000000
t:146.604792 key:0 interlace_type:P pict_type:P scene:nan ->
select:1.000000 select_out:0
  [Parsed_select_0 @ 0000000001e4ca00] n:3516.000000 pts:3516.000000
t:146.646500 key:1 interlace_type:P pict_type:I scene:nan ->
select:0.000000 select_out:-1
  [libx264 @ 0000000004d60a00] frame= 442 QP=13.90 NAL=2 Slice:P Poc:414
I:190  P:6180 SKIP:1790 size=42839 bytes
      ..to line 18977..
  [libx264 @ 0000000004d60a00] frame= 450 QP=18.76 NAL=0 Slice:B Poc:416
I:3    P:2201 SKIP:5956 size=5593 bytes

      ..FFmpeg chugs along for 658578 more lines until I kill it..
  [q] command received. Exiting.

      ..lines 677618..677686..
  [libx264 @ 0000000004d60a00] frame= 451 QP=18.36 NAL=0 Slice:B Poc:418
I:6    P:2078 SKIP:6076 size=5126 bytes
      ..to..
  [libx264 @ 0000000004d60a00] frame= 518 QP=17.97 NAL=0 Slice:B Poc:74
I:4    P:3109 SKIP:5047 size=7985 bytes
      ..all come out in a glob at the very end...

Output frames 0..518 are correct, but I had to 'q' quit to get them.
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to