Howto?

28 views
Skip to first unread message

ldesmons

unread,
Jun 16, 2008, 6:48:05 AM6/16/08
to FLVmeta Discussion
Hi,
I'm interested in flvmeta to inject metadata in an existing flv file.
I don't see how I'm supposed to use it. flvmeta accepts an input_file
and an output_file but how can I add specific tags?
With flvtool2 it's: flvtool2 -U -t tags.xml myfile.flv
Also, is flvmeta able to add keyframes data automatically like
flvtool2 -k option?
Thanks in advance.

Laurent Desmons

Marc Noirot

unread,
Jun 16, 2008, 1:30:15 PM6/16/08
to flvmeta...@googlegroups.com
Hello,
flvmeta, in its 1.0 branch, is only able to compute and insert a
predefined set of tags.
However, the 1.1 branch that is in development will add support for
arbitrary tags for onMetadata.

I don't really understand what the -k option in flvtool2 actually does.
Could someone please explain me the magic of cue points in FLV files ?

Regards,
Marc

ldesmons

unread,
Jun 17, 2008, 2:53:26 AM6/17/08
to FLVmeta Discussion
Thanks for your answer.
The k option adds keyframes info into metadata with the position of
each second of the movie in bytes. It allows fast positionning in the
movie with player compatible with this kind of "streaming".
See http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two
As for cue points, I understood that it could trigger events and start
a procedure when reached but it's not really clear either for me.
What would be great with flvmeta 1.1 would be the ability to store any
fancy thing in the metadata like the name of the capturing device, the
weather conditions, the name of the moviemaker, etc...

ldesmons

unread,
Jun 17, 2008, 2:57:43 AM6/17/08
to FLVmeta Discussion
Just an example of keyframes that can be injected automatically with
flvtool2:

<pre>

<keyframes>
<times>
<value>0</value>
<value>0.48</value>
<value>0.96</value>
<value>1.44</value>
<value>1.92</value>
<value>2.4</value>
<value>2.88</value>
<value>3.36</value>
</times>
<filepositions>
<value>38779</value>
<value>78921</value>
<value>119351</value>
<value>147931</value>
<value>175423</value>
<value>205333</value>
<value>224028</value>
<value>257040</value>
</filepositions>
</keyframes>

</pre>

Marc Noirot

unread,
Jun 17, 2008, 5:44:15 AM6/17/08
to flvmeta...@googlegroups.com
Oh, then I think you and I don't have the same (mis)understanding of
the -k option.
Actually, flvtool2, using only the -U command, already adds keyframes
into the metadata.
flvmeta 1.0.x does that too. It was actually the point in creating
that tool from the very beginning.

You can check that by using the flvdump tool with a file previously
modified by flvmeta.
For instance, flvdump might give the following output:

$ flvdump out.flv
Magic: FLV
Version: 1
Has audio: yes
Has video: yes
Offset: 9
--- Tag #1 at 0xD (13) ---
Tag type: Meta
Body length: 1746
Timestamp: 0
* Metadata event name: onMetaData
* Metadata contents: {
hasMetadata => true
hasVideo => true
hasAudio => true
duration => 125.883000
lasttimestamp => 125.857000
lastkeyframetimestamp => 125.823000
width => 320.000000
height => 240.000000
videodatarate => 307.728766
framerate => 29.543306
audiodatarate => 31.402858
audiosamplerate => 22000.000000
audiosamplesize => 16.000000
stereo => false
filesize => 5602856.000000
videosize => 5003069.000000
audiosize => 563823.000000
datasize => 5568676.000000
metadatacreator => flvmeta 1.0.6
metadatadate => Tue, 17 Jun 2008 11:43:54 Paris, Madrid
audiocodecid => 2.000000
videocodecid => 2.000000
audiodelay => -0.075000
canSeekToEnd => true
hasCuePoints => false
cuePoints => [
]
hasKeyframes => true
keyframes => {
times: [
0.075000
2.108000
4.108000
6.108000
8.108000
10.108000
12.108000
14.108000
16.108000
18.108000
20.108000
22.108000
24.108000
26.108000
28.108000
30.108000
32.108000
34.108000
36.108000
38.108000
40.108000
42.108000
44.108000
46.108000
48.108000
50.108000
52.108000
54.108000
56.108000
58.141000
60.141000
62.141000
64.141000
66.141000
68.141000
70.141000
72.141000
74.141000
76.141000
78.141000
80.141000
82.141000
84.141000
86.141000
88.141000
90.141000
92.141000
94.141000
96.141000
98.141000
100.141000
102.141000
104.141000
106.141000
108.141000
110.141000
112.208000
114.908000
117.274000
119.508000
121.508000
123.508000
125.823000
]
filepositions: [
2137.000000
92621.000000
182354.000000
273019.000000
363253.000000
454007.000000
543577.000000
633950.000000
723823.000000
814436.000000
904270.000000
994332.000000
1086085.000000
1175124.000000
1265148.000000
1355310.000000
1445701.000000
1535971.000000
1626111.000000
1716426.000000
1806923.000000
1896895.000000
1986974.000000
2077379.000000
2179049.000000
2257262.000000
2347448.000000
2446678.000000
2529658.000000
2618192.000000
2708432.000000
2799805.000000
2888874.000000
2979466.000000
3069465.000000
3165649.000000
3249933.000000
3340109.000000
3430300.000000
3520388.000000
3610882.000000
3700639.000000
3791092.000000
3881580.000000
3971908.000000
4061675.000000
4151947.000000
4242142.000000
4332503.000000
4422737.000000
4512910.000000
4602941.000000
4693511.000000
4783478.000000
4873492.000000
4963991.000000
5054340.000000
5172420.000000
5252169.000000
5330941.000000
5421082.000000
5511412.000000
5599613.000000
]
}
}
[...]

Reply all
Reply to author
Forward
0 new messages