Video and filmstrip issues with mobile

I’m trying to use a mac as a nodejs mobile agent. I used brew to install nodejs, ffmpeg, adb, android platform tools, and imagemagick.

Everything is working great with my rooted Nexus 5.

The only issue is filmstrips and videos. They aren’t showing up in the results.

The page for the filmstrip is looking in the path below, but that directory is empty on the server.

results/14/10/07/NK/C/video_1/

However, this directory has the actual video:

results/14/10/07/NK/C/1_video.mp4
results/14/10/07/NK/C/1_Cached_video.mp4

Any ideas about what’s missing or where it may be breaking?

I’m assuming there is something that breaks up the video that is missing or causing this to bomb.

In order to break up the video into filmstrips and generate a video for display, you’ll need a UrlBlast Agent on Windows. It’s that that does the video processing.

Pat is looking to move processing server-side in the near-future as it’s now the only reason you’d need a UrlBlast Agent.

Thanks for the prompt response. I’m going to fix it so the film strip doesn’t prevent video playback.

Actually, urlblast is only used for going from filmstrip to rendered video.

The breaking up of the video is done on the server with ffmpeg and imagemagick. It requires a specific version of ffmpeg though (relies on some debug information to include the frame times while de-duping frames).

What platform is the server running?

So why is this just mobile related? Tests run on the desktop windows agents show video and filmstrip just fine.
[hr]
The server is running Centos 6 and again, this is just happening for mobile which runs from my mac. Desktop agents (windows based) work fine.

Desktop agents capture video as individual frames directly. Mobile uses on-device video capture support to capture the mp4 video and then takes care of breaking it up into the unique frames on the server.

What version information do you get on your server when you run “ffmpeg” from the shell?

It needs to be from the 1.x series:

ffmpeg version 1.2.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep 24 2013 06:42:59 with gcc 4.8 (Debian 4.8.1-10)
  configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Hyper fast Audio and Video encoder

If it a 64-bit centos I have the static build of ffmpeg that I use on the WPT server that you can download from here: http://www.webpagetest.org/software/ffmpeg

Just make sure to overwrite the one installed by the system ot at least make sure it’s the one in the path so the web user will run it.

btw, the plan is to move the video processing to the nodejs machine so the server isn’t a bottleneck. I’ll see if there is something in the newer ffmpeg releases that gives similar information about the stream to hopefully make it less brittle.

Using the built-in frame de-duplication in ffmpeg reduces the video processing overhead by at least an order of magnitude so it’s pretty critical. Unfortunately when the unique frames are output there’s no way to get the original time (they just come out in numbered sequence 1,2,3,etc). The debug information is used to reconstruct the original timestamp where each frame occurred.

Thanks Pat. I built my own ffmpeg on the server which didn’t work. Then I tried your version and it didn’t work.

What i mean by doesn’t work is existing tests that didn’t have filmstrips and wouldn’t play videos, still don’t. Are the filmstrips only created when the test is initially sent to the server?

[root@c1-wpt1 bin]# ffmpeg
ffmpeg version n1.2.9 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct  7 2014 16:19:16 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Yes, the videos are only extracted on first upload. If you have video/reprocess.php on the server (not sure when I added it) you can force a video to be reprocessed by loading http:///video/reprocess.php&test=

Sweet tip! Thanks!
[hr]

Didn’t work. The filmstrip still isn’t present.

http://server/video/reprocess.php?test=141007_RS_J
Reprocessing ./results/14/10/07/RS/J/1_Cached_video.mp4…
Reprocessing ./results/14/10/07/RS/J/1_video.mp4…

I don’t see anything in the logs either. I guess its bombing gracefully somewhere :slight_smile:

I stepped through the code, and it’s a permissions issue. Pat thanks for the help. Your ffmpeg worked great.