Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 937643006: Pepper: add video_encoder example (Closed)

Created:
5 years, 10 months ago by llandwerlin-old
Modified:
5 years, 6 months ago
Reviewers:
bbudge
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@bbudge-ppb-video-encoder-impl
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pepper: add video_encoder example BUG=417589 TEST=run ppapi/examples/video_encode/video_encode.html Committed: https://crrev.com/5f3145d574f2631845867f37a38adec12dab1a7f Cr-Commit-Position: refs/heads/master@{#318785}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Nits update #

Total comments: 7

Patch Set 3 : Always encode the latest frame #

Total comments: 8

Patch Set 4 : Final nits #

Patch Set 5 : Missing GN build files #

Patch Set 6 : Fix native compilation on Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+643 lines, -3 lines) Patch
M ppapi/examples/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + ppapi/examples/video_encode/BUILD.gn View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
A ppapi/examples/video_encode/video_encode.cc View 1 2 3 4 5 1 chunk +502 lines, -0 lines 0 comments Download
A ppapi/examples/video_encode/video_encode.html View 1 2 1 chunk +127 lines, -0 lines 0 comments Download
M ppapi/ppapi_tests.gypi View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
llandwerlin-old
Maybe with can get the review going on the example in parallel. Depends on https://codereview.chromium.org/905023005/
5 years, 10 months ago (2015-02-18 16:13:31 UTC) #2
bbudge
https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc#newcode1 ppapi/examples/video_encode/video_encode.cc:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
5 years, 10 months ago (2015-02-18 23:43:24 UTC) #3
llandwerlin-old
https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc#newcode305 ppapi/examples/video_encode/video_encode.cc:305: } On 2015/02/18 23:43:24, bbudge wrote: > I don't ...
5 years, 10 months ago (2015-02-19 00:22:25 UTC) #4
llandwerlin-old
https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc#newcode1 ppapi/examples/video_encode/video_encode.cc:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
5 years, 10 months ago (2015-02-19 16:04:14 UTC) #5
bbudge
https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/1/ppapi/examples/video_encode/video_encode.cc#newcode305 ppapi/examples/video_encode/video_encode.cc:305: } On 2015/02/19 00:22:25, llandwerlin wrote: > On 2015/02/18 ...
5 years, 10 months ago (2015-02-19 21:54:38 UTC) #6
llandwerlin-old
The example is not displaying the size of the bitstream buffer, giving some feedback on ...
5 years, 9 months ago (2015-02-27 14:19:44 UTC) #7
llandwerlin-old
On 2015/02/27 14:19:44, llandwerlin wrote: > The example is not displaying the size of the ...
5 years, 9 months ago (2015-02-27 14:20:12 UTC) #8
bbudge
LGTM w/comments https://codereview.chromium.org/937643006/diff/40001/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/40001/ppapi/examples/video_encode/video_encode.cc#newcode86 ppapi/examples/video_encode/video_encode.cc:86: class MediaStreamVideoEncoderModule : public pp::Module { VideoEncoderModule/Instance ...
5 years, 9 months ago (2015-03-02 17:52:04 UTC) #9
llandwerlin-old
Thanks! https://codereview.chromium.org/937643006/diff/40001/ppapi/examples/video_encode/video_encode.cc File ppapi/examples/video_encode/video_encode.cc (right): https://codereview.chromium.org/937643006/diff/40001/ppapi/examples/video_encode/video_encode.cc#newcode86 ppapi/examples/video_encode/video_encode.cc:86: class MediaStreamVideoEncoderModule : public pp::Module { On 2015/03/02 ...
5 years, 9 months ago (2015-03-02 18:21:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/937643006/60001
5 years, 9 months ago (2015-03-02 18:23:02 UTC) #13
llandwerlin-old
Sorry, I completely missed the GN build files that were added last month.
5 years, 9 months ago (2015-03-02 18:32:58 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/937643006/80001
5 years, 9 months ago (2015-03-02 18:34:55 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/59825)
5 years, 9 months ago (2015-03-02 19:38:06 UTC) #20
bbudge
On 2015/03/02 19:38:06, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 9 months ago (2015-03-02 19:42:50 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/937643006/100001
5 years, 9 months ago (2015-03-02 21:26:33 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 9 months ago (2015-03-02 22:45:14 UTC) #25
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/5f3145d574f2631845867f37a38adec12dab1a7f Cr-Commit-Position: refs/heads/master@{#318785}
5 years, 9 months ago (2015-03-02 22:46:27 UTC) #26
Stevefar
On 2015/02/18 16:13:31, llandwerlin wrote: > Maybe with can get the review going on the ...
5 years, 6 months ago (2015-06-11 19:43:39 UTC) #27
llandwerlin-old
On 2015/06/11 19:43:39, Stevefar wrote: > On 2015/02/18 16:13:31, llandwerlin wrote: > > Maybe with ...
5 years, 6 months ago (2015-06-16 09:28:56 UTC) #28
Stevefar
On 2015/06/16 09:28:56, llandwerlin wrote: > On 2015/06/11 19:43:39, Stevefar wrote: > > On 2015/02/18 ...
5 years, 6 months ago (2015-06-16 21:50:21 UTC) #29
llandwerlin-old
5 years, 6 months ago (2015-06-17 15:09:32 UTC) #30
Message was sent while issue was closed.
On 2015/06/16 21:50:21, Stevefar wrote:
> On 2015/06/16 09:28:56, llandwerlin wrote:
> > On 2015/06/11 19:43:39, Stevefar wrote:
> > > On 2015/02/18 16:13:31, llandwerlin wrote:
> > > > Maybe with can get the review going on the example in parallel. Depends
on
> > > > https://codereview.chromium.org/905023005/
> > > 
> > > When I run the example, it produces video that is slightly sped up. My
guess
> > is
> > > that it is capturing less than the needed 30fps (the example seems to have
> > 30fps
> > > hard coded in places). Unfortunately when i pass in the mediaconstraints
> > {audio:
> > > false, video:{ mandatory: { minFrameRate: 30 } } i get a
> > > ConstraintNotSatisfiedError which is strange since i am on 2015 macbook.
Is
> > this
> > > a problem with the example ? Are you able to capture 30fps ?
> > > 
> > > thanks for the example,
> > > Steve
> > 
> > Hi Steve,
> > 
> > It depends on the codec you're encoding with and also the player used to
play
> > the video.
> > 
> > When encoding in h264, the generated file is just the concatenation of the
> > bitstream packets returned by the encoder. There are no timestamps included
in
> > that stream. So it might be replayed faster depending on the player you're
> using
> > (VLC seems to play at 30fps by default so it should be displayed correctly).
> > 
> > A VP8 stream cannot be read without extra metadata information, so the
example
> > implements a simple IVF container which adds timestamps to the frames. So
VP8
> > encoded videos should play at the correct speed.
> > 
> > You will need to implement the container of your choice for the h264
bitstream
> > (RTP or MP4 for example), it obviously depends on your application's needs.
> > 
> > Thanks,
> > 
> > Lionel
> 
> Thanks Lionel,
> 
> After recording a 30 second example with the vp8 codec on my macbook,
> downloading it, and opening it with the VLC player, the resulting video only
> plays 25 seconds. When I try to convert it with ffmpeg, "ffmpeg -i src_file
> result.mp4" the resulting video is also 25 seconds (i tried varies parameters
> for vsync and such). It could be that I am not understanding something. Any
idea
> whats going on here?
> 
> Thanks again,
> Steve

Thanks for bringing this to our attention Steve.
The drift is not as important on my Chromebook (< 1s for a 30s stream), but here
is patch to improve the accuracy of the encoding ticks in the example :
https://codereview.chromium.org/1187193006

Powered by Google App Engine
This is Rietveld 408576698