Code Monkey home page Code Monkey logo

ffmpeg-commander's Introduction

ffmpeg-commander

A simple web UI for generating common FFmpeg encoding operations.

https://alfg.github.io/ffmpeg-commander/

github pages Node.js CI

screenshot

Read the blog post at: https://dev.to/alfg/ffmpeg-the-easy-way-4a0h

Check out docker-ffmpeg for a customized Docker build of FFmpeg.

Why?

FFmpeg has many simple and complex options, which can be intimidating at first. I wanted to create a simple interface for generating common encoding operations for video and audio, inspired by HandBrake.

This tool does NOT cover all options of FFmpeg and some assumptions are made when generating the output. So adjustments may be necessary. Generated options may also vary based on your FFmpeg version and build configuration.

If you feel some options can be improved, feel free to open an issue or pull request.

Development

ffmpeg-commander is built with Vue.js and Bootstrap Vue.

Supported Node LTS Versions

  • v12
  • v14
  • v16

NVM is recommended for quickly installing and using different versions of Node.js.

Install

npm install
npm run serve
  • Load http://localhost:8080/ in the web browser.

Compiles and minifies for production

npm run build

Deploy

Deploys to Github Pages

npm run deploy

Docker

docker build -t ffmpeg-commander .
docker run -it -p 8080:80 --rm ffmpeg-commander

ffmpegd

ffmpegd is an optional companion application that connects ffmpeg-commander to ffmpeg by providing a websocket server to send encode tasks and receive realtime progress updates back to the browser. This allows using ffmpeg-commander as a GUI for ffmpeg.

See: https://github.com/alfg/ffmpegd

TODO

  • Support multiple inputs and map option
  • Expand on Filter options

License

MIT

ffmpeg-commander's People

Contributors

alfg 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

ffmpeg-commander's Issues

Librist support

Hi,

First of all I would like to appreciate you work, it is very helpful and handy tool.

Please add librist

Fahad

Support FFmpeg Devices

Hi,

It would be great if you add function to get SDI input from BlackMagic devices.

Regards,

Fahad

Add option to scale video to fit in box

Most of the time when I rescale a video, I want it to fit inside a box so that the aspect ratio of the original video is kept and neither dimension of the output video is larger than the box I specified. Currently FFmpeg Commander seems to only be able to fit the video to either the specified width or height, but not both at the same time. I'm using -vf "scale=w='min($WIDTH,iw)':h='min($HEIGHT,iw)':force_original_aspect_ratio=decrease" to achieve this. Would be cool if this could be added to the tool as well.

Here's the relevant documentation: https://trac.ffmpeg.org/wiki/Scaling#FittingintoaRectangleStatically-sizedPlayer

Where AV1?

As the title says where is AV1? The command is just "-c:v libsvtav1" so im slightly confused by why its not there

udp streamin

Hi,

Can you add udp streaming option as a input and output please ?

[suggestion] Add option for 2-pass in windows shell

Currently the 2-pass command only works in linux systems. I'd like to suggest an option to select Windows shell for the 2-pass script. It would work like so:
Replace the /dev/null with the Windows equivalent NUL virtual path (see this SO answer). ffmpeg asks for permission to overwrite this file, so an always overwrite flag on the first pass would be wonderful.

Also in PowerShell, the bash && operator does not work. The equivalent -and operator messes with the pipes, so the best alternative I could find is this:

ffmpeg -i input.mp4 -pass 1  -f mp4 -y nul; if ($?) { ffmpeg -i input.mp4 -pass 2 utput.mp4 }

NOTE: Not sure how this would look in command-prompt (cmd.exe). This would only work on powershell

Add adelay filter

I'd like to add the adelay filter option allow the audio sync to be changed.

Here's an example command

ffmpeg -i input.mp4 -af "adelay=delays=150:all=1" ouput.mp4

I think using the all option is simplest, otherwise a delay needs to be set for every audio channel (two for stereo, like adelay=150|150).

"ffmpeg -profile:v high" is available for hevc_nvenc

It is possible to get wrong config in "profile" field like "high". Only below options are available (from ffmpeg version 2023-03-05):

  -profile           <int>        E..V....... Set the encoding profile (from 0 to 4) (default main)
     main            0            E..V.......
     main10          1            E..V.......
     rext            2            E..V.......

suggestion; include the ability to merge files

I'm one who merges files, a lot. This would actually be useful if I could choose a preset taht could allow me to merge 2 or more files together into one and I could then paste in the command into the command line. Loving the interface so far btw.

suggestion; -map option

When using ffmpegd, this should be usefull to add a stream tab to select streams to process

building

linebreak issues while buliding please help

Publish ffmpeg-commander as docker image

Hi, could you kindly expand the GitHub Action workflow with an push of the docker image to your packages similar to ffmpegd?
I'd like to deploy it to an environment where I can't build images and I'd rather use an "official" image than host a separate registry.

