Skip to content

Commit 580fbb9

Browse files
committed
2 parents 4f4f168 + b9d047c commit 580fbb9

File tree

15 files changed

+520
-243
lines changed

15 files changed

+520
-243
lines changed

.clang-format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
IndentWidth: 4
2+
AlignAfterOpenBracket: Align
3+
AlignConsecutiveAssignments: true
4+
AlignConsecutiveBitFields: true
5+
AlignConsecutiveMacros: true
6+
AlignTrailingComments: true
7+
AllowShortBlocksOnASingleLine: Empty
8+
AllowShortCaseLabelsOnASingleLine: true
9+
AllowShortFunctionsOnASingleLine: Empty
10+
AllowShortLoopsOnASingleLine: true

.github/docs_res/project_tree.png

20.2 KB
Loading

.github/workflows/c-cpp.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: make-dir
16+
run: make dir
17+
- name: linux-build
18+
run: make build
19+
- name: make run
20+
run: make run
21+
22+
build-windows:
23+
runs-on: windows-2019
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: install-make
28+
run: choco install make
29+
- name: make-directory
30+
run: make dir
31+
- name: windows-build
32+
run: make winbuild

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@
3636
#project extras
3737
bin/*
3838
passphrase.bin
39-
s_lockValue.bin
39+
s_lockValue.bin
40+
release-configs/*

Makefile

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ APPNAME := ffmpeg-coder
1212

1313
.PHONY: all
1414

15-
all: dir build run
15+
all: build run
1616

1717
.PHONY: build
1818
build:
@@ -22,14 +22,26 @@ build:
2222
clean:
2323
echo Deleting the binaries....
2424
rm ${BUILDDIR}/*
25-
rm usrData/*
26-
rm appData/*
27-
25+
rm ffmpeg-coder/usr/bin/ffmpeg-coder
26+
2827
.PHONY: run
2928
run:
30-
echo "Running the built program...."
29+
echo Running the built program....
3130
./${BUILDDIR}/${APPNAME}.o
3231

32+
.PHONY: dir
33+
dir:
34+
echo Creating directories.....
35+
mkdir bin
36+
37+
.PHONY: debpackage
38+
debpackage: build
39+
echo Creating the debian package of ffmpeg-coder
40+
mv bin/ffmpeg-coder.o bin/ffmpeg-coder
41+
cp bin/ffmpeg-coder ffmpeg-coder/usr/bin/
42+
fakeroot dpkg-deb -v --build ffmpeg-coder bin
43+
echo The deb package has been created in the bin folder
44+
3345

3446
# Windows Configs for make
3547
.PHONY: winbuild
@@ -38,10 +50,5 @@ winbuild:
3850

3951
.PHONY: winrun
4052
winrun:
41-
echo "Running the built program...."
53+
echo Running the built program....
4254
./${BUILDDIR}/${APPNAME}.exe
43-
44-
.PHONY: dir
45-
dir:
46-
echo Creating directories.....
47-
mkdir bin usrData appData

README.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/CONTRIBUTING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# How to contribute to **ffmpeg-coder**
2+
3+
I'm really happy that you are here & reading this. If you are interested in contributing to this project and make it larger then this section will help you get started.
4+
5+
This project needs more contributors. And any beginner **C++** programmer will be able to contribute to this project.
6+
7+
### Some important links & resources
8+
- In case you need more details, you can [mail](mailto:abirtx@yandex.com) me at this address abirtx@yandex.com
9+
10+
- If you want to test the tool or use it in your system before contributing [here](https://github.com/Abir-Tx/ffmpeg-coder#installation) is the installation guide for different OS
11+
12+
- My goal is to add all the ffmpeg options to this tool with easy instructions so that users can generate commands without any hassle or knowing.
13+
14+
- You can contribute by submitting issues, or by fixing a problem/bugs or by implementing new features by submitting **Pull requests**.
15+
16+
- As the project is based on ffmpeg commands generation you should have a basic knowledge about **ffmpeg** CLI and how to create commands for converting videos with different options using ffmpeg command line interface. You can get to know about ffmpeg from [here](https://ffmpeg.org/ffmpeg.html).
17+
18+
## Found Bugs ?
19+
- Submit the issue [here](https://github.com/Abir-Tx/ffmpeg-coder/issues/new/choose)
20+
21+
Read more from the [**Having Issues**](https://github.com/Abir-Tx/ffmpeg-coder#having-issues-) section.
22+
23+
## Did you find patch or a fix for a Bug?
24+
25+
- Open a [new GitHub Pull Request](https://github.com/Abir-Tx/ffmpeg-coder/compare) with your patch or code changes.
26+
27+
- Describe the problem and your fix/code changes clearly. Include the relevant issue number if applicable.
28+
29+
## Contributing to documentations?
30+
31+
You can also contribute to the project by adding documentation as the projects documentation or wiki is not completed yet. So if you are interested to enhance the documentation then you are most welcome.
32+
33+
Just creare a pull request with your documentation changes or you can email me too.
34+
35+
## Adding new features or extending the tool
36+
37+
If you really want to contribute to this project, the best way is to get familiar with the project structure and files and then implement the features needed. So much features are left to add to this project as **ffmpeg** is a very powerfull tool and has so many commands to offer. So you can add any ffmpeg video converting command generation feature to this project.
38+
39+
- First you need to know some basics of ffmpeg CLI commands so that you can use those commands in this project to add features
40+
41+
- Get familiar with the source code and project structure so that is becomes easier for you to implement the features. The project structure & source code is described [here](https://github.com/Abir-Tx/ffmpeg-coder/blob/main/docs/source-code.md)
42+
43+
- Add your code/feature by forking this project first & then write your codes & then submit the changes by creating a pull request
44+
45+
- Further discussions can be done with me using my mail address provided above.
46+
47+
## Submitting chnages
48+
Please follow the projects coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
49+
50+
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
51+
52+
$ git commit -m "A brief summary of the commit
53+
>
54+
> A paragraph describing what changed and its impact."
55+
56+
## Building/compiling the source code
57+
58+
When writing codes for this project you will need to test the code first before submitting. To test the code you will need to compile the code. I have made it easier to compile the whole source code with all the header files using **Makefile**. So first ensure that **make** is installed in your system.
59+
60+
The build process is described in the projects readme in the installation section.
61+
62+
- [Get to know about the build process](https://github.com/Abir-Tx/ffmpeg-coder#install-from-source)
63+
64+
65+
## Coding Conventions
66+
The project uses a [```.clang-format```](https://github.com/Abir-Tx/ffmpeg-coder/blob/main/.clang-format) file to maintain the coding convention across the whole project for all the cpp & hpp (source & header) files.
67+
68+
After you finished your code writing for this project always try to format your code/file using the projects [```.clang-format```](https://github.com/Abir-Tx/ffmpeg-coder/blob/main/.clang-format) file.
69+
70+
To do so -
71+
72+
- Install clang-format in you system & set up. Know more about [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
73+
74+
- Use this command to use this projects clang format file while formatting the source code
75+
76+
```bash
77+
clang-format -style=file -i your-changed-file.cpp
78+
```
79+
80+
----
81+
82+
***Thanks for your contibution***
83+
84+
**Abir-Tx**

docs/README.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
[![Download ffmpeg-coder](https://sourceforge.net/sflogo.php?type=11&group_id=3333544)](https://sourceforge.net/p/ffmpeg-coder/)
2+
3+
[![Download ffmpeg-coder](https://img.shields.io/sourceforge/dt/ffmpeg-coder.svg)](https://sourceforge.net/projects/ffmpeg-coder/files/latest/download) [![C/C++ CI](https://github.com/Abir-Tx/ffmpeg-coder/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/Abir-Tx/ffmpeg-coder/actions/workflows/c-cpp.yml)
4+
5+
# FFMPEG-Coder
6+
7+
A small **_cross platform_** CLI tool which will help in producing different types video converting codes quickly for new ffmpeg CLI users. The tool will make it easy to generate ffmpeg commands for them. If you don't use or know about **FFMPEG** then this tool might not be for you.
8+
9+
# Who is this tool for ?
10+
11+
This tool is created for those who find it difficult to understand or find the appropriate commands for converting a video as they want using the FFMPEG CLI tool.
12+
13+
Also those who are new to Command Lines they can also use this tool to generate ffmpeg commands very easily. Many new ffmpeg users find it difficult to find the appropriate ffmpeg commands to convert their videos to with their desired configs. So, as a result they end up googling a lot and wasting their time. So this tool is for them.
14+
15+
# Pre-requisites
16+
17+
The user should have really basic knowledge about ffmpeg like how to run ffmpeg in a directory and how to issue the commands. Thats it !!
18+
19+
# Features
20+
21+
- Supports **Windows, Linux** & **Mac OS**.
22+
- Does not dpeend on any other dependencies.
23+
- Very small, fast and lightweight.
24+
- Supports options for **h264** and **libx265**.
25+
26+
# Downloads
27+
28+
- Downloads are available in **sourceforge** -
29+
30+
[![Download ffmpeg-coder](https://a.fsdn.com/con/app/sf-download-button)](https://sourceforge.net/projects/ffmpeg-coder/files/latest/download)
31+
32+
- You can download the latest version from the [release](https://github.com/Abir-Tx/ffmpeg-coder/releases/latest) section.
33+
34+
# Installation
35+
36+
## Windows
37+
38+
- First download the windows installer file from the release or from [here](https://github.com/Abir-Tx/ffmpeg-coder/releases/download/v1.0/ffmpeg-coder_1.0_win.zip).
39+
- Extract or Unzip the **ffmpeg-coder_1.0_win.zip**
40+
- Go into the unzipped folder and double click on **ffmpeg-coder_1.0_win.exe** file.
41+
- The installer will start & then just follow the onscreen instructions and ffmpeg-coder will be installed on your machine
42+
- After installation, from the start menu search for **_ffmpeg-coder_** and open the tool.
43+
44+
## Linux (Debian based distros)
45+
46+
This installation process works on ubuntu, kali linux, linux mint, debian and other debian based distros.
47+
48+
### Automatic One Click Process
49+
50+
- Just copy and paste this script below and **_voila_**
51+
52+
```bash
53+
wget https://raw.githubusercontent.com/Abir-Tx/ffmpeg-coder/main/scripts/debian_install.sh && chmod +x debian_install.sh &&./debian_install.sh
54+
```
55+
56+
### Manual Download Process
57+
58+
- First download the **ffmpeg-coder_1.0_all.deb** from the release or from [here](https://github.com/Abir-Tx/ffmpeg-coder/releases/download/v1.0/ffmpeg-coder_1.0_all.deb).
59+
- Then open terminal to the folder where the .deb file is downloaded.
60+
- Now from the terminal run -
61+
62+
```bash
63+
chmod +x ffmpeg-coder_1.0_all.deb
64+
sudo apt install ./ffmpeg-coder_1.0_all.deb
65+
```
66+
67+
- **_ffmpeg-coder_** should be installed now. Now run `ffmpeg-coder` in your terminal. Sometime if running just after installation the tool might not start. In that case run `ffmpeg-coder` in terminal twice.
68+
69+
## Install from source
70+
71+
Users other than Debian based distro can use the tool by compiling the tool from the source code easily. Also any distro or windows users can compile and use the tool if they are having problems using the binary packages provided in the release.
72+
73+
**Steps for compiling from the source -**
74+
75+
- Download the [**Source Code.zip**](https://github.com/Abir-Tx/ffmpeg-coder/archive/v1.0.zip) from the release section for the stable version or using git for the latest devlopement version. In Terminal for Linux or CMD for Windows run -
76+
77+
```bash
78+
git clone https://github.com/Abir-Tx/ffmpeg-coder.git
79+
```
80+
81+
- Then `cd` into the `ffmpeg-coder` directory.
82+
83+
```bahs
84+
cd ffmpeg-coder
85+
```
86+
87+
## Using Make
88+
89+
- **Linux**
90+
91+
Now if you are in linux & have build-essentian installed then just run -
92+
93+
```bash
94+
make dir
95+
make build
96+
```
97+
98+
The tool will be compiled to the `bin` folder inside ffmpeg-coder folder. You can also run `make run` to run the tool from there -
99+
100+
```bash
101+
make run
102+
```
103+
104+
- **Windows**
105+
106+
If you are windows user and have **\*GNU Make** installed or configured in your system then run -
107+
108+
```batch
109+
make dir
110+
make winbuild
111+
```
112+
113+
The tool will be compiled to the `bin` folder inside ffmpeg-coder folder. You can also run `make winrun` to run the tool from there -
114+
115+
```batch
116+
make winrun
117+
```
118+
119+
## Using G++
120+
121+
- **In Linux run -**
122+
123+
```bash
124+
g++ src/ffmpeg-coder.cpp -I include/ffmpeg-coder -I lib/ -o bin/ffmpeg-coder
125+
./bin/ffmpeg-coder
126+
```
127+
128+
- **In Windows run -**
129+
130+
```batch
131+
g++ src/ffmpeg-coder.cpp -I include/ffmpeg-coder -I lib/ -o bin/ffmpeg-coder.exe
132+
./bin/ffmpeg-coder
133+
```
134+
135+
By following the above steps you will have a compiled version of **_ffmpeg-coder_** for your device.
136+
137+
---
138+
139+
# Troubleshooting
140+
141+
- ### **App not openning after first installaton**:
142+
143+
Sometime on some platforms (Specially Linux) the open does not open after installion when run. In that case run the app twice or more and the app will start.
144+
145+
- ### **App lock feature not working on Linux**:
146+
The startup lock feature is currently disabled in source code as it is creating some issues so the **App lock** feature will not work in linux as of now.
147+
148+
**_Future fix is planned_**
149+
150+
# Having issues ?
151+
152+
If you are having any issue related to this tool or if you face any bug/problem while using the tool, please let us know by creating an **_issue_** from the [issue](https://github.com/Abir-Tx/ffmpeg-coder/issues) tab or by clicking [here](https://github.com/Abir-Tx/ffmpeg-coder/issues/new/choose). In the issue form describe what problems you face or what features you want next.
153+
154+
I will try to fix and add features as much as I can.
155+
156+
# Maintainers & Contributors
157+
158+
**Maintainers**
159+
160+
- [Abir-Tx](https://www.github.com/abir-tx)
161+
162+
# Contribute
163+
164+
See [Contribution guidelines for this project](/docs/CONTRIBUTING.md)
165+
166+
> Pull requests are always welcomed !! :-)

0 commit comments

Comments
 (0)