Opened 10 years ago

Closed 9 years ago

#4138 closed defect (wontfix)

Lavfilter output cyclically the same frame when using trim filter with pipe

Reported by: olderz Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: trim
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

ffmpeg -i input -map 0:v -c:v rawvideo -f yuv4mpegpipe -vf trim=start_frame=240 - | x265 --input - --y4m --output output

The output has cyclically the same frame. FFmpeg and x265 don't produce errors or warnings; if log is pretty necessary ask me and I'll provide to add it.
However using this syntax the output works fine:

ffmpeg -i input -map 0:v -c:v libx265 -vf trim=start_frame=240 output

Change History (8)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: ffmpegundetermined

What happens if ffmpeg is used as pipe sink? Or a file?
Does using -f lavfi -i testsrc=r=1 as input allow to reproduce the issue?

To make this a valid ticket please provide a simplified command line that allows to reproduce the issue together with the complete, uncut console output.

in reply to:  1 comment:2 by olderz, 10 years ago

Replying to cehoyos:

What happens if ffmpeg is used as pipe sink? Or a file?
Does using -f lavfi -i testsrc=r=1 as input allow to reproduce the issue?

To make this a valid ticket please provide a simplified command line that allows to reproduce the issue together with the complete, uncut console output.

This issue doesn't seem happens synthesizing the input with the lavfilter's libraries. The issue occurs with real clips, precisely trimming hundreds or thousands of frames (rarely happens cutting few frames). It persist also using ffmpeg as pipe input, and using a native encoder:

ffmpeg -i source.mkv -map 0:v -c:v rawvideo -f yuv4mpegipe -vf trim=start_frame=500 - | ffmpeg -i - -c:v ffv1 output.mkv 

Here the download of the sample: https://www.dropbox.com/s/tsjt0lr23z3lh6m/source.mkv?dl=0

Here the log:

ffmpeg version N-67742-g3f07dd6 Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov 16 2014 22:01:52 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      54. 13.100 / 54. 13.100
  libavcodec     56. 12.101 / 56. 12.101
  libavformat    56. 13.100 / 56. 13.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'G:\Person.of.Interest.S04E01.720p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\source.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'rawvideo'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'yuv4mpegpipe'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'trim=start_frame=500'.
