[Ssc-dev] new FFMpeg need

Harlo Holmes harlo at guardianproject.info
Tue Jul 16 00:16:47 EDT 2013


You're right about bash-- support for md5 might not be in the ffmpeg build,
which I can deduce from "Requested output format 'md5' is not a suitable
output format."  I'll run "ffmpeg -formats" in android tomorrow to
confirm...

(Attaching happy and sad ffmpeg output for now...)

++++++++++++++++++++++++++
Research Fellow, Head of Metadata
The Guardian Project <https://guardianproject.info>

pgp: 0xA4469630
twitter: @harlo


On Tue, Jul 16, 2013 at 12:02 AM, Hans-Christoph Steiner <
hans at guardianproject.info> wrote:

>
> I don't think bash is going to affect how ffmpeg runs.  Android does not
> have
> bash anyhow.  Or maybe I'm not understanding what you're saying.
>
> If you have it working on the desktop, then I think the thing to do is
> compare
> the logs that ffmpeg outputs on each platform.  I often use a GUI diff like
> FileMerge on the mac for this.  Save each output log to a text file, then
> open
> them both in FileMerge.
>
> .hc
>
> On 07/15/2013 11:56 PM, Harlo Holmes wrote:
> > Just cycling back to this.
> >
> > It appears that the problem isn't with FFMPEG-- we have access to the raw
> > video no matter the command, but adding "-f md5" (which works on the
> > desktop version) fails on android because, *i think*, md5 is not
> supported
> > in bash?  So, I suppose a work-around would be to introduce a pipe to
> > funnel that call's output to another executable capable of hashing?
> >
> > For instance, if I run (on desktop!):
> > ffmpeg -i <video file> -f rawvideo -pix_fmt rgb24 - | openssl md5
> >
> > that works kind of.  i get a different hash, though, than if i ran:
> > ffmpeg -i <video file> -f rawvideo -pix_fmt rgb24 -f md5 -
> >
> > ...so I don't really know if my hunch is correct...
> >
> >
> >
> > ++++++++++++++++++++++++++
> > Research Fellow, Head of Metadata
> > The Guardian Project <https://guardianproject.info>
> >
> > pgp: 0xA4469630
> > twitter: @harlo
> >
> > ++++++++++++++++++++++++++
> > Research Fellow, Head of Metadata
> > The Guardian Project <https://guardianproject.info>
> >
> > pgp: 0xA4469630
> > twitter: @harlo
> >
> >
> > On Tue, Jul 9, 2013 at 3:50 PM, Hans-Christoph Steiner <
> > hans at guardianproject.info> wrote:
> >
> >>
> >> How new is the MD5 feature?  In my experience, stuff that's been in
> ffmpeg
> >> works well, but can often be quite tricky to config properly to get it
> >> actually running.  Are you looking to have the MD5 for the whole video,
> or
> >> per
> >> frame?
> >>
> >> I found one instruction that said per-frame MD5 works like this:
> >> ffmpeg -i video.avi -f framemd5 checksum_output.txt
> >>
> >> Here's someone else's attempt at something similar:
> >>
> >> ffmpeg -vsync 0 -i ../x264/park.264 -v 2 -an -vcodec rawvideo -f md5 -
> >>
> >> It looks like it might only work with a single -f arg.  Have you tried
> >> this on
> >> the desktop? that's generally a lot easier place to start.
> >>
> >> .hc
> >>
> >> On 07/08/2013 05:45 PM, Harlo Holmes wrote:
> >>> Hi all, but especially Hans:
> >>>
> >>> We are hoping to do video hashing using the very expeditious FFMpeg
> >>> rawvideo module and hashing that to md5.  (Also, doing the same with
> the
> >>> audio)  The module seems to be supported, but the exporting to md5
> fails.
> >>>  I tried doing this on android running the following (and am including
> >>> pastebin output below):
> >>>
> >>> ffmpeg -i /storage/sdcard0/InformaCam/1373319350714tmp.mp4 -f rawvideo
> >>> -pix_fmt rgb24 -f md5 -
> >>>
> >>> http://pastebin.com/rhQtHyAf
> >>>
> >>> While we could do hashing in a different way, this is obviously the
> best
> >>> way to skin the cat.  Would it be possible to include it?  If not, how
> >>> might I handle receiving the stream and performing the hashing
> manually?
> >>>
> >>> Thanks,
> >>> Harlo
> >>>
> >>> ++++++++++++++++++++++++++
> >>> Research Fellow, Head of Metadata
> >>> The Guardian Project <https://guardianproject.info>
> >>>
> >>> pgp: 0xA4469630
> >>> twitter: @harlo
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Ssc-dev mailing list
> >>>
> >>> Post: Ssc-dev at lists.mayfirst.org
> >>> List info: https://lists.mayfirst.org/mailman/listinfo/ssc-dev
> >>>
> >>> To Unsubscribe
> >>>         Send email to:  Ssc-dev-unsubscribe at lists.mayfirst.org
> >>>         Or visit:
> >>
> https://lists.mayfirst.org/mailman/options/ssc-dev/hans%40guardianproject.info
> >>>
> >>> You are subscribed as: hans at guardianproject.info
> >>>
> >>
> >> --
> >> PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
> >> _______________________________________________
> >> Ssc-dev mailing list
> >>
> >> Post: Ssc-dev at lists.mayfirst.org
> >> List info: https://lists.mayfirst.org/mailman/listinfo/ssc-dev
> >>
> >> To Unsubscribe
> >>         Send email to:  Ssc-dev-unsubscribe at lists.mayfirst.org
> >>         Or visit:
> >>
> https://lists.mayfirst.org/mailman/options/ssc-dev/harlo.holmes%40gmail.com
> >>
> >> You are subscribed as: harlo.holmes at gmail.com
> >>
> >
>
> --
> PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/ssc-dev/attachments/20130716/0203afc9/attachment-0001.html>
-------------- next part --------------
~/ORG/witness/research/tests $ ffmpeg -i testvid_clone.mp4 -f rawvideo -pix_fmt rgb24 -f md5 -
ffmpeg version N-42045-g439e32f Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 29 2012 14:57:14 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
  configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64
  libavutil      51. 63.100 / 51. 63.100
  libavcodec     54. 31.100 / 54. 31.100
  libavformat    54. 14.100 / 54. 14.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testvid_clone.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.93.0
  Duration: 00:00:13.84, start: 0.000000, bitrate: 8123 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 8124 kb/s, 30.08 fps, 30 tbr, 1k tbn, 2k tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 96 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
