简体   繁体   English

将输入名称保留在 ffmpeg 中?

[英]keep input name in ffmpeg?

can someone help me to keep original name in input as output有人可以帮助我将原始名称保留为 output

For example, i have a "Video.mp4" i need to convert it in mp3 as "Video.mp3"例如,我有一个“Video.mp4”,我需要在 mp3 中将其转换为“Video.mp3”

but i cant find it how to do it!但我找不到怎么做!

i try ffmpeg -i video.mp4 -b:a 192K -vn music.mp3我试试ffmpeg -i video.mp4 -b:a 192K -vn music.mp3

but the output file is "music.mp3" and i dont want it但是 output 文件是“music.mp3”,我不想要它

soo i try ffmpeg -i A.mp4 -b:a 192K -vn *.mp3所以我试试ffmpeg -i A.mp4 -b:a 192K -vn *.mp3

and it gives error like:它给出了如下错误:

*.mp3: Invalid argument

pls help me:(请帮助我:(

[untried] [未尝试]

@echo off
ffmpeg -i "%~1" -b:a 192K -vn "%~n1.mp3"

As a batch file named tomp3.bat , use as tomp3 "video.mp4"作为名为tomp3.bat的批处理文件,用作tomp3 "video.mp4"

The quotes are not required unless the filename contains spaces (or some other symbols)除非文件名包含空格(或其他一些符号),否则不需要引号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM