diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2016-11-08 14:27:21 +0300 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2016-11-10 05:30:48 +0300 |
commit | 863ebe6f83de6e884a4b1870231678c9259f3c90 (patch) | |
tree | ecc0bf3447831ca61f3c83c9ec4aa44a4779ffbd /tests/fate | |
parent | 2bc66d9e432005c71c17565c28496be5308e023b (diff) |
avformat/flvenc: add add_keyframe_index option
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
1. read live streaming or file by sequence
2. if use add_keyframe_index option, add a mark flag at the position,
use to insert new context at the last step.
3. add the keyframes *offset* and *timestamp* into a list
4. if use add_keyframe_index option, shift the metadata data from
mark flag offset
5. insert the keyframes *offset* and *timestamp* from the list by
sequence
6. free the list
7. end.
Add FATE test case;
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tests/fate')
-rw-r--r-- | tests/fate/flvenc.mak | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/fate/flvenc.mak b/tests/fate/flvenc.mak new file mode 100644 index 0000000000..3881bcd105 --- /dev/null +++ b/tests/fate/flvenc.mak @@ -0,0 +1,11 @@ +tests/data/add_keyframe_index.flv: TAG = GEN +tests/data/add_keyframe_index.flv: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ + -f lavfi -i "sws_flags=+accurate_rnd+bitexact;testsrc=r=7:n=2:d=20" -sws_flags '+accurate_rnd+bitexact' -metadata "encoder=Lavf" -pix_fmt yuv420p -c:v flv1 -g 7 -f flv -flags +bitexact \ + -flvflags add_keyframe_index -idct simple -dct int -y $(TARGET_PATH)/tests/data/add_keyframe_index.flv 2> /dev/null; + +FATE_AFILTER-$(call ALLYES, FLV_MUXER FLV_DEMUXER AVDEVICE TESTSRC_FILTER LAVFI_INDEV FLV_ENCODER) += fate-flv-add_keyframe_index +fate-flv-add_keyframe_index: tests/data/add_keyframe_index.flv +fate-flv-add_keyframe_index: CMD = ffmetadata -flags +bitexact -i $(TARGET_PATH)/tests/data/add_keyframe_index.flv + + |