X265/HEVC 2 pass options

According to the documentation pass 1 and pass 2 should be part of the -x265-params not part of the general options:

For two-pass, you need to run ffmpeg twice, with almost the same settings, except for:
In pass 1 and 2, use the -x265-params pass=1 and -x265-params pass=2 options, respectively.

Add HLS options

At first, thanks for building this useful tool.

Would it be possible to add some HLS options, within a HLS Key? (Which i could send within the JSON)

Cropping Option

Looking at ways to add option to crop the input video at a given time stamp like crop 10 sec from the video starting at 15min ...
Also looking at ways to do a dynamic video source input like from a google spreadsheet (picking the files from dropbox).

Do you think your tool could achieve something like that?

PAL 625i preset

Can you please add input and out preset for DV PAL / SD (720x576) cause having issues when getting input from PAL 625i and out to same resolution.

I think it is due to interlace input issue when encoding into h264 with same resolution.

The out is Having flicker / combing.

Fahad

Can this tool generate a command to add watermark?

ffmpeg -i input.mp4 -i logo.png -filter_complex 'overlay=x=10:y=main_h-overlay_h-10' output.mp4

I found a command that others can test, but ffmpeg prompts no such filter: 'overlay = x = 10: y = main_ h-overlay_ h-10'
Can this tool generate a command to add watermark?
What should be the correct command to add watermark? thanks

Allow input seeking

The seeking option, -ss, can be applied before or after the input filename. Placing it before results in faster encoding if the start point is a significant way through the input file. I'd like this option in the GUI.

When using this option, the reference point for the -to option changes to be the start of the clip, rather than the start of the input file. This means the out time will have to be calculated.

The documentation is here.

There are some cases where output seeking (as used now) is preferred, so I guess it should be left as an option. The documentation says:

Here, the input will be decoded (and discarded) until it reaches the position given by -ss. This will be done very slowly, frame by frame. As of FFmpeg 2.1, the main advantage is that when applying filters to the output stream, the timestamps aren't reset prior to filtering (i.e. when ​burning subtitles into a video, you don't need to modify the subtitle timestamps), but the drawback is that it will take a lot of time until it finally reaches that time point. The bigger the seeking time is, the longer you will have to wait.

how do I remove generated options?

Hi, I have a little problem because when I use FFmpeg with generated options It won't download, for example "-ss -to" parameter has to be at the beginning of the code in order for it to work (ffmpeg.exe -to 00:00:00 -ss 00:00:00 -i "file.m3u8" -c copy -bsf:a aac_adtstoasc "output.mp4" and I have to edit it manually. Is there any way to completely remove generated options? And set custom ones? Thanks

can't connect to ffmpegd

Hi,

I've build an alpine docker image with ffmepg, ffmpegd and ffmpeg-commander.
I've enabled ffmpegd option but it always show offline status.

ffmpegd seems running ok, curl localhost:8080 displays dirlist from current started directory.
I dont understand what i miss !

Thanks for help.

add deflicker option

HI ,

I see doc deflicker has options , but can't set it .
so "Do not actually modify frame"

[11.59 deflicker](http://www.ffmpeg.org/ffmpeg-filters.html#toc-deflicker)
Remove temporal frame luminance variations.

It accepts the following options:

size, s
Set moving-average filter size in frames. Default is 5. Allowed range is 2 - 129.

mode, m
Set averaging mode to smooth temporal luminance variations.

Available values are:

‘’am
Arithmetic mean

‘’gm
Geometric mean

‘’hm
Harmonic mean

‘’qm
Quadratic mean

‘’cm
Cubic mean

‘’pm
Power mean

‘’median
Median

bypass
Do not actually modify frame. Useful when one only wants metadata.

Error: Cannot find module '@vue/cli-plugin-router'

snikay@cloudBox:/opt/ffmpeg-commander$ npm run serve

> [email protected] serve
> vue-cli-service serve

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '@vue/cli-plugin-router'
Require stack:
- /opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js
- /opt/ffmpeg-commander/node_modules/@vue/cli-service/bin/vue-cli-service.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at idToPlugin (/opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js:150:14)
    at /opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js:190:20
    at Array.map (<anonymous>)
    at Service.resolvePlugins (/opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js:176:10)
    at new Service (/opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js:34:25)
    at Object.<anonymous> (/opt/ffmpeg-commander/node_modules/@vue/cli-service/bin/vue-cli-service.js:16:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/ffmpeg-commander/node_modules/@vue/cli-service/lib/Service.js',
    '/opt/ffmpeg-commander/node_modules/@vue/cli-service/bin/vue-cli-service.js'
  ]
}

Node.js v17.2.0

is it my bad or should it be updated ? :)

thanks

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.