Reading option '-' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file G:\Person.of.Interest.S04E01.720p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\source.mkv.
Successfully parsed a group of options.
Opening an input file: G:\Person.of.Interest.S04E01.720p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\source.mkv.
[matroska,webm @ 003bbd80] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 003bbd80] Before avformat_find_stream_info() pos: 67838 bytes read:99628 seeks:2
[h264 @ 037417c0] Increasing reorder buffer to 1
[h264 @ 037417c0] no picture 
[matroska,webm @ 003bbd80] All info found
[matroska,webm @ 003bbd80] After avformat_find_stream_info() pos: 96725 bytes read:132396 seeks:2 frames:26
Input #0, matroska,webm, from 'G:\Person.of.Interest.S04E01.720p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\source.mkv':
  Metadata:
    encoder         : libebml v1.3.0 + libmatroska v1.4.1
    creation_time   : 2014-11-25 20:11:15
  Duration: 00:01:04.30, start: 0.000000, bitrate: 4257 kb/s
    Stream #0:0(eng), 10, 1/1000: Video: h264 (High), yuv420p(tv, bt709, topleft), 1280x718 (1280x720) [SAR 1:1 DAR 640:359], 1/2000, 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      _STATISTICS_WRITING_APP: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_DATE_UTC: 2014-11-25 20:11:15
      _STATISTICS_WRITING_DATE_UTC-eng: 2014-11-25 20:11:15
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      BPS             : 3983282
      BPS-eng         : 3983282
      DURATION        : 00:01:02.521000000
      DURATION-eng    : 00:01:02.521000000
      NUMBER_OF_FRAMES: 1499
      NUMBER_OF_FRAMES-eng: 1499
      NUMBER_OF_BYTES : 31129849
      NUMBER_OF_BYTES-eng: 31129849
    Stream #0:1(eng), 16, 1/1000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      _STATISTICS_WRITING_APP: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_DATE_UTC: 2014-11-25 20:11:15
      _STATISTICS_WRITING_DATE_UTC-eng: 2014-11-25 20:11:15
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      BPS             : 384000
      BPS-eng         : 384000
      DURATION        : 00:01:02.528000000
      DURATION-eng    : 00:01:02.528000000
      NUMBER_OF_FRAMES: 1954
      NUMBER_OF_FRAMES-eng: 1954
      NUMBER_OF_BYTES : 3001344
      NUMBER_OF_BYTES-eng: 3001344
    Stream #0:2, 0, 1/1000: Subtitle: subrip (default)
    Metadata:
      _STATISTICS_WRITING_APP: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_DATE_UTC: 2014-11-25 20:11:15
      _STATISTICS_WRITING_DATE_UTC-eng: 2014-11-25 20:11:15
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      BPS             : 80
      BPS-eng         : 80
      DURATION        : 00:00:58.990000000
      DURATION-eng    : 00:00:58.990000000
      NUMBER_OF_FRAMES: 18
      NUMBER_OF_FRAMES-eng: 18
      NUMBER_OF_BYTES : 594
      NUMBER_OF_BYTES-eng: 594
    Stream #0:3, 0, 1/90000: Attachment: mjpeg
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
    Stream #0:4, 0, 1/90000: Attachment: mjpeg
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
    Stream #0:5, 0, 1/90000: Attachment: mjpeg
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
    Stream #0:6, 0, 1/90000: Attachment: mjpeg
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg
Successfully opened the file.
Parsing a group of options: output file -.
Applying option map (set input stream mapping) with argument 0:v.
Applying option c:v (codec name) with argument rawvideo.
Applying option f (force format) with argument yuv4mpegpipe.
Applying option vf (set video filters) with argument trim=start_frame=500.
Successfully parsed a group of options.
Opening an output file: -.
Successfully opened the file.
detected 2 logical cores
[Parsed_trim_0 @ 037c7840] Setting 'start_frame' to value '500'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'video_size' to value '1280x718'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 037c77c0] Setting 'frame_rate' to value '2997/125'
[graph 0 input from stream 0:0 @ 037c77c0] w:1280 h:718 pixfmt:yuv420p tb:1/1000 fr:2997/125 sar:1/1 sws_param:flags=2
[AVFilterGraph @ 041de880] query_formats: 3 queried, 2 merged, 0 already done, 0 delayed
Output #0, yuv4mpegpipe, to 'pipe:':
  Metadata:
    encoder         : Lavf56.13.100
    Stream #0:0(eng), 0, 125/2997: Video: rawvideo (I420 / 0x30323449), yuv420p(topleft), 1280x718 [SAR 1:1 DAR 640:359], 125/2997, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
    Metadata:
      _STATISTICS_WRITING_APP: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.2.0 ('On Every Street') 32bit built on Sep 13 2014 15:42:11
      _STATISTICS_WRITING_DATE_UTC: 2014-11-25 20:11:15
      _STATISTICS_WRITING_DATE_UTC-eng: 2014-11-25 20:11:15
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      BPS             : 3983282
      BPS-eng         : 3983282
      DURATION        : 00:01:02.521000000
      DURATION-eng    : 00:01:02.521000000
      NUMBER_OF_FRAMES: 1499
      NUMBER_OF_FRAMES-eng: 1499
      NUMBER_OF_BYTES : 31129849
      NUMBER_OF_BYTES-eng: 31129849
      encoder         : Lavc56.12.101 rawvideo
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[h264 @ 03724080] no picture 
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
*** 500 dup!
[yuv4mpegpipe @ 0381de20] Encoder did not produce proper pts, making some up.
frame=  502 fps= 21 q=0.0 size=  675821kB time=00:00:20.93 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  513 fps= 21 q=0.0 size=  690629kB time=00:00:21.39 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  522 fps= 21 q=0.0 size=  702746kB time=00:00:21.77 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  533 fps= 21 q=0.0 size=  717554kB time=00:00:22.23 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  544 fps= 21 q=0.0 size=  732363kB time=00:00:22.68 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  556 fps= 21 q=0.0 size=  748518kB time=00:00:23.18 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  567 fps= 21 q=0.0 size=  763327kB time=00:00:23.64 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  577 fps= 21 q=0.0 size=  776790kB time=00:00:24.06 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  585 fps= 21 q=0.0 size=  787560kB time=00:00:24.39 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  595 fps= 20 q=0.0 size=  801022kB time=00:00:24.81 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  606 fps= 20 q=0.0 size=  815831kB time=00:00:25.27 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  617 fps= 21 q=0.0 size=  830640kB time=00:00:25.73 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  626 fps= 20 q=0.0 size=  842756kB time=00:00:26.10 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  637 fps= 20 q=0.0 size=  857565kB time=00:00:26.56 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  648 fps= 20 q=0.0 size=  872374kB time=00:00:27.02 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  658 fps= 20 q=0.0 size=  885836kB time=00:00:27.44 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  667 fps= 20 q=0.0 size=  897953kB time=00:00:27.81 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  677 fps= 20 q=0.0 size=  911415kB time=00:00:28.23 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  687 fps= 20 q=0.0 size=  924878kB time=00:00:28.65 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  698 fps= 20 q=0.0 size=  939687kB time=00:00:29.11 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  708 fps= 20 q=0.0 size=  953149kB time=00:00:29.52 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  718 fps= 20 q=0.0 size=  966612kB time=00:00:29.94 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  729 fps= 20 q=0.0 size=  981421kB time=00:00:30.40 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  739 fps= 20 q=0.0 size=  994883kB time=00:00:30.82 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  750 fps= 20 q=0.0 size= 1009692kB time=00:00:31.28 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  760 fps= 20 q=0.0 size= 1023155kB time=00:00:31.69 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  771 fps= 20 q=0.0 size= 1037963kB time=00:00:32.15 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  779 fps= 20 q=0.0 size= 1048733kB time=00:00:32.49 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  788 fps= 20 q=0.0 size= 1060850kB time=00:00:32.86 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  798 fps= 20 q=0.0 size= 1074312kB time=00:00:33.28 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  808 fps= 20 q=0.0 size= 1087775kB time=00:00:33.70 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  819 fps= 20 q=0.0 size= 1102584kB time=00:00:34.15 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  830 fps= 20 q=0.0 size= 1117392kB time=00:00:34.61 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  841 fps= 20 q=0.0 size= 1132201kB time=00:00:35.07 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  851 fps= 20 q=0.0 size= 1145664kB time=00:00:35.49 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  862 fps= 20 q=0.0 size= 1160473kB time=00:00:35.95 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  872 fps= 20 q=0.0 size= 1173935kB time=00:00:36.36 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  882 fps= 20 q=0.0 size= 1187398kB time=00:00:36.78 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  894 fps= 20 q=0.0 size= 1203553kB time=00:00:37.28 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  904 fps= 20 q=0.0 size= 1217015kB time=00:00:37.70 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  914 fps= 20 q=0.0 size= 1230478kB time=00:00:38.12 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  925 fps= 20 q=0.0 size= 1245287kB time=00:00:38.58 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  934 fps= 20 q=0.0 size= 1257403kB time=00:00:38.95 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  945 fps= 20 q=0.0 size= 1272212kB time=00:00:39.41 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  955 fps= 20 q=0.0 size= 1285674kB time=00:00:39.83 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  966 fps= 20 q=0.0 size= 1300483kB time=00:00:40.29 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  977 fps= 20 q=0.0 size= 1315292kB time=00:00:40.74 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  987 fps= 20 q=0.0 size= 1328755kB time=00:00:41.16 bitrate=264420.0kbits/s dup=500 drop=0    
frame=  997 fps= 20 q=0.0 size= 1342217kB time=00:00:41.58 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1008 fps= 20 q=0.0 size= 1357026kB time=00:00:42.04 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1019 fps= 20 q=0.0 size= 1371835kB time=00:00:42.50 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1030 fps= 20 q=0.0 size= 1386644kB time=00:00:42.95 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1041 fps= 20 q=0.0 size= 1401452kB time=00:00:43.41 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1051 fps= 20 q=0.0 size= 1414915kB time=00:00:43.83 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1060 fps= 20 q=0.0 size= 1427031kB time=00:00:44.21 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1070 fps= 20 q=0.0 size= 1440494kB time=00:00:44.62 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1081 fps= 20 q=0.0 size= 1455303kB time=00:00:45.08 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1093 fps= 20 q=0.0 size= 1471458kB time=00:00:45.58 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1105 fps= 20 q=0.0 size= 1487613kB time=00:00:46.08 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1117 fps= 20 q=0.0 size= 1503768kB time=00:00:46.58 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1128 fps= 20 q=0.0 size= 1518577kB time=00:00:47.04 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1140 fps= 20 q=0.0 size= 1534732kB time=00:00:47.54 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1150 fps= 20 q=0.0 size= 1548194kB time=00:00:47.96 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1156 fps= 20 q=0.0 size= 1556272kB time=00:00:48.21 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1165 fps= 20 q=0.0 size= 1568388kB time=00:00:48.59 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1177 fps= 20 q=0.0 size= 1584543kB time=00:00:49.09 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1188 fps= 20 q=0.0 size= 1599352kB time=00:00:49.54 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1197 fps= 20 q=0.0 size= 1611468kB time=00:00:49.92 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1206 fps= 20 q=0.0 size= 1623585kB time=00:00:50.30 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1217 fps= 20 q=0.0 size= 1638393kB time=00:00:50.75 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1227 fps= 20 q=0.0 size= 1651856kB time=00:00:51.17 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1236 fps= 20 q=0.0 size= 1663972kB time=00:00:51.55 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1246 fps= 20 q=0.0 size= 1677435kB time=00:00:51.96 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1254 fps= 20 q=0.0 size= 1688205kB time=00:00:52.30 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1263 fps= 20 q=0.0 size= 1700321kB time=00:00:52.67 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1272 fps= 20 q=0.0 size= 1712438kB time=00:00:53.05 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1281 fps= 20 q=0.0 size= 1724554kB time=00:00:53.42 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1287 fps= 20 q=0.0 size= 1732631kB time=00:00:53.67 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1295 fps= 20 q=0.0 size= 1743401kB time=00:00:54.01 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1302 fps= 20 q=0.0 size= 1752825kB time=00:00:54.30 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1309 fps= 20 q=0.0 size= 1762249kB time=00:00:54.59 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1316 fps= 20 q=0.0 size= 1771673kB time=00:00:54.88 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1323 fps= 20 q=0.0 size= 1781097kB time=00:00:55.18 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1330 fps= 20 q=0.0 size= 1790520kB time=00:00:55.47 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1338 fps= 19 q=0.0 size= 1801290kB time=00:00:55.80 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1348 fps= 19 q=0.0 size= 1814753kB time=00:00:56.22 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1358 fps= 19 q=0.0 size= 1828216kB time=00:00:56.63 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1368 fps= 19 q=0.0 size= 1841678kB time=00:00:57.05 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1378 fps= 19 q=0.0 size= 1855141kB time=00:00:57.47 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1387 fps= 19 q=0.0 size= 1867257kB time=00:00:57.84 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1397 fps= 19 q=0.0 size= 1880719kB time=00:00:58.26 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1408 fps= 19 q=0.0 size= 1895528kB time=00:00:58.72 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1419 fps= 19 q=0.0 size= 1910337kB time=00:00:59.18 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1430 fps= 19 q=0.0 size= 1925146kB time=00:00:59.64 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1439 fps= 19 q=0.0 size= 1937262kB time=00:01:00.01 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1447 fps= 19 q=0.0 size= 1948032kB time=00:01:00.35 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1456 fps= 19 q=0.0 size= 1960149kB time=00:01:00.72 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1465 fps= 19 q=0.0 size= 1972265kB time=00:01:01.10 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1475 fps= 19 q=0.0 size= 1985727kB time=00:01:01.51 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1485 fps= 19 q=0.0 size= 1999190kB time=00:01:01.93 bitrate=264420.0kbits/s dup=500 drop=0    
frame= 1495 fps= 19 q=0.0 size= 2012653kB time=00:01:02.35 bitrate=264420.0kbits/s dup=500 drop=0    
[output stream 0:0 @ 037c72c0] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame= 1499 fps= 19 q=0.0 Lsize= 2018038kB time=00:01:02.52 bitrate=264420.0kbits/s dup=500 drop=0    

