flvtool2 + flv knife

30 10 2007

I have recently had many needs to view/modify the cue points in .flv files. Obviously I didn’t want to re-render the .flv by using On2Flix every time I made any changes to the cue points. So I looked around for .flv tools. After some research, I am recommending flvtool2.

The reasons I picked this one:

[+] This tool can do many things, and does them pretty well – it can slice a .flv file into small pieces, add metadata tags to a .flv file, output metadata, etc.
[+] Options to batch process files.
[+] on Windows, no installation is required to run it.
[+] While like many similar tools – this one is a command-line-only app (can be scary to non-programmers) – there is a visual interface built for it. And guess what, it was done in .swf format. Ha. Good for the .swf lovers.
[+] The learning process was pretty easy for me. I was able to get a hang of it within an hour.

The original download URL is here: go to http://www.inlet-media.de/flvtool2 and click on “Download from RubyForge”. And this is what you should read to know the basics: Flvtool2 from QuickWiki. Check out this blog entry for a more detailed tutorial on how each command and/or option works.

If you are interested on the detailed steps, read on.

[+]GETTING READY

….[+] download the program files from the original download URL I mentioned above. Choose the latest release, and .zip format for Windows.
….[+] unzip the files somewhere. I created a folder C:\Program Files\flvtool2 and flvtool2.exe sits directly under the folder, with LICENSE file and etc.
….[+] find the .flv file I want to edit, myTest.flv, and save it under the same folder as the flvtool2.exe is, for the ease of working.

[+]SETTING UP THE CMD WINDOW

..[+] click on the “start” menu, click on “Run…”, type in “cmd”. (See the attached image.) Or just go to “c:\WINDOWS\system32\cmd.exe” in an explorer window.
..[+] Right click on the title bar of the cmd window and click on “properties”. (See the attached image.) Find “Options” tab which is the first one, check the “QuickEdit Mode” box. This is to make sure we can copy/paste text in the cmd window later. Kind of important.

[+]START WORKING WITH FLVTOOL2

….[+] Task: view help content on all the available commands and options of flvtool2. (See the attached image.) In CMD, cd the flvtool2 directory, then type or copy/paste this line:

flvtool2 -H

….[+] Task: view the metadata in my .flv file, myTest.flv. (See the attached image.)
In CMD, cd the flvtool2 directory, type or copy/paste this line:

flvtool2 -P myTest.flv

….[+] Task: slice my .flv file, myTest.flv. I only need the part inbetween cue point 1 and cue Coopoint 4, so from 2140 to 27250 miliseconds.
if you want to over write the original file with the result, in CMD, cd the flvtool2 directory, type or copy/paste this line:

flvtool2 -Cio 2140 27250 myTest.flv

else if you want to keep the original .flv file and save the result as a new file, myTest_sliced.flv, in CMD, cd the flvtool2 directory, type or copy/paste this line:

flvtool2 -Cio 2140 27250 myTest.flv myTest_sliced.flv

Hit enter, then check your flvtool2 directory, there should be a new file just created called myTest_sliced.flv.
….[+] Task: update the metadata of my .flv file, myTest.flv, with an xml file. The xml file needs to have “tags” node as the root node. It can update navigation and event cue points at the same time. See the example .xml file. This time I want to save the result .flv file as a new file, myTest_with_tags.flv. In CMD, under the flvtool2 directory, type or copy/paste this line:

flvtool2 -AUt tags.xml myTest.flv myTest_with_tags.flv

Hit enter, and check your flvtool2 directory, there should be a new file just created called myTest_with_tags.flv. Print the metadata of the new file using flvtool2’s -P option, and you will see the added cue points.

Cool. Till now flvtool2 has been working pretty well except that it is hard to locate the precise timestamps of a .flv file. It will be nice to have a visual interface, won’t it? Good news for you, FLV knife is the visual interface built on top of flvtool2. You can go to http://soenkerohde.com/software/flv-knife/ to download the program.

This program does exactly what flvtool2 does, with a built-in flv player. Handy, huh? You can also learn and/or type the command lines in the bottom box in the “inject Metadata” tab. The interface design is pretty much self-explanatory. So go ahead and play with it as you wish.

For more information on .xml tag files, see this page.
For script that creates .xml files, see this page.

Like I said, there are similar tools out there. For instance, Adobe’s flvcheck and this FLVParser developed by a student can both slice .flv files. Check them out.


Actions

Information

5 responses

17 08 2008
Ven.Guno

This my comp appear this:
Microsoft Windows XP [Version 5.1.2
(C) Copyright 1985-2001 Microsoft C

C:\Documents and Settings\dhamma>

I need to go back as
C:\cd program files
C:\Program Files>cd flvtool2

Please tell me what I should type next:
Microsoft Windows XP [Version 5.1.2
(C) Copyright 1985-2001 Microsoft C

C:\Documents and Settings\dhamma> ???????????????

Thank you.

17 08 2008
Ven.Guno

In Run > CMD , This my comp appear this:
Microsoft Windows XP [Version 5.1.2
(C) Copyright 1985-2001 Microsoft C

C:\Documents and Settings\dhamma>

I need to go back as
C:\cd program files
C:\Program Files>cd flvtool2

Please tell me what I should type next:
Microsoft Windows XP [Version 5.1.2
(C) Copyright 1985-2001 Microsoft C

C:\Documents and Settings\dhamma> ???????????????

Thank you.

19 08 2008
Hu

I am not sure I fully understand your question Ven.Guno.
Do you want to go back to “program files” directory?
If that is the case, I’d type
C:\Documents and Settings\dhamma> cd..
C:\Documents and Settings> cd..
C:\>
Hope it helps.

10 02 2009
Arthur

Hello, could you plz point me what should i do?
i have .flv converted with xilisoft (from mkv to flv), but i have no metatags for that file. so i can’t navigate through that file in web. As i understand i need to make metatags for that file. can you point me what should i type? i am just newbie

27 11 2011
Pattern Cutoff

thank you for your instructions, nailed it!

Leave a comment