wiseant
16th September 2023, 20:50
Hi
I have some simple Windows batch files and Linux bash scripts using ffmpeg
I can demux a folder of mp4 files to m4v files in Windows
for %%a in *.mp4 do "c:\ffmpeg\bin\ffmpeg" -i "%%a" -an -c:v copy "%%a.demuxed.m4v"
pause
I can do the same thing in Linux with this bash script
#!/bin/bash
for mediafile in *.mp4; do
ffmpeg -i "$mediafile" -an -vcodec copy "${mediafile%.*}.m4v"
done
However, I have been unable to find a Linux bash script equivalent for
c:\ffmpeg\bin\ffmpeg -i "%~dpnx1" -an -c:v copy "%~dpn1.m4v"
pause
I can drag and drop a mp4 file and demux the video to a m4v file in Windows
%~dpnx1 which expands to the drive, path, name and extension of the first argument
I have searched far and wide and have not found a Linux equivalent for -i "%~dpnx1"
TIA
I have some simple Windows batch files and Linux bash scripts using ffmpeg
I can demux a folder of mp4 files to m4v files in Windows
for %%a in *.mp4 do "c:\ffmpeg\bin\ffmpeg" -i "%%a" -an -c:v copy "%%a.demuxed.m4v"
pause
I can do the same thing in Linux with this bash script
#!/bin/bash
for mediafile in *.mp4; do
ffmpeg -i "$mediafile" -an -vcodec copy "${mediafile%.*}.m4v"
done
However, I have been unable to find a Linux bash script equivalent for
c:\ffmpeg\bin\ffmpeg -i "%~dpnx1" -an -c:v copy "%~dpn1.m4v"
pause
I can drag and drop a mp4 file and demux the video to a m4v file in Windows
%~dpnx1 which expands to the drive, path, name and extension of the first argument
I have searched far and wide and have not found a Linux equivalent for -i "%~dpnx1"
TIA