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-04-21 08:11:09 +02:00
2020-02-04 23:34:22 +01:00
2020-02-04 23:34:22 +01:00
2020-03-10 20:22:32 +01:00
2020-03-10 20:22:32 +01:00
2020-02-22 20:45:45 +01:00
2020-02-22 20:45:45 +01:00
2020-02-08 00:01:17 +01:00
2020-02-08 00:01:17 +01:00
2019-12-21 11:57:28 -03:00
2020-02-22 23:19:07 -03:00
2020-02-22 23:19:07 -03:00
2019-11-29 18:58:42 -03:00
2020-04-13 08:43:14 +02:00
2020-05-07 07:12:24 +08:00
2019-10-17 13:17:18 +02:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2019-12-13 10:58:10 -03:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2019-03-14 14:59:45 -03:00
2019-12-21 11:57:28 -03:00
2019-12-21 11:57:28 -03:00
2019-12-21 11:57:28 -03:00
2020-03-11 22:55:49 +01:00
2019-09-05 23:23:24 +05:30
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2019-11-11 14:51:09 +01:00
2019-11-11 14:51:09 +01:00
2019-09-08 16:48:28 +02:00
2019-10-30 18:09:00 +01:00
2019-08-17 17:15:19 +02:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2020-03-11 22:55:49 +01:00
2019-02-19 21:29:03 +01:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2019-05-14 12:06:26 +02:00
2019-05-14 12:06:26 +02:00
2019-09-26 16:59:14 +02:00
2019-09-26 16:59:14 +02:00
2018-12-14 11:26:30 +01:00
2018-12-14 11:26:30 +01:00
2018-12-14 11:26:30 +01:00
2018-12-14 11:26:30 +01:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2019-09-26 16:59:14 +02:00
2020-05-05 20:06:58 +02:00
2018-12-14 11:26:30 +01:00
2020-05-05 20:06:58 +02:00
2020-05-05 20:06:58 +02:00
2019-08-30 22:41:07 +02:00
2019-08-30 22:41:07 +02:00
2019-12-28 14:01:15 +01:00
2019-12-28 14:01:15 +01:00
2019-12-28 14:01:15 +01:00
2019-12-28 14:01:15 +01:00
2019-12-28 14:01:15 +01:00
2019-12-28 14:01:15 +01:00
2019-12-28 21:51:40 +01:00
2019-12-05 20:20:05 +01:00
2019-12-05 20:20:05 +01:00
2019-12-05 20:20:05 +01:00
2019-12-05 20:20:05 +01:00
2019-12-05 20:20:05 +01:00
2019-08-17 17:33:16 +02:00
2019-08-17 17:33:16 +02:00
2018-12-13 19:30:39 +01:00
2019-08-17 17:33:16 +02:00
2019-08-17 17:33:16 +02:00
2019-08-17 17:33:16 +02:00
2020-03-06 00:58:31 +01:00
2020-03-06 00:58:31 +01:00
2020-03-06 00:58:31 +01:00
2020-04-10 15:52:41 +02:00
2020-03-06 00:58:31 +01:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2019-10-12 14:36:15 +02:00
2019-10-12 14:36:15 +02:00
2019-10-12 14:36:15 +02:00
2019-10-12 14:36:15 +02:00
2019-12-17 14:12:40 -03:00
2019-04-05 14:16:52 +01:00
2019-07-15 21:57:43 +08:00
2019-07-11 09:37:29 +08:00
2019-07-11 09:39:44 +08:00
2019-08-01 19:25:29 +08:00
2019-04-19 06:14:03 +08:00
2019-04-22 23:24:42 +08:00
2019-04-22 23:24:42 +08:00
2019-12-08 18:20:53 -03:00
2020-04-21 08:36:20 +02:00
2019-12-28 22:40:13 -03:00
2019-12-28 22:40:13 -03:00
2019-12-07 12:36:21 -03:00
2020-04-02 07:12:01 +02:00
2019-12-04 22:52:01 -03:00
2019-12-07 23:11:55 -03:00
2019-08-13 10:46:20 +08:00
2020-05-02 19:14:08 +02:00
2020-05-07 07:12:24 +08:00
2019-08-24 09:33:44 +02:00
2019-09-19 21:30:54 +02:00
2019-03-13 12:39:51 +01:00
2019-03-13 12:39:51 +01:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-05-02 19:14:08 +02:00
2020-03-02 22:01:47 +01:00
2019-06-12 12:01:32 +02:00
2020-05-01 01:36:43 +01:00
2019-12-27 21:52:21 +01:00
2019-05-12 07:51:02 -07:00
2018-12-02 12:55:57 +01:00
2018-12-02 12:55:57 +01:00
2019-12-21 11:57:28 -03:00
2018-12-02 12:55:57 +01:00
2018-12-02 12:55:57 +01:00
2019-08-27 15:10:03 -03:00
2019-03-04 13:03:34 +01:00
2020-04-21 08:11:09 +02:00
2020-03-06 00:58:31 +01:00
2020-04-05 01:17:55 +02:00
2020-05-07 07:12:24 +08:00
2020-03-16 19:35:17 +02:00
2020-03-16 19:35:17 +02:00
2019-02-20 21:15:07 +01:00
2019-12-27 12:38:08 +01:00
2020-04-10 09:32:13 -07:00
2019-08-29 15:14:32 +02:00
2020-02-24 00:09:51 +00:00
2020-03-20 09:16:05 +01:00
2020-05-06 12:00:26 +08:00
2018-12-02 14:17:53 +01:00
2019-06-12 20:06:20 +10:00
2019-09-11 22:36:33 +02:00
2019-01-26 23:49:09 +11:00
2019-01-26 23:49:09 +11:00
2019-01-26 23:49:04 +11:00
2019-01-26 23:48:59 +11:00
2019-01-26 23:49:04 +11:00
2020-04-21 08:11:09 +02:00