video:94kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2153909.500000%
Input file #0 (G:\Person.of.Interest.S04E01.720p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\source.mkv):
  Input stream #0:0 (video): 1499 packets read (31129849 bytes); 1499 frames decoded; 
  Input stream #0:1 (audio): 16 packets read (24576 bytes); 
  Input stream #0:2 (subtitle): 0 packets read (0 bytes); 
  Input stream #0:3 (attachment): 0 packets read (0 bytes); 
  Input stream #0:4 (attachment): 0 packets read (0 bytes); 
  Input stream #0:5 (attachment): 0 packets read (0 bytes); 
  Input stream #0:6 (attachment): 0 packets read (0 bytes); 
  Total: 1515 packets (31154425 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 0 frames encoded; 1499 packets muxed (95936 bytes); 
  Total: 1499 packets (95936 bytes) muxed
1502 frames successfully decoded, 0 decoding errors
[AVIOContext @ 041e5f40] Statistics: 0 seeks, 64457 writeouts
[AVIOContext @ 003bc660] Statistics: 34247566 bytes read, 2 seeks

comment:3 by Carl Eugen Hoyos, 10 years ago

Keywords: trim added

If there is an issue, isn't it also reproducible with the following command?

$ ffmpeg -i source.mkv -map 0:v -c:v ffv1 out.avi
Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

in reply to:  3 comment:4 by olderz, 10 years ago

Replying to cehoyos:

If there is an issue, isn't it also reproducible with the following command?

$ ffmpeg -i source.mkv -map 0:v -c:v ffv1 out.avi

No, the issue regards only the pipe.

comment:5 by Carl Eugen Hoyos, 10 years ago

I suspect this is just a question about what the trim filter (that I had never tested so far) is supposed to do with the timestamp of the first output frame. I wonder if setpts will solve your issue.

in reply to:  5 comment:6 by olderz, 10 years ago

Replying to cehoyos:

I suspect this is just a question about what the trim filter (that I had never tested so far) is supposed to do with the timestamp of the first output frame. I wonder if setpts will solve your issue.

Right! With the setpts filter:
ffmpeg -i input.mkv -map 0:v -c:v rawvideo -f yuv4mpegpipe vf trim=start_frame=500,setpts=PTS-STARTPTS - | ffmpeg -i - -c:v libx264 -crf 17 output.mkv
and also with the filter_complex -filter_complex [0:v]trim=start_frame=500[v0];[v0]setpts=PTS-STARTPTS[v1] -map [v1] -c:v rawvideo ...
it works fine. I tried a lot of commands, but I did not think to setpts, sorry.
I opened this ticket because I thought it was a bug; I did not wrote here with the intention to get assistance.
Thank you so much for your help.

comment:7 by Carl Eugen Hoyos, 10 years ago

The output of the following two commands looks very different on playback:

$ ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -map 0:0 -qscale 2 -vf trim=start_frame=500 out.avi
$ ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -map 0:0 -qscale 2 -vf trim=start_frame=500 out.mkv

comment:8 by Elon Musk, 9 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.