Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 531525 - Media Format #225

Merged
merged 27 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
20aabee
feat: add video compression args to ffmpeg command
Sep 21, 2023
77f2847
Merge branch 'develop' into feature/531525-video-compression
Sep 22, 2023
6ec3983
feat: add ffmpeg service class
Sep 22, 2023
cecdcf4
Merge branch 'develop' into feature/531525-video-compression
Sep 22, 2023
42b26bb
Merge branch 'develop' into feature/531525-video-compression
Sep 25, 2023
0d5b62e
Merge branch 'develop' into feature/531525-video-compression
Sep 25, 2023
ec9eb22
feat: add ffmpeg service to export
Sep 26, 2023
4045d59
feat: add merge audio method in ffmpeg service
Sep 27, 2023
a715442
feat: change video compression from 480p to 720p
Sep 27, 2023
83fdecb
feat: get media info in ffmpeg service
Sep 29, 2023
a9a495d
fix: toast layout when message is empty
Oct 13, 2023
c9de69d
Merge branch 'develop' into feature/531525-video-compression
Oct 16, 2023
69d3895
feat: use media info to decide if video should be compressed
Oct 17, 2023
4e971d4
feat: change video compression target resolution from 720 to 480
Oct 18, 2023
0ce0317
Merge branch 'develop' into feature/531525-video-compression
Oct 25, 2023
662bca3
feat: add hardware acceleration to video compression
Oct 25, 2023
7dafa5c
feat: video compression general improvements
Oct 30, 2023
8b5d0f7
feat: delete input file after formatting video
Oct 31, 2023
a00611e
fix: remove deleteSync after video was downloaded
Oct 31, 2023
d133790
fix: download extension in DSFileService
Oct 31, 2023
21c66b9
fix: check audio source to download
Oct 31, 2023
5113861
Merge branch 'develop' into feature/531525-video-compression
Oct 31, 2023
c5429c6
chore: update pubspec.lock from sample
Nov 1, 2023
35b472b
refactor: rename service from DSFFMpegService to DSMediaFormatService
Nov 1, 2023
bdb764f
fix: get extension from mime type when returning cache path
Nov 1, 2023
f22ea13
fix: change extension from downloaded file only if it doesn't have an…
Nov 1, 2023
52d19a4
feat: add method to generate unique id in DSUtils
Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add hardware acceleration to video compression
Marcelo Amaro committed Oct 25, 2023

Verified

This commit was signed with the committer’s verified signature.
PatrickDinh Hoang Dinh
commit 662bca34ee75588c3669697e6eea4ab96d7f45da
5 changes: 3 additions & 2 deletions lib/src/services/ds_ffmpeg.service.dart
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ abstract class DSFFmpegService {
)
: null;

final command = '-i "$input" ${args != null ? '$args ' : ''}"$output"';
final command =
'-hwaccel auto -i "$input" ${args != null ? '$args ' : ''}"$output"';

return _executeCommand(
command: command,
@@ -166,7 +167,7 @@ abstract class DSFFmpegService {
required final int width,
required final int height,
}) {
final resolution = '-vf scale=${width}x$height';
final resolution = '-s ${width}x$height';
const pixelFormat = '-pix_fmt yuv420p';
const codec = '-c:v libx264';
const preset = '-preset veryfast';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ dependencies:
map_launcher: ^2.5.0+1
mime: ^1.0.4
crypto: ^3.0.3

dev_dependencies:
flutter_test:
sdk: flutter
26 changes: 9 additions & 17 deletions sample/pubspec.lock
Original file line number Diff line number Diff line change
@@ -21,17 +21,17 @@ packages:
dependency: transitive
description:
name: audio_session
sha256: e4acc4e9eaa32436dfc5d7aed7f0a370f2d7bb27ee27de30d6c4f220c2a05c73
sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad"
url: "https://pub.dev"
source: hosted
version: "0.1.13"
version: "0.1.16"
blip_ds:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.0.81"
version: "0.0.84"
boolean_selector:
dependency: transitive
description:
@@ -208,14 +208,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
filesize:
dependency: transitive
description:
name: filesize
sha256: f53df1f27ff60e466eefcd9df239e02d4722d5e2debee92a87dfd99ac66de2af
url: "https://pub.dev"
source: hosted
version: "2.0.1"
flutter:
dependency: "direct main"
description: flutter
@@ -331,26 +323,26 @@ packages:
dependency: transitive
description:
name: just_audio
sha256: "7a5057a4d05c8f88ee968cec6fdfe1015577d5184e591d5ac15ab16d8f5ecb17"
sha256: "5ed0cd723e17dfd8cd4b0253726221e67f6546841ea4553635cf895061fc335b"
url: "https://pub.dev"
source: hosted
version: "0.9.31"
version: "0.9.35"
just_audio_platform_interface:
dependency: transitive
description:
name: just_audio_platform_interface
sha256: eff112d5138bea3ba544b6338b1e0537a32b5e1425e4d0dc38f732771cda7c84
sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df
url: "https://pub.dev"
source: hosted
version: "4.2.0"
version: "4.2.1"
just_audio_web:
dependency: transitive
description:
name: just_audio_web
sha256: "89d8db6f19f3821bb6bf908c4bfb846079afb2ab575b783d781a6bf119e3abaf"
sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13
url: "https://pub.dev"
source: hosted
version: "0.4.7"
version: "0.4.8"
libphonenumber_platform_interface:
dependency: transitive
description: