Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-05-27 23:44:25

fixit
Member
Registered: 2015-01-19
Posts: 129

Custom action to convert webm to mp4

This is the command to convert a .webm to a mp4.

ffmpeg -i 2018-07-28-222352.webm -qscale 0 sample.mp4

This is the thunar custom action I came up with, but it is not working.

ffmpeg -i %f.webm -qscale 0 %f.mp4

Can someone please help me?

Thanks.

Last edited by fixit (2020-05-27 23:44:49)


Ubuntu-Mate 24.04

Offline

#2 2020-05-28 00:47:04

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 529

Re: Custom action to convert webm to mp4

Are you using that line in the action? You may want to create a script and call it with the action.


Siduction
Debian Sid
Xfce 4.18

Offline

#3 2020-05-28 00:57:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Custom action to convert webm to mp4

fixit wrote:

ffmpeg -i %f.webm -qscale 0 %f.mp4

%f is the full path and filename - meaning you don't add the extension. So:

ffmpeg -i %f -qscale 0 %f.mp4

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2020-05-28 07:10:05

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: Custom action to convert webm to mp4

I have some of those Custom Actions, but I prefer to see the output in a terminal, so the commands are of the type:

xfce4-terminal -x ffmpeg -i %f [options] %f.ext

Offline

#5 2020-05-28 15:09:16

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: Custom action to convert webm to mp4

ToZ wrote:
fixit wrote:

ffmpeg -i %f.webm -qscale 0 %f.mp4

%f is the full path and filename - meaning you don't add the extension. So:

ffmpeg -i %f -qscale 0 %f.mp4

Thanks.

It worked and produced this.

test.webm.mp4

Is there a way to get it to omit the webm in the filename?


Ubuntu-Mate 24.04

Offline

#6 2020-05-28 15:16:54

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: Custom action to convert webm to mp4

eriefisher wrote:

Are you using that line in the action? You may want to create a script and call it with the action.

I used it in the command.


Ubuntu-Mate 24.04

Offline

#7 2020-05-28 15:18:11

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: Custom action to convert webm to mp4

alcornoqui wrote:

I have some of those Custom Actions, but I prefer to see the output in a terminal, so the commands are of the type:

xfce4-terminal -x ffmpeg -i %f [options] %f.ext

I used the Mate Terminal.


Ubuntu-Mate 24.04

Offline

#8 2020-05-28 18:06:24

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Custom action to convert webm to mp4

fixit wrote:
ToZ wrote:
fixit wrote:

ffmpeg -i %f.webm -qscale 0 %f.mp4

%f is the full path and filename - meaning you don't add the extension. So:

ffmpeg -i %f -qscale 0 %f.mp4

Thanks.

It worked and produced this.

test.webm.mp4

Is there a way to get it to omit the webm in the filename?

Using @eriefischer's suggestion, it is best to create a script for this with the following content (Xfce's built-in interpreter can't handle special characters):

#!/bin/bash
ffmpeg -i "$1" -qscale 0 "${1%.*}.mp4"

...and make the script executable.

Then in the custom action command:

xfce4-terminal -x /path/to/script %f

Feel free to use mate-terminal but make sure the "-x" parameter is the same.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2020-05-29 05:46:51

fixit
Member
Registered: 2015-01-19
Posts: 129

Re: Custom action to convert webm to mp4

Thanks ToZ, it worked like a champ. :-)

It's neat that I can see what the terminal is doing while it is converting the file.


Ubuntu-Mate 24.04

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 546.79 KiB (Peak: 547.63 KiB) ]