[graph 0 input from stream 0:0 @ 0x100e155b0] w:1280 h:720 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:0/1 sws_param:flags=2
[output stream 0:0 @ 0x100e158f0] No opaque field provided
[swscaler @ 0x10105e200] No accelerated colorspace conversion found from yuv420p to rgb24.
[swscaler @ 0x101065600] No accelerated colorspace conversion found from yuv420p to rgb24.
[swscaler @ 0x10106ca00] No accelerated colorspace conversion found from yuv420p to rgb24.
[auto-inserted scaler 0 @ 0x100e15d30] w:1280 h:720 fmt:yuv420p sar:0/1 -> w:1280 h:720 fmt:rgb24 sar:0/1 flags:0x4
[graph 1 input from stream 0:1 @ 0x100e16470] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x4
Output #0, md5, to 'pipe:':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.14.100
    Stream #0:0(eng): Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720, q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> rawvideo)
  Stream #0:1 -> #0:1 (aac -> pcm_s16le)
Press [q] to stop, [?] for help
MD5=051251bc8c20d116312595cc27f539a8  0kB time=00:00:13.36 bitrate=   0.0kbits/s    
frame=  411 fps= 66 q=0.0 Lsize=       0kB time=00:00:13.70 bitrate=   0.0kbits/s    
video:1109700kB audio:1298kB subtitle:0 global headers:0kB muxing overhead -99.999997%
-------------- next part --------------
D/**************** InformaCam: FFMPEG ****************(19702): command to ffmpeg: /data/data/org.witness.iwitness/app_bin/ffmpeg -i /storage/sdcard0/InformaCam/1373319350714tmp.mp4 -f rawvideo -pix_fmt rgb24 -f md5 -
D/**************** InformaCam: FFMPEG ****************(19702): ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
D/**************** InformaCam: FFMPEG ****************(19702): ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
D/**************** InformaCam: FFMPEG ****************(19702):   built on Aug 24 2012 23:16:17 with gcc 4.6.x-google 20120106 (prerelease)
D/**************** InformaCam: FFMPEG ****************(19702):   built on Aug 24 2012 23:16:17 with gcc 4.6.x-google 20120106 (prerelease)
D/**************** InformaCam: FFMPEG ****************(19702):   configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable-shared --enable-static --cross-prefix=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk/platforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon' --extra-ldflags=-L../x264 --enable-small --enable-version3 --enable-gpl --disable-doc --enable-yasm --disable-decoders --enable-decoder=aac --enable-decoder=amrnb --enable-decoder=amrwb --enable-decoder=h264 --enable-decoder=mjpeg --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=pcm_f32le --enable-decoder=pcm_s16le --enable-decoder=pcm_u16le --disable-encoders --enable-encoder=aac --enable-encoder=libx264 --enable-encoder=mpeg2video --enable-encoder=mpeg4 --enable-encoder=pcm_f32le --enable-encoder=pcm_s16le --enable-encoder=pcm_u16le --disable-muxers --enable-muxer=mp4 --enable-muxer=mat  libavutil      51. 54.100 / 51. 54.100
D/**************** InformaCam: FFMPEG ****************(19702):   configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/org.witness.sscvideoproto --enable-pic --disable-shared --enable-static --cross-prefix=/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk/platforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon' --extra-ldflags=-L../x264 --enable-small --enable-version3 --enable-gpl --disable-doc --enable-yasm --disable-decoders --enable-decoder=aac --enable-decoder=amrnb --enable-decoder=amrwb --enable-decoder=h264 --enable-decoder=mjpeg --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=pcm_f32le --enable-decoder=pcm_s16le --enable-decoder=pcm_u16le --disable-encoders --enable-encoder=aac --enable-encoder=libx264 --enable-encoder=mpeg2video --enable-encoder=mpeg4 --enable-encoder=pcm_f32le --enable-encoder=pcm_s16le --enable-encoder=pcm_u16le --disable-muxers --enable-muxer=mp4 --enable-muxer=mat  libavutil      51. 54.100 / 51. 54.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavcodec     54. 23.100 / 54. 23.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavcodec     54. 23.100 / 54. 23.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavformat    54.  6.100 / 54.  6.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavformat    54.  6.100 / 54.  6.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavdevice    54.  0.100 / 54.  0.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavdevice    54.  0.100 / 54.  0.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavfilter     2. 77.100 /  2. 77.100
D/**************** InformaCam: FFMPEG ****************(19702):   libavfilter     2. 77.100 /  2. 77.100
D/**************** InformaCam: FFMPEG ****************(19702):   libswscale      2.  1.100 /  2.  1.100
D/**************** InformaCam: FFMPEG ****************(19702):   libswscale      2.  1.100 /  2.  1.100
D/**************** InformaCam: FFMPEG ****************(19702):   libswresample   0. 15.100 /  0. 15.100
D/**************** InformaCam: FFMPEG ****************(19702):   libswresample   0. 15.100 /  0. 15.100
D/**************** InformaCam: FFMPEG ****************(19702):   libpostproc    52.  0.100 / 52.  0.100
D/**************** InformaCam: FFMPEG ****************(19702):   libpostproc    52.  0.100 / 52.  0.100
D/**************** InformaCam: FFMPEG ****************(19702): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/sdcard0/InformaCam/1373319350714tmp.mp4':
D/**************** InformaCam: FFMPEG ****************(19702): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/sdcard0/InformaCam/1373319350714tmp.mp4':
D/**************** InformaCam: FFMPEG ****************(19702):   Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):   Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):     major_brand     : isom
D/**************** InformaCam: FFMPEG ****************(19702):     major_brand     : isom
D/**************** InformaCam: FFMPEG ****************(19702):     minor_version   : 0
D/**************** InformaCam: FFMPEG ****************(19702):     minor_version   : 0
D/**************** InformaCam: FFMPEG ****************(19702):     compatible_brands: isom3gp4
D/**************** InformaCam: FFMPEG ****************(19702):     compatible_brands: isom3gp4
D/**************** InformaCam: FFMPEG ****************(19702):     creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):     creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):   Duration: 00:00:03.32, start: 0.000000, bitrate: 15457 kb/s
D/**************** InformaCam: FFMPEG ****************(19702):   Duration: 00:00:03.32, start: 0.000000, bitrate: 15457 kb/s
D/**************** InformaCam: FFMPEG ****************(19702):     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, 16989 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
D/**************** InformaCam: FFMPEG ****************(19702):     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, 16989 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
D/**************** InformaCam: FFMPEG ****************(19702):     Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):     Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):       rotate          : 90
D/**************** InformaCam: FFMPEG ****************(19702):       rotate          : 90
D/**************** InformaCam: FFMPEG ****************(19702):       creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):       creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):       handler_name    : VideoHandle
D/**************** InformaCam: FFMPEG ****************(19702):       handler_name    : VideoHandle
D/**************** InformaCam: FFMPEG ****************(19702):     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 122 kb/s
D/**************** InformaCam: FFMPEG ****************(19702):     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 122 kb/s
D/**************** InformaCam: FFMPEG ****************(19702):     Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):     Metadata:
D/**************** InformaCam: FFMPEG ****************(19702):       creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):       creation_time   : 2013-07-08 21:34:55
D/**************** InformaCam: FFMPEG ****************(19702):       handler_name    : SoundHandle
D/**************** InformaCam: FFMPEG ****************(19702):       handler_name    : SoundHandle
D/**************** InformaCam: FFMPEG ****************(19702): [NULL @ 0x57b790] Requested output format 'md5' is not a suitable output format
D/**************** InformaCam: FFMPEG ****************(19702): [NULL @ 0x57b790] Requested output format 'md5' is not a suitable output format
D/**************** InformaCam: FFMPEG ****************(19702): pipe:: Invalid argument
D/**************** InformaCam: FFMPEG ****************(19702): pipe:: Invalid argument


More information about the Ssc-dev mailing list