I'm trying to get the output name to be the same as the input name while using the pipe command in ffmpeg.
The file is called 1-Minute Audio Test for Stereo Speakers & Headphones [2ZrWHtvSog4].m4a I'm trying to get the output filename to be automatically the same as the input file name but with the mp3 extension.
So the final name should be 1-Minute Audio Test for Stereo Speakers & Headphones [2ZrWHtvSog4].mp3 without having to type it in manually.
Example:
yt-dlp -o - -f 139 --external-downloader aria2c --external-downloader-args '-d ./ -x 10' https://www.youtube.com/watch?v=2ZrWHtvSog4 | ffmpeg -i pipe: -codec:a libmp3lame -b:a 8000 -ac 1 -ar 8000 test_audio.mp3
These commands create a file called test_audio.mp3 it should be 1-Minute Audio Test for Stereo Speakers & Headphones [2ZrWHtvSog4].mp3
I'm not sure how to pipe the name variable from the input file to the output file of ffmpeg.