Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Desktop command doesn't work on mobile #67

Closed
lukepighetti opened this issue Sep 30, 2019 · 2 comments
Closed

Desktop command doesn't work on mobile #67

lukepighetti opened this issue Sep 30, 2019 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@lukepighetti
Copy link

lukepighetti commented Sep 30, 2019

Command that works on the Desktop doesn't work with flutter_ffmpeg

macOS ffmpeg command

ffmpeg -i trudy.mp4 -vf 'fps=1, scale=120:120:force_original_aspect_ratio=decrease' thumb%d.png

Creates a 120 longest side thumbnail for every second of video.

flutter_ffmpeg command

ffmpeg -i /private/var/mobile/Containers/Data/Application/F4CBC902-553E-4240-A852-53178223D235/tmp/9979E51A-DF2B-46E3-AFE6-7A7317CD2A84.MOV -vf 'fps=0.33419977720014854, scale=120:120:force_original_aspect_ratio=decrease' /var/mobile/Containers/Data/Application/F4CBC902-553E-4240-A852-53178223D235/Library/Caches/ffmpeg-thumbnailsXERYzx/thumb%d.png

returns

flutter: Unable to find a suitable output format for 'ffmpeg'
flutter: ffmpeg: Invalid argument

Is this due to the quotes in strings limitation? tanersener/mobile-ffmpeg#190 How am I supposed to do the multiple video filters without strings?

@lukepighetti
Copy link
Author

lukepighetti commented Sep 30, 2019

It appears you can get around this like so:

    final arguments = [
      "-i",
      file.path,
      "-vf",
      "fps=$fps, scale=120:120:force_original_aspect_ratio=decrease",
      "${newDirectory.path}/thumb%d.png"
    ];

    print(arguments);

    final result = await _ffmpeg.executeWithArguments(arguments);

Leaving open for comment/close from @tanersener . Thanks!

@tanersener
Copy link
Owner

You shouldn't start a command with ffmpeg. flutter_ffmpeg already adds ffmpeg to the beginning of your command.

@tanersener tanersener self-assigned this Sep 30, 2019
@tanersener tanersener added the question Further information is requested label Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants