# Web Video Editor

## JS / PHP script - GUI for FFmpeg (and Mencoder)

- created: 09/29/2014
- latest update: 09/29/2014
- by: Andycoder
- email: andchir@gmail.com

### Description

JS / PHP script online video editor, GUI for FFmpeg (or Mencoder). Allows you to cut the video into pieces and combine them. Convert video formats: FLV, MP4, WEBM, OGV. ВPossibility of fast cutting video fragments without transcode.

### Features and capabilities

- Fast (instant) cutting video into pieces without transcode.
- Ability to combine pieces of video.
- For video are used server applications: FFmpeg, Mencoder (optional), MP4Box / gpac (optional), MKVMerge (optional).
- Convert video formats: FLV, MP4, WEBM, OGV.
- Showing the progress of conversion percentage.
- Three HTML5 player to choose from.
- Upload video 3 ways: file, link, from Youtube.
- Simple configuration (in file).
- Multilingual support (made ​​translations into English and Russian).
- Nice interface and adaptive layout (Bootstrap 3.2).
- Open and clean source code.

### System requirements

Required:

- Linux server (in Windows likely will work too, but not tested)
- PHP 5.3+
- Web server Apache or Nginx
- FFmpeg 1.2+

Not required (optional):

- Mencoder
- MP4Box (gpac)
- MKVMerge

### Installation

1. Install server software (instructions below).
2. Upload content of the archive videoeditor to the server (for example, in a folder videoeditor/).
3. Set permissions 777 for folders: input/, output/, tmp/.
4. Open your browser to the folder where the uploaded files. For example: http://[website address]/videoeditor/.
5. Open in a text editor the file config.php and configure (the file has comments).
6. Finish.

### Installing server applications

For work is required only FFmpeg, other applications is optional, if for some reason are not satisfied with FFmpeg.
For example, FFmpeg precisely cuts the video at specified locations, but at the beginning of the video clip will stop the video stream. Othet tools is cut video better, but not exactly at the specified time locations (keyframe).

#### Installing FFmpeg

Developer website: http://ffmpeg.org/

Install FFmpeg recommended by this manual: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
Need to install any additional applications that are listed in this manual.

Attention!
It is strongly recommended to install all applications in a folder /usr/bin/ and /usr/ffmpeg_build/.
To do this in the instructions you need to replace all "$HOME" to "/usr". For install open command line (terminal).
Example:

    mkdir ~/ffmpeg_sources
    cd ~/ffmpeg_sources
    wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
    tar xjvf ffmpeg-snapshot.tar.bz2
    cd ffmpeg
    PATH="$PATH:/usr/bin" PKG_CONFIG_PATH="/usr/ffmpeg_build/lib/pkgconfig" ./configure \
      --prefix="/usr/ffmpeg_build" \
      --extra-cflags="-I/usr/ffmpeg_build/include" \
      --extra-ldflags="-L/usr/ffmpeg_build/lib" \
      --bindir="/usr/bin" \
      --enable-gpl \
      --enable-libass \
      --enable-libfdk-aac \
      --enable-libfreetype \
      --enable-libmp3lame \
      --enable-libopus \
      --enable-libtheora \
      --enable-libvorbis \
      --enable-libvpx \
      --enable-libx264 \
      --enable-nonfree \
      --enable-x11grab
    PATH="$PATH:/usr/bin" make
    sudo make install
    make distclean
    hash -r

#### Installing Mencoder (optional)

Developer website: http://www.mplayerhq.hu/

For Ubuntu (Debian) Mencoder can be installed as follows:

    sudo apt-get install mencoder

#### Installing MP4Box / gpac (optional)

Developer website: http://gpac.wp.mines-telecom.fr/mp4box/

For Ubuntu (Debian) MP4Box can be installed as follows:

    sudo apt-get install gpac

#### Installing MKVMerge (optional)

Developer website: https://www.bunkus.org/videotools/mkvtoolnix/

For Ubuntu (Debian) MKVMerge can be installed as follows:

    sudo yum install mkvtoolnix

For other systems, installation instructions can be found on the websites of the developers.

### Instructions for use

Watch the video:

http://www.youtube.com/watch?v=N9Dsmqf-1X0

### Libraries

- jQuery
- jQuery UI
- Bootstrap
- Flowplayer
- VideoJS
- Codoplayer