-
Notifications
You must be signed in to change notification settings - Fork 48
/
610.srt
4907 lines (3592 loc) · 108 KB
/
610.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:12.046 --> 00:00:13.056 A:middle
>> Morning everyone.
00:00:14.196 --> 00:00:15.486 A:middle
Welcome to Session 610.
00:00:15.486 --> 00:00:18.286 A:middle
I'm Brad Ford, I work on the
core media engineering team.
00:00:18.616 --> 00:00:21.286 A:middle
For the next hour I'm
going to talk to you
00:00:21.286 --> 00:00:24.026 A:middle
about the most popular
camera in the world.
00:00:25.226 --> 00:00:26.376 A:middle
Actually that's inaccurate.
00:00:26.416 --> 00:00:28.526 A:middle
If you go by Flickr data,
I'm going to talk to you
00:00:28.526 --> 00:00:31.066 A:middle
about the three most popular
cameras in the world --
00:00:31.706 --> 00:00:34.756 A:middle
iPhone 4s, iPhone
5, and iPhone 4.
00:00:35.456 --> 00:00:38.676 A:middle
And we recognize that you're
a big part of that popularity.
00:00:38.966 --> 00:00:42.856 A:middle
We bring the great
hardware, we bring the camera
00:00:42.856 --> 00:00:44.146 A:middle
that people get excited about,
00:00:44.816 --> 00:00:47.786 A:middle
and we bring the framework level
support, but you bring the apps.
00:00:48.236 --> 00:00:51.976 A:middle
And we wouldn't be as popular or
as successful without your apps
00:00:51.976 --> 00:00:55.196 A:middle
that make our platform
so useful, and so fun.
00:00:55.366 --> 00:00:56.906 A:middle
So thank you for that.
00:00:57.816 --> 00:01:01.586 A:middle
Today we're going to
have a brief appetizer
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:57.816 --> 00:01:01.586 A:middle
Today we're going to
have a brief appetizer
00:01:01.686 --> 00:01:04.046 A:middle
of greater transparency
for users,
00:01:04.046 --> 00:01:05.786 A:middle
and then the main
course is features --
00:01:05.896 --> 00:01:08.746 A:middle
lots and lots of new features,
and then we'll follow that up
00:01:08.746 --> 00:01:12.006 A:middle
with a sample code
update for our dessert.
00:01:12.646 --> 00:01:15.736 A:middle
We're not going to spend any
time today on core media basics
00:01:15.736 --> 00:01:18.476 A:middle
or AV foundation basics,
because we just don't have time
00:01:18.476 --> 00:01:19.356 A:middle
in an hour to do that.
00:01:19.906 --> 00:01:22.756 A:middle
But lucky for you, we've
talked about them several times
00:01:22.756 --> 00:01:25.756 A:middle
in the past, and all of
these sessions are available
00:01:26.166 --> 00:01:29.236 A:middle
on your WWDC app on
your phone right now.
00:01:29.236 --> 00:01:31.306 A:middle
So you could actually call it
up, and you could be listening
00:01:31.306 --> 00:01:33.676 A:middle
to me two years ago, while
you're listening to me now.
00:01:36.026 --> 00:01:36.896 A:middle
But turn the sound down.
00:01:38.086 --> 00:01:40.146 A:middle
First upgrade for
transparency for users,
00:01:40.596 --> 00:01:45.036 A:middle
last year we introduced
some security hardening
00:01:45.036 --> 00:01:50.186 A:middle
that we introduced in iOS 6
to make it more transparent
00:01:50.186 --> 00:01:53.656 A:middle
for users when the photos and
videos were being accessed
00:01:53.656 --> 00:01:54.876 A:middle
in their photos library.
00:01:55.266 --> 00:01:56.336 A:middle
And we did that by popping
00:01:56.336 --> 00:01:59.706 A:middle
up a dialog the first time your
application tries to access --
00:01:59.706 --> 00:02:04.086 A:middle
that is read to-- read from,
or write to the assets library,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:59.706 --> 00:02:04.086 A:middle
that is read to-- read from,
or write to the assets library,
00:02:04.676 --> 00:02:07.396 A:middle
so that the user would have an
opportunity to opt in or out.
00:02:08.526 --> 00:02:10.826 A:middle
And we warned you that you
should start paying attention
00:02:10.826 --> 00:02:13.476 A:middle
to errors that you get back
from AL assets library.
00:02:14.426 --> 00:02:17.256 A:middle
Well this year we're hardening
things even a little bit more,
00:02:17.996 --> 00:02:19.696 A:middle
and we do this for
a couple of reasons.
00:02:20.396 --> 00:02:23.126 A:middle
You've probably noticed that
on our iOS devices we have no
00:02:23.126 --> 00:02:27.436 A:middle
hardware blinky light that
tells you that recording is
00:02:27.436 --> 00:02:30.766 A:middle
in progress, and AV foundation
00:02:30.766 --> 00:02:34.996 A:middle
as a framework does not force
you to put up a UI saying
00:02:35.116 --> 00:02:36.296 A:middle
"recording in progress".
00:02:36.926 --> 00:02:39.246 A:middle
So therefore it's possible
to do something headlessly.
00:02:39.416 --> 00:02:41.586 A:middle
And users want to trust
your app, they want to know
00:02:41.586 --> 00:02:42.536 A:middle
when things are happening.
00:02:43.116 --> 00:02:46.506 A:middle
So also in some regions
it's now required by law
00:02:47.016 --> 00:02:50.126 A:middle
to present users notice
when the microphone
00:02:50.446 --> 00:02:51.896 A:middle
or the camera is in use.
00:02:52.326 --> 00:02:55.336 A:middle
So new in iOS 7, we are going
00:02:55.336 --> 00:02:58.866 A:middle
to introduce two new dialogs the
first time your app makes use
00:02:58.866 --> 00:03:02.166 A:middle
of the microphone or the
camera to allow users to know
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:02:58.866 --> 00:03:02.166 A:middle
of the microphone or the
camera to allow users to know
00:03:02.166 --> 00:03:03.746 A:middle
about it, and to opt in or out.
00:03:04.366 --> 00:03:09.226 A:middle
Now the microphone dialog is
everywhere, that is all iPhones,
00:03:09.226 --> 00:03:10.776 A:middle
all iPads, everywhere.
00:03:11.196 --> 00:03:14.756 A:middle
The camera dialog is just in
certain regions where required
00:03:14.756 --> 00:03:16.036 A:middle
by law, such as China.
00:03:16.856 --> 00:03:19.606 A:middle
Here's how it looks in code.
00:03:20.166 --> 00:03:23.836 A:middle
The first time you create
an AV capture device input,
00:03:25.106 --> 00:03:26.466 A:middle
the dialog will be invoked.
00:03:27.746 --> 00:03:29.106 A:middle
In code it looks like this.
00:03:29.356 --> 00:03:33.126 A:middle
You call device input with
device, and pay attention
00:03:33.126 --> 00:03:35.266 A:middle
to that error, because it
might return an error now.
00:03:36.256 --> 00:03:38.836 A:middle
The very first time we need
to succeed, because we need
00:03:38.836 --> 00:03:40.366 A:middle
to return control
to you immediately,
00:03:40.366 --> 00:03:42.776 A:middle
but we actually don't know the
answer yet because the dialog is
00:03:42.776 --> 00:03:45.446 A:middle
up but the person might
not have said okay or deny.
00:03:46.146 --> 00:03:48.066 A:middle
So what do we do in the interim?
00:03:49.106 --> 00:03:51.306 A:middle
For a microphone
we produce Silence
00:03:51.506 --> 00:03:55.126 A:middle
until the user grants access,
and for the camera we spit
00:03:55.126 --> 00:03:57.656 A:middle
out black frames until
they've granted access.
00:03:58.546 --> 00:04:01.626 A:middle
If on subsequent launches we
already know what the answer is,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:58.546 --> 00:04:01.626 A:middle
If on subsequent launches we
already know what the answer is,
00:04:01.976 --> 00:04:04.346 A:middle
we can return an
error immediately,
00:04:04.516 --> 00:04:05.496 A:middle
and that's a new error
00:04:05.496 --> 00:04:09.346 A:middle
in AV foundation called
application is not authorized
00:04:09.346 --> 00:04:10.306 A:middle
to use device.
00:04:10.386 --> 00:04:11.486 A:middle
So pay attention to that.
00:04:11.486 --> 00:04:14.666 A:middle
That means the user is
choosing not to allow you
00:04:14.666 --> 00:04:16.036 A:middle
to use the camera or microphone.
00:04:19.216 --> 00:04:20.786 A:middle
Alright, on to features.
00:04:20.786 --> 00:04:24.286 A:middle
This is going to be the
major bulk of our talk today,
00:04:24.886 --> 00:04:27.346 A:middle
and we have a lot of
them to get through.
00:04:28.016 --> 00:04:32.776 A:middle
Five major feature areas, first
60 fps support, video zoom,
00:04:33.456 --> 00:04:36.146 A:middle
machine readable code
detection, or barcode detection,
00:04:36.716 --> 00:04:40.626 A:middle
focus enhancements, and
integration with audio session.
00:04:40.976 --> 00:04:42.656 A:middle
First up 60 fps support.
00:04:43.386 --> 00:04:45.276 A:middle
And we know a lot of you
have been waiting a long time
00:04:45.276 --> 00:04:45.786 A:middle
for this.
00:04:45.786 --> 00:04:48.906 A:middle
You've been waiting patiently,
and I think it's worth the wait.
00:04:49.166 --> 00:04:51.956 A:middle
We didn't want to unleash
this feature on all
00:04:51.956 --> 00:04:53.946 A:middle
of you before we had
really thought it through,
00:04:54.316 --> 00:04:57.356 A:middle
and given you comprehensive
support across the media stack.
00:04:57.926 --> 00:05:01.336 A:middle
So by introducing 60
frame rate movies,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:04:57.926 --> 00:05:01.336 A:middle
So by introducing 60
frame rate movies,
00:05:01.336 --> 00:05:03.626 A:middle
we wanted to make sure you
could also do interesting things
00:05:03.626 --> 00:05:05.716 A:middle
with them, as far as
playback and editing.
00:05:06.436 --> 00:05:09.546 A:middle
So we are introducing
full iOS ecosystem support
00:05:09.686 --> 00:05:10.996 A:middle
for high frame rate content.
00:05:11.346 --> 00:05:11.946 A:middle
What does that mean?
00:05:12.516 --> 00:05:15.166 A:middle
On capture we support
720p video,
00:05:15.166 --> 00:05:19.256 A:middle
up to 60 frames per second,
with video stabilization,
00:05:19.556 --> 00:05:22.206 A:middle
and we write really cool movies.
00:05:22.206 --> 00:05:25.696 A:middle
These have droppable p-frames
in them, a feature of H264,
00:05:25.696 --> 00:05:27.856 A:middle
which allows them to
play back smoothly,
00:05:27.856 --> 00:05:30.776 A:middle
even on lower powered
machines, or older machines.
00:05:31.396 --> 00:05:34.886 A:middle
On the playback front,
we've beefed up our support
00:05:34.886 --> 00:05:38.716 A:middle
for audio processing in
the time pitch domain,
00:05:38.716 --> 00:05:41.056 A:middle
so that if you want to do
effects like slow the movies
00:05:41.056 --> 00:05:43.056 A:middle
down or speed them up, you
can do interesting things
00:05:43.056 --> 00:05:43.656 A:middle
with audio.
00:05:44.926 --> 00:05:47.526 A:middle
On the editing side, we largely
already had the support there,
00:05:48.036 --> 00:05:53.186 A:middle
but we do support fully scaled
edits in mutable compositions.
00:05:53.926 --> 00:05:56.796 A:middle
And lastly, in export we
allow you to do it two ways.
00:05:56.796 --> 00:06:00.436 A:middle
You can either export such
that the high frame rate areas
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:05:56.796 --> 00:06:00.436 A:middle
You can either export such
that the high frame rate areas
00:06:00.436 --> 00:06:01.746 A:middle
of the movie are preserved,
00:06:02.306 --> 00:06:05.506 A:middle
or you can do a frame rate
conversion that will sort
00:06:05.506 --> 00:06:07.906 A:middle
of flatten it all down
to 30 frames per second,
00:06:07.906 --> 00:06:08.626 A:middle
or something else.
00:06:09.086 --> 00:06:14.976 A:middle
But enough talk,
let's do a demo.
00:06:15.996 --> 00:06:19.066 A:middle
Alright. So the first demo
app is called Slowpoke.
00:06:19.496 --> 00:06:23.896 A:middle
This is an app that showcases
all four feature areas
00:06:23.896 --> 00:06:25.536 A:middle
of 60 frames per second support.
00:06:26.366 --> 00:06:28.956 A:middle
First one is capture,
as you might expect.
00:06:29.296 --> 00:06:32.696 A:middle
Now it looks just like a regular
capture app, except I don't know
00:06:32.846 --> 00:06:35.766 A:middle
if you can tell out there, but
it's a really fast frame rate,
00:06:35.766 --> 00:06:38.846 A:middle
it's a buttery smooth 60
frames per second preview.
00:06:39.536 --> 00:06:43.116 A:middle
And it's running the
camera at 720p 60.
00:06:43.606 --> 00:06:45.936 A:middle
You can also do all the things
you'd expect, like focus,
00:06:46.656 --> 00:06:53.826 A:middle
and it writes movies that have
the proper H264 bitrate profile
00:06:53.826 --> 00:06:54.636 A:middle
level, etcetera.
00:06:55.266 --> 00:06:57.376 A:middle
Let's go over to the
more interesting part
00:06:57.376 --> 00:07:00.086 A:middle
for today's demo, which is
the playback and editing.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:06:57.376 --> 00:07:00.086 A:middle
for today's demo, which is
the playback and editing.
00:07:00.786 --> 00:07:03.306 A:middle
I recorded several
movies here previously,
00:07:03.406 --> 00:07:05.296 A:middle
they're all 60 frames
per second movies.
00:07:05.296 --> 00:07:08.436 A:middle
I'm just going to pick one
of them, and now we'll find
00:07:08.436 --> 00:07:10.806 A:middle
out why this app
got its namesake.
00:07:11.516 --> 00:07:14.736 A:middle
This is a clip of a
guitarist playing the prelude
00:07:14.736 --> 00:07:16.716 A:middle
from Bach's E Major Lute Suite,
00:07:17.416 --> 00:07:21.166 A:middle
let me play a little
bit for you.
00:07:21.166 --> 00:07:22.106 A:middle
[ Music ]
00:07:22.106 --> 00:07:24.916 A:middle
So let's say you're trying
to learn this piece yourself,
00:07:25.316 --> 00:07:28.086 A:middle
and he's going too fast,
you need to slow him down so
00:07:28.086 --> 00:07:29.066 A:middle
that you can hear it better.
00:07:29.066 --> 00:07:32.926 A:middle
I'm going to swipe to
the left to slow it down.
00:07:32.926 --> 00:07:33.136 A:middle
[ Music ]
00:07:33.136 --> 00:07:38.176 A:middle
And I'll go even slower now.
00:07:38.176 --> 00:07:38.416 A:middle
[ Music ]
00:07:38.416 --> 00:07:46.046 A:middle
So now you can really see
his fingers move well.
00:07:46.326 --> 00:07:47.666 A:middle
Alternately, you
could make him sound
00:07:47.666 --> 00:07:49.946 A:middle
like Yngwie Malmsteen,
which is my favorite.
00:07:49.946 --> 00:07:50.136 A:middle
[ Music ]
00:07:50.136 --> 00:07:53.006 A:middle
Notice how good it sounds.
00:07:53.006 --> 00:08:01.786 A:middle
We're preserving pitch here, so
that you could even export this
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:07:53.006 --> 00:08:01.786 A:middle
We're preserving pitch here, so
that you could even export this
00:08:01.786 --> 00:08:03.956 A:middle
and pass it off as him
doing the real thing.
00:08:03.956 --> 00:08:07.566 A:middle
Now he's an amazing guitarist.
00:08:08.596 --> 00:08:09.736 A:middle
Alright, let's pick another one.
00:08:09.736 --> 00:08:10.516 A:middle
[ Applause ]
00:08:10.516 --> 00:08:11.296 A:middle
Thank you.
00:08:11.296 --> 00:08:17.906 A:middle
Let's have a little fun
at my dog's expense.
00:08:18.126 --> 00:08:21.836 A:middle
This poor animal protects our
house from dangerous birds
00:08:21.836 --> 00:08:24.716 A:middle
on wires, and this is
what he sounds like.
00:08:24.716 --> 00:08:26.156 A:middle
[ Dog Barking ]
00:08:26.156 --> 00:08:30.706 A:middle
Okay, protecting our house.
00:08:30.706 --> 00:08:33.366 A:middle
Now let's have some fun speeding
him up and slowing him down,
00:08:33.366 --> 00:08:36.006 A:middle
but this time I'm going
to engage chipmunk mode.
00:08:36.226 --> 00:08:37.616 A:middle
You'll notice over in
the corner I'm going
00:08:37.616 --> 00:08:39.525 A:middle
to turn the chipmunk
button on so
00:08:39.525 --> 00:08:46.756 A:middle
that we can make him
sound like a yip-yip dog.
00:08:46.756 --> 00:08:47.336 A:middle
[ Dog Barking ]
00:08:47.336 --> 00:08:49.566 A:middle
Or, like Barry White.
00:08:49.566 --> 00:08:50.156 A:middle
[ Dog Barking ]
00:08:50.156 --> 00:08:55.296 A:middle
Or a dinosaur.
00:08:55.296 --> 00:08:55.826 A:middle
[ Dog Barking ]
00:08:55.826 --> 00:08:57.256 A:middle
Okay, enough of that.
00:08:57.256 --> 00:09:00.266 A:middle
And finally, let's go --
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:08:57.256 --> 00:09:00.266 A:middle
And finally, let's go --
00:09:00.266 --> 00:09:01.606 A:middle
[ Applause ]
00:09:01.606 --> 00:09:08.396 A:middle
Notice we have so many
frames in the movie
00:09:08.396 --> 00:09:10.576 A:middle
that it looks really good
when you slow him down.
00:09:11.286 --> 00:09:13.606 A:middle
Let's take this last one
here, this is an action shot,
00:09:14.186 --> 00:09:19.406 A:middle
kind of a frightening one of
my dog coming up towards you
00:09:19.406 --> 00:09:20.526 A:middle
at a million miles an hour.
00:09:20.526 --> 00:09:22.266 A:middle
Now let's engage
the chipmunk mode,
00:09:22.266 --> 00:09:24.936 A:middle
but let's say this time I don't
just want to mess around with it
00:09:24.936 --> 00:09:28.996 A:middle
in real time, I want to
program a slow motion part right
00:09:28.996 --> 00:09:31.366 A:middle
into the asset.
00:09:32.106 --> 00:09:34.696 A:middle
Okay, so I'll pick a point
right where he's starting
00:09:34.696 --> 00:09:35.526 A:middle
to come up the stairs.
00:09:35.526 --> 00:09:38.476 A:middle
Now I'm going to swipe down
to begin and end it, and edit.
00:09:39.096 --> 00:09:43.956 A:middle
And then I'll go to where he's
right next to me, and I'll swipe
00:09:43.956 --> 00:09:46.436 A:middle
up to end the edit, and
here I get to apply a rate.
00:09:46.996 --> 00:09:52.046 A:middle
So I'll set the rate to .25,
quarter speed, and apply it.
00:09:52.046 --> 00:09:54.836 A:middle
And you notice that the duration
just changed on this movie.
00:09:55.566 --> 00:09:58.746 A:middle
Now I can go back and play it.
00:09:59.246 --> 00:10:02.086 A:middle
[ Silence ]
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:09:59.246 --> 00:10:02.086 A:middle
[ Silence ]
00:10:02.586 --> 00:10:09.166 A:middle
Oh yeah. He's coming for you.
00:10:10.156 --> 00:10:14.776 A:middle
Okay. So -- and then of
course as you might suspect,
00:10:15.096 --> 00:10:17.576 A:middle
we would want to be able to
save these off for posterity,
00:10:17.576 --> 00:10:19.776 A:middle
so we have the export button
over here on the side,
00:10:20.276 --> 00:10:22.376 A:middle
which lets us export
to the camera roll,
00:10:22.616 --> 00:10:24.756 A:middle
either preserving the
high frame rate sections,
00:10:25.066 --> 00:10:28.526 A:middle
or going down to a constant
frame rate of say 30,
00:10:28.526 --> 00:10:29.266 A:middle
or something like that.
00:10:29.266 --> 00:10:31.116 A:middle
And that is Slowpoke.
00:10:31.116 --> 00:10:32.106 A:middle
[ Applause ]
00:10:32.106 --> 00:10:38.356 A:middle
On the playback side, AV
player does most of this
00:10:38.356 --> 00:10:39.496 A:middle
for you automatically.
00:10:40.346 --> 00:10:45.256 A:middle
If you just use player setRate,
it can select arbitrary rates
00:10:45.256 --> 00:10:47.336 A:middle
and play them back, and
do the really hard job
00:10:47.336 --> 00:10:49.516 A:middle
of keeping audio
and video in sync.
00:10:50.506 --> 00:10:53.886 A:middle
There's a new property
on the player item.
00:10:53.886 --> 00:10:56.116 A:middle
A player is composed
of player items,
00:10:56.156 --> 00:10:57.286 A:middle
because it's a queue model.
00:10:57.926 --> 00:10:59.206 A:middle
You can take the player item
00:10:59.206 --> 00:11:01.426 A:middle
and set its audio
time pitch algorithm,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:10:59.206 --> 00:11:01.426 A:middle
and set its audio
time pitch algorithm,
00:11:01.426 --> 00:11:04.426 A:middle
that's what I was using there to
either adjust the pitch higher
00:11:04.426 --> 00:11:05.786 A:middle
or lower, or keep it constant.
00:11:05.786 --> 00:11:08.946 A:middle
I was using the bottom
two constants there,
00:11:08.946 --> 00:11:12.616 A:middle
which are spectral, which keeps
it preserved, and varispeed,
00:11:12.816 --> 00:11:14.106 A:middle
which alters the pitch.
00:11:14.536 --> 00:11:16.896 A:middle
And these are very high
quality algorithms.
00:11:16.896 --> 00:11:21.456 A:middle
They can go constantly from
32x down to 1 over 32x.
00:11:21.846 --> 00:11:22.666 A:middle
And they sound great.
00:11:23.316 --> 00:11:28.906 A:middle
On the editing side, I was using
AV mutable composition to build
00:11:28.906 --> 00:11:33.216 A:middle
up those temporal edits when I
saved off that scaled section.
00:11:33.676 --> 00:11:38.836 A:middle
I did that by creating an empty
composition, inserting all
00:11:38.836 --> 00:11:41.646 A:middle
of my source asset
into that composition,
00:11:42.376 --> 00:11:44.696 A:middle
and then choosing the section
that I wanted to scale up
00:11:44.696 --> 00:11:47.196 A:middle
or down, just by
using scale time range
00:11:47.276 --> 00:11:49.116 A:middle
to duration, very simple.
00:11:50.726 --> 00:11:53.726 A:middle
See the Slowpoke sample code
where you can find out how
00:11:53.726 --> 00:11:54.816 A:middle
to do all this yourselves.
00:11:55.116 --> 00:11:58.036 A:middle
And if you're interested in
the editing aspect of this,
00:11:58.036 --> 00:12:01.006 A:middle
I invite you to come back
tomorrow at 9:00 a.m.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:11:58.036 --> 00:12:01.006 A:middle
I invite you to come back
tomorrow at 9:00 a.m.
00:12:01.136 --> 00:12:03.456 A:middle
where we're having an
advanced editing session
00:12:03.726 --> 00:12:04.696 A:middle
with AV foundation.
00:12:05.496 --> 00:12:12.296 A:middle
On the export side, I'm using AV
asset export session to flatten
00:12:12.296 --> 00:12:13.506 A:middle
that out into a new movie.
00:12:13.506 --> 00:12:16.256 A:middle
Now as I mentioned, there
are two ways to do this.
00:12:16.726 --> 00:12:20.666 A:middle
You can use the pass-through
export preset if you want
00:12:20.666 --> 00:12:22.296 A:middle
to avoid any re-encoding.
00:12:22.376 --> 00:12:23.826 A:middle
That will just retime the media,
00:12:24.176 --> 00:12:27.986 A:middle
and send it out as section
60 frames per second,
00:12:28.096 --> 00:12:29.676 A:middle
section slowed down or sped up.
00:12:30.996 --> 00:12:33.026 A:middle
Or you can do a constant
frame rate export.
00:12:33.156 --> 00:12:34.036 A:middle
You might want to do this