Code Monkey home page Code Monkey logo

flvtool2's Introduction

FLVTool2 - Flash video manipulation

FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV).

Overview

FLVTool2 calculates various meta data and inserts a onMetaData tag in the video. It cuts FLV files and adds cue Points (onCuePoint). A debug command shows the inside of a FLV file and the print command gives meta data information in XML or YAML format.

Features

  • batch processing
  • directory recursion
  • command chaining
  • FLV file cutting
  • onCuePoint tag insertation via XML file
  • custom onMetaData key-value pairs
  • meta data printout in XML or YAML
  • simulation mode
  • runs on Windows, Linux and Mac OSX
  • ideal for serverside automatic meta data injection

Installation

Most Linux OS's packet manager have FLVTool2 available.

apt-get install flvtool2

Installation via ruby gems:

gem install flvtool2

Manual installation:

Execute following commands in directory of README file:

ruby setup.rb config
ruby setup.rb setup
sudo ruby setup.rb install

Windows:

Download the flvtool2.exe file from here:

https://github.com/unnu/flvtool2/raw/master/flvtool2.exe

Usage

$ flvtool2 
FLVTool2 1.0.6
Copyright (c) 2005-2007 Norman Timmler (Hamburg, Germany)
Get the latest version from https://github.com/unnu/flvtool2
This program is published under the BSD license.

Usage: flvtool2 [-ACDPUVaciklnoprstvx]... [-key:value]... in-path|stdin [out-path|stdout]

If out-path is omitted, in-path will be overwritten.
In-path can be a single file, or a directory. If in-path is a directory,
out-path has to be likewise, or can be omitted. Directory recursion
is controlled by the -r switch. You can use stdin and stdout keywords
as in- and out-path for piping or redirecting.

Chain commands like that: -UP (updates FLV file than prints out meta data)

Commands:
  -A            Adds tags from -t tags-file
  -C            Cuts file using -i inpoint and -o outpoint
  -D            Debugs file (writes a lot to stdout)
  -H            Helpscreen will be shown
  -P            Prints out meta data to stdout
  -U            Updates FLV with an onMetaTag event

Switches:
  -a            Collapse space between cutted regions
  -c            Compatibility mode calculates some onMetaTag values different
  -key:value    Key-value-pair for onMetaData tag (overwrites generated values)
  -i timestamp  Inpoint for cut command in miliseconds
  -k            Keyframe mode slides onCuePoint(navigation) tags added by the
                add command to nearest keyframe position
  -l            Logs FLV stream reading to stream.log in current directory
  -n            Number of tag to debug
  -o timestamp  Outpoint for cut command in miliseconds
  -p            Preserve mode only updates FLVs that have not been processed
                before
  -r            Recursion for directory processing
  -s            Simulation mode never writes FLV data to out-path
  -t path       Tagfile (MetaTags written in XML)
  -v            Verbose mode
  -x            XML mode instead of YAML mode

Bug reports

Please file an issue in the github issue tracker system:

https://github.com/unnu/flvtool2/issues

flvtool2's People

Contributors

kouber avatar unnu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flvtool2's Issues

manual install flvtool2 on ubuntu 16.04

i need manual install flvtool2 because install by apt is not available anymore for flvtool2.
then i install ruby before compile flvtool2. succeed. i got ruby version 2.3.1p112.

when i run:
$ruby setup.rb config

i got these message:

setup.rb:283: warning: key "bin-dir" is duplicated and overwritten on line 284
setup.rb:788:in load_rbconfig: uninitialized constant Config (NameError)
Did you mean? RbConfig
from setup.rb:768:in invoke
from setup.rb:1578:in <main>

how to compile flvtool correctly?

Specific Ruby version?

Is there a specific version of Ruby needed to install the source?
When i do "ruby -v" I get:
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]

I'm getting an error:

dyld: Library not loaded: /usr/local/lib/libruby.1.9.1.dylib
Referenced from: /usr/local/bin/ruby
Reason: no suitable image found. Did find:
/usr/local/lib/libruby.1.9.1.dylib: stat() failed with errno=13
/usr/local/lib/libruby.1.9.1.dylib: stat() failed with errno=13
Trace/BPT trap

Any thoughts?

Abandoned?

The current code doesn't seem to work with ruby 2, and there is no activity since years.
Perhaps the README could be more explicit and tell that this project doesn't work anymore.

Parse flv file error

Get an error during parse flv file, but this file can be parse by other tools, error info as below:
E:\video\project\trunk\tool\flvtools>flvtool2.exe -P C:\Users\beyond\Desktop\tmp\mony.flv
ERROR: EOFError
ERROR: flv/amf_string_buffer.rb:37:in read' ERROR: flv/video_tag.rb:80:inread_header'
ERROR: flv/video_tag.rb:47:in after_initialize' ERROR: flv/tag.rb:56:ininitialize'
ERROR: flv/stream.rb:449:in new' ERROR: flv/stream.rb:449:inread_tags'
ERROR: flv/stream.rb:58:in initialize' ERROR: flvtool2/base.rb:272:innew'
ERROR: flvtool2/base.rb:272:in open_stream' ERROR: flvtool2/base.rb:238:inprocess_files'
ERROR: flvtool2/base.rb:225:in each' ERROR: flvtool2/base.rb:225:inprocess_files'
ERROR: flvtool2/base.rb:44:in execute!' ERROR: flvtool2.rb:168:inexecute!'
ERROR: flvtool2.rb:228

Date type handling code has problems

This seems not maintained anymore, but maybe this helps people noticing problems.

  • The date writing code, writes the timestamp with offset zero (UTC) and after that writes the current timezone offset.
  • The date reading code, reads the timestamp and then adds the stored offset and subtracts current timezone offset.

The reading code will lead to wrong results when the timezone written is different from the current timezone and if it's the same it will be a no-op.

Regarding the writing code, i guess it should maybe just write zero for the timezone. At least that is what I found written in the Adobe AMF 0 spec.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.