Nemo 액션에 ffmpeg/avconv 명령을 추가하는 방법은 무엇입니까?

Nemo 액션에 ffmpeg/avconv 명령을 추가하는 방법은 무엇입니까?

나는 이런 명령을 원한다

ffmpeg -i video.mp4 -vn -acodec copy audio.m4a

Nemo Actions(컨텍스트 메뉴)를 입력합니다.

그러나 이는 파일의 실제 이름 대신 변수를 사용하는 것을 의미합니다. (또한 확장자를 입력하지 않는 것이 좋습니다. 다른 확장자에 대해 작동하는 명령을 원합니다).

어떻게 하나요?

답변1

단일 사용자 사용의 경우 다음 위치에서 nemo 작업을 작성할 수 있습니다.

$HOME/.local/share/nemo/actions/

모든 사용자의 경우 다음을 사용하십시오.

/usr/share/nemo/actions/

파일은 *.nemo_action. 예를 들어:

[Nemo Action]
Name=mp42m4a
Comment=Convert mp4/flv to m4a
Exec=gnome-terminal -x sh -c "ffmpeg -i %F -vn -acodec copy audio.m4a"
Icon-Name=
Selection=notnone
Extensions=mp4;flv;

더 많은 예를 보려면 다음을 참조하세요.https://wiki.archlinux.org/index.php/Nemo#Nemo_Actions

전체(?) 문서는 다음 위치에 있습니다.https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action

관련 정보