There is the text file - link.txt. That file contains the following link to the video:
$ cat link.txt https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4
I can transcode the video from that file in the next way:
ffmpeg -i $(cat link.txt) -vcodec libx264 -acodec libfdk_aac out.mpg
or I can use pipe to achive the same result:
cat link.txt | ffmpeg -i - -vcodec libx264 -acodec libfdk_aac out.mpg
But I have to run FFmpeg via specific software and it doesn't support pipes and commands above.
I'm looking a solution to run FFmpeg like this:
ffmpeg -some-extra-parameters -to-say-ffmpeg -get-the-link \ -from-the-text-file -i link.txt -vcodec libx264 \ -acodec libfdk_aac out.mpg
Question 1: Is that feature implemented in FFmpeg?
Also, I checked FFmpeg presets and created the FFPRESET file for my goal:
$ cat /usr/local/share/ffmpeg/linkpreset.ffpreset i=https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4 vcodec=libx264 acodec=libfdk_aac
I got the error when I tried to execute FFmpeg with that preset:
$ ffmpeg -fpre /usr/local/share/ffmpeg/linkpreset.ffpreset out.mpg /usr/local/share/ffmpeg/linkpreset.ffpreset: Invalid option or argument: 'i=https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4', parsed as 'i' = 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
Question 2: Is there way to specify input link in a FFPRESET file?
Question 3(main): How to read an input link from a text file in FFmpeg directly(without extra tools and pipes)?