Limin Wang
96e5e6abb9
avformat/mux: Set AV_PKT_FLAG_KEY for is_intra_only packet
The patch will make audio and subtitle packets be marked as AV_PKT_FLAG_KEY.
For audio, it'll caused the audio sample to be sync sample.
To verify ref/fate/movenc results:
1. Get the movenc test data
[lmwang@vpn ffmpeg]$ libavformat/tests/movenc -w && mkdir -p audio_old && mv *.mp4 audio_old_
After applied the patch:
[lmwang@vpn ffmpeg]$ make fate-movenc SAMPLES=../fate-suite
[lmwang@vpn ffmpeg]$ libavformat/tests/movenc -w && mkdir -p audio_key && mv *.mp4 audio_key
2. Get l-smash and build boxdumper
https://github.com/l-smash/l-smash.git
3. dump the box of crc change mp4 and diff -u
[lmwang@vpn ffmpeg]$ ../l-smash/cli/boxdumper --box audio_key/non-empty-moov-no-elst.mp4 > audio_key/non-empty-moov-no-elst.log
[lmwang@vpn ffmpeg]$ ../l-smash/cli/boxdumper --box audio_old/non-empty-moov-no-elst.mp4 > audio_old/non-empty-moov-no-elst.log
[lmwang@vpn ffmpeg]$ diff -u audio_key/non-empty-moov-no-elst.log audio_old/non-empty-moov-no-elst.log
- default_sample_flags = 0x02000000
- independent
- sync sample
+ default_sample_flags = 0x01010000
+ dependent
+ non-sync sample
4. have checked the change of crc are caused by default_sample_flags
non-empty-moov.mp4, non-empty-moov-elst.mp4,
non-empty-moov-no-elst.mp4, empty-moov.mp4, delay-moov-content.mp4,
empty-moov-second-frag.mp4, empty-moov-second-frag-discont.mp4,
delay-moov-second-frag-discont.mp4, delay-moov-elst-second-frag.mp4
etc
5 For subtitle, it'll effect for tests/ref/fate/binsub-movtextenc and
tests/ref/fate/sub2video, that's expecting result for the subtitle is
marked as keyframe. Below is the checking result of binsub-movtextenc:
[lmwang@vpn ffmpeg]$ ./ffmpeg -i ../fate-suite/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov audio_key/binsub-movtextenc.mp4
[lmwang@vpn ffmpeg]$ ./ffmpeg -i ../fate-suite/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov audio_old/binsub-movtextenc.mp4
[lmwang@vpn ffmpeg]$../l-smash/cli/boxdumper audio_key/binsub-movtextenc.mp4 > audio_key/binsub-movtextenc.log
[lmwang@vpn ffmpeg]$../l-smash/cli/boxdumper audio_old/binsub-movtextenc.mp4 > audio_old/binsub-movtextenc.log
[lmwang@vpn ffmpeg]$ diff -u audio_key/binsub-movtextenc.log audio_old/binsub-movtextenc.log
.... // the key difference is the flag for sync sample
- flags = 0x000701
+ flags = 0x000301
data-offset-present
sample-duration-present
sample-size-present
- sample-flags-present
sample_count = 6
- data_offset = 188
+ data_offset = 164
sample[0]
sample_duration = 1570000
sample_size = 21
- sample_flags = 0x02000000
- independent
- sync sample
- degradation_priority = 0
sample[1]
sample_duration = 510000
sample_size = 2
- sample_flags = 0x01010000
- dependent
- non-sync sample
- degradation_priority = 0
sample[2]
sample_duration = 1690000
sample_size = 9
- sample_flags = 0x02000000
- independent
- sync sample
- degradation_priority = 0
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Suggested-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-07 07:12:24 +08:00
..
2020-05-06 12:00:26 +08:00
2020-01-08 01:32:26 +01:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2019-09-27 10:37:11 -03:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2020-05-05 20:07:19 +02:00
2020-03-09 13:41:12 +01:00
2020-04-14 18:52:44 +02:00
2019-12-12 19:25:33 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-02-21 14:47:29 +01:00
2019-12-12 19:25:33 +01:00
2019-10-30 15:28:48 -03:00
2020-01-26 10:24:00 +01:00
2020-03-21 20:55:27 +01:00
2019-11-04 10:24:58 +08:00
2020-01-07 21:51:45 +01:00
2020-01-07 21:51:45 +01:00
2020-01-07 21:51:45 +01:00
2020-01-07 21:51:45 +01:00
2020-04-18 00:22:22 +02:00
2020-03-14 22:25:25 +01:00
2020-01-26 12:41:32 -03:00
2020-01-26 12:41:32 -03:00
2019-11-16 15:56:36 -03:00
2020-01-26 12:41:32 -03:00
2019-11-28 15:20:37 -03:00
2020-04-01 05:48:31 +02:00
2020-04-05 18:38:26 +02:00
2020-03-14 22:07:27 +01:00
2020-03-30 05:50:49 +02:00
2020-03-17 22:46:36 +01:00
2020-01-30 17:10:12 +08:00
2020-05-05 19:28:28 +02:00
2020-04-05 01:23:46 +02:00
2020-02-10 22:41:38 +01:00
2020-03-22 13:00:19 +01:00
2020-03-20 14:24:34 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2019-12-11 15:22:24 +08:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2020-02-10 22:41:38 +01:00
2020-04-05 22:47:21 +02:00
2019-10-19 06:47:10 +02:00
2020-05-01 22:57:29 +08:00
2020-02-10 22:41:38 +01:00
2020-05-06 00:11:37 -05:00
2020-05-01 22:57:29 +08:00
2020-03-17 16:05:49 +01:00
2020-02-10 22:41:38 +01:00
2019-12-25 22:10:47 +01:00
2019-12-12 19:25:33 +01:00
2020-02-10 22:41:38 +01:00
2020-04-03 17:56:57 +02:00
2020-01-18 18:35:57 +01:00
2020-04-23 08:05:56 +08:00
2019-10-11 20:38:36 -03:00
2020-01-26 17:24:41 +01:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2020-01-07 21:51:45 +01:00
2020-03-28 04:17:20 +01:00
2020-01-18 22:41:11 +08:00
2020-04-14 19:01:27 +02:00
2020-02-10 22:41:38 +01:00
2019-12-01 17:17:04 +01:00
2019-11-17 23:44:17 +01:00
2019-11-28 18:44:01 +01:00
2020-05-03 13:43:54 +02:00
2019-11-28 18:44:01 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-01-17 20:17:55 +01:00
2020-01-07 21:51:45 +01:00
2019-12-12 19:25:33 +01:00
2020-02-15 18:41:36 +01:00
2020-03-17 16:04:42 +01:00
2020-02-10 22:41:38 +01:00
2019-09-27 12:39:21 +02:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2020-03-14 22:25:25 +01:00
2020-01-07 21:51:45 +01:00
2020-03-17 16:08:13 +01:00
2019-09-16 00:04:18 +02:00
2020-04-30 08:24:09 +02:00
2020-01-26 12:41:31 -03:00
2020-01-26 12:41:32 -03:00
2020-03-24 21:22:15 +01:00
2020-05-06 08:47:35 +02:00
2020-04-08 23:02:41 +08:00
2020-04-08 23:02:41 +08:00
2020-04-02 21:22:52 +02:00
2020-02-15 18:41:36 +01:00
2019-10-08 14:57:44 +08:00
2020-02-15 18:41:36 +01:00
2019-12-21 15:01:57 +01:00
2020-02-10 22:41:38 +01:00
2020-01-07 21:51:45 +01:00
2020-01-05 20:31:42 +01:00
2020-01-05 20:31:42 +01:00
2019-12-10 16:09:14 +01:00
2020-01-10 12:02:13 +01:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2020-01-07 21:51:45 +01:00
2019-12-11 16:24:16 +01:00
2020-04-07 17:01:58 +02:00
2020-01-10 23:08:18 +01:00
2020-02-10 22:41:38 +01:00
2020-03-28 04:17:20 +01:00
2020-05-07 07:12:24 +08:00
2020-02-15 10:55:33 +01:00
2020-04-11 18:15:58 +02:00
2020-02-10 22:41:38 +01:00
2019-10-08 21:45:00 -04:00
2020-02-28 19:40:05 +01:00
2020-01-07 21:51:45 +01:00
2019-12-12 19:25:33 +01:00
2020-02-06 17:26:22 +01:00
2019-10-15 13:04:44 -03:00
2020-03-09 22:07:17 +01:00
2020-02-10 22:41:38 +01:00
2020-05-03 05:28:33 +08:00
2020-03-09 22:07:18 +01:00
2020-02-10 22:41:38 +01:00
2020-05-05 20:07:19 +02:00
2020-04-20 21:24:18 +02:00
2020-04-20 21:24:18 +02:00
2020-05-04 07:51:29 +02:00
2020-05-06 10:49:51 +02:00
2019-12-27 12:38:08 +01:00
2020-01-07 21:51:45 +01:00
2019-11-09 11:27:14 +09:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2019-10-08 13:47:16 +08:00
2019-10-08 13:47:12 +08:00
2020-05-01 12:21:51 +08:00
2020-04-26 14:34:03 +02:00
2020-04-13 10:37:45 -06:00
2020-02-28 19:40:05 +01:00
2020-04-29 15:14:17 +08:00
2019-12-12 19:25:33 +01:00
2020-04-19 02:37:46 +02:00
2020-04-09 15:16:20 +02:00
2020-01-07 21:51:45 +01:00
2020-05-01 12:24:47 +08:00
2020-04-21 21:28:29 +02:00
2020-04-23 11:31:35 +05:30
2020-01-08 01:32:26 +01:00
2020-02-11 00:15:19 +01:00
2019-10-08 16:24:58 +02:00
2019-10-19 06:54:53 +02:00
2020-05-07 07:12:24 +08:00
2020-02-25 19:57:16 +01:00
2019-12-12 19:25:33 +01:00
2020-03-14 22:25:25 +01:00
2020-03-14 22:25:25 +01:00
2020-05-05 08:20:45 +08:00
2020-04-18 01:24:56 +02:00
2020-02-10 22:41:38 +01:00
2019-10-08 13:47:07 +08:00
2019-12-11 22:18:09 +02:00
2020-03-26 20:06:15 +01:00
2019-09-27 12:15:50 +02:00
2019-12-12 19:25:33 +01:00
2020-05-05 19:35:38 +02:00
2020-02-10 22:41:38 +01:00
2020-05-01 23:30:35 +02:00
2020-04-30 23:05:51 +01:00
2020-05-03 13:43:54 +02:00
2019-12-12 19:25:33 +01:00
2019-12-31 18:43:50 +01:00
2019-12-12 19:25:33 +01:00
2020-04-30 23:05:51 +01:00
2019-12-12 19:25:33 +01:00
2019-12-31 18:43:50 +01:00
2020-04-11 12:56:21 +02:00
2019-12-12 19:25:33 +01:00
2020-03-17 22:46:36 +01:00
2019-10-19 21:29:36 -03:00
2019-12-12 19:25:33 +01:00
2019-10-20 19:57:51 +02:00
2020-05-05 20:07:19 +02:00
2020-03-09 22:07:17 +01:00
2020-01-08 01:32:26 +01:00
2020-04-23 20:09:38 +02:00
2019-12-12 19:25:33 +01:00
2019-09-06 16:22:44 -03:00
2020-02-10 22:41:38 +01:00
2020-04-10 12:22:09 +02:00
2019-08-31 17:38:25 +02:00
2020-02-16 12:54:57 +01:00
2020-02-10 22:41:38 +01:00
2020-01-08 01:32:26 +01:00
2020-01-07 21:51:45 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-04-14 18:57:59 +02:00
2020-05-06 23:02:00 +08:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2019-12-02 00:08:21 +08:00
2020-01-16 22:27:35 -03:00
2020-01-16 22:27:35 -03:00
2020-04-20 18:21:39 +02:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-02-04 20:39:46 +01:00
2020-02-10 22:41:38 +01:00
2019-09-25 18:01:09 +02:00
2020-02-25 19:57:16 +01:00
2020-04-26 22:39:01 +02:00
2019-10-16 19:17:57 +02:00
2020-02-10 22:41:38 +01:00
2020-02-10 22:41:38 +01:00
2020-04-08 16:23:07 +02:00
2020-01-07 21:51:45 +01:00
2020-05-06 23:02:00 +08:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2020-02-10 22:41:38 +01:00
2020-02-20 23:04:50 +02:00
2020-03-22 13:00:19 +01:00
2020-03-21 18:46:36 +01:00
2020-02-10 22:41:38 +01:00
2020-01-07 21:51:45 +01:00
2020-03-28 04:17:20 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-04-21 21:14:26 +03:00
2020-04-22 12:41:29 +08:00
2019-12-19 19:30:37 -03:00
2020-01-07 21:51:45 +01:00
2020-03-14 15:38:34 +01:00
2019-12-12 19:25:33 +01:00
2020-03-08 19:08:04 +01:00
2020-05-06 12:00:26 +08:00
2020-02-15 18:41:36 +01:00
2020-02-15 18:41:36 +01:00
2020-05-06 23:02:00 +08:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2020-05-05 20:07:19 +02:00
2019-12-12 19:25:33 +01:00
2020-02-20 14:41:26 +01:00
2020-05-03 13:43:54 +02:00
2020-05-03 13:43:54 +02:00
2020-03-12 18:47:39 +01:00
2020-02-10 22:41:38 +01:00
2019-12-12 19:25:33 +01:00
2020-01-07 21:51:45 +01:00
2019-10-28 14:26:22 +08:00
2020-04-14 18:43:44 +02:00
2020-04-14 18:43:44 +02:00
2020-04-23 20:09:38 +02:00
2020-01-07 21:51:45 +01:00
2019-12-12 19:25:33 +01:00
2020-02-19 22:37:30 +01:00
2020-01-07 21:51:45 +01:00
2020-04-02 07:17:34 +02:00
2019-12-12 19:25:33 +01:00
2020-03-19 10:58:07 +01:00
2020-03-26 20:51:34 +01:00
2020-03-19 17:34:31 +01:00