Hi. I have something to discuss with you about vf_fps.c in FFmpeg 4. When I tried to encode a video which has only one video frame, a encoded video (result) had no video stream. I used video fps filter to adjust fps from 25 to 12 (ffmpeg argument fps=fps=12.0000000000). I know that vf_fps.c was newly rewritten in FFmpeg 4. I tried to analyze vf_fps.c source code and finally realized that fps filter remove frame few conditions as below /* There are two conditions where we want to drop a frame: * - If we have two buffered frames and the second frame is acceptable * as the next output frame, then drop the first buffered frame. * - If we have status (EOF) set, drop frames when we hit the * status timestamp. */ In that case, video frame of my video contents can't be passed to ff_filter_frame function because this video contents has only one frame. So, I wonder if I should think of this video as unusual. Because when I use FFmpeg 3, encoded result video has video stream. See video metadata extracted by ffprobe (ffprobe -select_streams v:0 -show_frames 144p_issue_only_1frame.mp4)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '144p_issue_only_1frame.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf57.25.100 Duration: 00:04:34.69, start: 0.000000, bitrate: 129 kb/s Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5726 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default) Metadata: handler_name : SoundHandler [FRAME] media_type=video stream_index=0 key_frame=1 pkt_pts=0 pkt_pts_time=0.000000 pkt_dts=0 pkt_dts_time=0.000000 best_effort_timestamp=0 best_effort_timestamp_time=0.000000 pkt_duration=512 pkt_duration_time=0.040000 pkt_pos=44 pkt_size=28633 width=1280 height=720 pix_fmt=yuv420p sample_aspect_ratio=1:1 pict_type=I coded_picture_number=0 display_picture_number=0 interlaced_frame=0 top_field_first=0 repeat_pict=0 color_range=unknown color_space=unknown color_primaries=unknown color_transfer=unknown chroma_location=left [/FRAME] Regards. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel