[Ssc-dev] Sample for FFMPEG metadata attachment

Hans-Christoph Steiner hans at guardianproject.info
Tue Aug 21 15:26:08 EDT 2012


Hey Harlo,

It seems that ffmpeg 0.11.1 works for the metadata embedding, and I've
gotten the audio and video plugins to build in 0.11.1 (just about to
test them).  How do I know that the metadata stuff is working right?
(Perhaps you could jump on IRC)


$ ./ffmpeg -i test.mp4 \
	-attach attach.txt -metadata:s:2 mimetype=text/plain \
	-acodec copy -vcodec copy testattach.mkv
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 21 2012 14:53:31 with gcc 4.6.3
  configuration:
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf53.32.100
  Duration: 00:01:00.06, start: 0.000000, bitrate: 2364 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
720x480, 2303 kb/s, 29.96 fps, 29.92 tbr, 359 tbn, 59.83 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono,
s16, 61 kb/s
    Metadata:
      handler_name    : SoundHandler
ret 1, stream_spec 2
Output #0, matroska, to 'testattach.mkv':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.6.100
    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 720x480,
q=2-31, 2303 kb/s, 29.96 fps, 1k tbn, 359 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono, 61
kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2: Attachment: none
    Metadata:
      filename        : attach.txt
      mimetype        : text/plain
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  File attach.txt -> Stream #0:2
Press [q] to stop, [?] for help
frame= 1796 fps=0.0 q=-1.0 Lsize=   17325kB time=00:00:00.00 bitrate=
0.0kbits/s
video:16855kB audio:450kB global headers:0kB muxing overhead 0.116950%


On 08/21/2012 03:07 PM, Harlo Holmes wrote:
> Nope; redaction isn't needed for the IBA version of informacam.
> 
> On Tue, Aug 21, 2012 at 2:36 PM, Hans-Christoph Steiner <
> hans at guardianproject.info> wrote:
> 
>>
>> I was just working with ffmpeg master and the bad news is that neither
>> the audio nor video redaction plugin is close to compiling for
>> ffmpeg/master.  It seems they've changed the plugin API quite a bit
>> between 0.10.4 and master.
>>
>> IIRC, Harlo, for this round, you don't need redaction for InformaCam?
>>
>> .hc
>>
>> On 08/16/2012 04:35 PM, Harlo Holmes wrote:
>>> Hi Hans,
>>>
>>> As requested, here's the output from FFMPEG as I create a MKV from a
>> source
>>> video with an  arbitrary file attached:
>>>
>>> $ ffmpeg -i testvid.mp4 -attach attach.txt -metadata:s:2
>>> mimetype=text/plain -acodec copy -vcodec copy testattach.mkv
>>>
>>> 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.mp4':
>>>   Metadata:
>>>     major_brand     : isom
>>>     minor_version   : 0
>>>     compatible_brands: isom3gp4
>>>     creation_time   : 1946-02-27 18:15:01
>>>   Duration: 00:00:13.84, start: 0.000000, bitrate: 8348 kb/s
>>>     Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661),
>> yuv420p,
>>> 1280x720, 8104 kb/s, SAR 65536:65536 DAR 16:9, 30 fps, 30 tbr, 90k tbn,
>>> 180k tbc
>>>     Metadata:
>>>       rotate          : 90
>>>       creation_time   : 1946-02-27 18:15:01
>>>       handler_name    : VideoHandle
>>>     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono,
>> s16,
>>> 96 kb/s
>>>     Metadata:
>>>       creation_time   : 1946-02-27 18:15:01
>>>       handler_name    : SoundHandle
>>> File 'testattach.mkv' already exists. Overwrite ? [y/N] y
>>> Output #0, matroska, to 'testattach.mkv':
>>>   Metadata:
>>>     major_brand     : isom
>>>     minor_version   : 0
>>>     compatible_brands: isom3gp4
>>>     encoder         : Lavf54.14.100
>>>     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720
>>> [SAR 65536:65536 DAR 16:9], q=2-31, 8104 kb/s, 30 fps, 1k tbn, 90k tbc
>>>     Metadata:
>>>       rotate          : 90
>>>       creation_time   : 1946-02-27 18:15:01
>>>       handler_name    : VideoHandle
>>>     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, 96
>>> kb/s
>>>     Metadata:
>>>       creation_time   : 1946-02-27 18:15:01
>>>       handler_name    : SoundHandle
>>>     Stream #0:2: Attachment: none
>>>     Metadata:
>>>       filename        : attach.txt
>>>       mimetype        : text/plain
>>> Stream mapping:
>>>   Stream #0:0 -> #0:0 (copy)
>>>   Stream #0:1 -> #0:1 (copy)
>>>   File attach.txt -> Stream #0:2
>>> Press [q] to stop, [?] for help
>>> frame=  411 fps=0.0 q=-1.0 Lsize=   13723kB time=00:00:00.00 bitrate=
>>> 0.0kbits/s
>>> video:13551kB audio:162kB subtitle:0 global headers:0kB muxing overhead
>>> 0.067430%
>>>
>>>
>>> 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
>>>
>> _______________________________________________
>> 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
>>
> 


More information about the Ssc-dev mailing list