FFmpeg: read an input link from a text file directly (without extra tools and pipes)
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)?
command-line ffmpeg
add a comment |
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)?
command-line ffmpeg
Do you control the text file?
– Gyan
Jan 14 at 4:40
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18
add a comment |
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)?
command-line ffmpeg
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)?
command-line ffmpeg
command-line ffmpeg
asked Jan 13 at 20:24
Ivan KolesnikovIvan Kolesnikov
63112
63112
Do you control the text file?
– Gyan
Jan 14 at 4:40
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18
add a comment |
Do you control the text file?
– Gyan
Jan 14 at 4:40
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18
Do you control the text file?
– Gyan
Jan 14 at 4:40
Do you control the text file?
– Gyan
Jan 14 at 4:40
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18
add a comment |
1 Answer
1
active
oldest
votes
There's no direct method to do this, but a workaround is to use the concat demuxer with a single entry.
Create a text file containing
file 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
and then run
ffmpeg -f concat -safe 0 -protocol_whitelist file,https,tcp,tls,crypto -i link.txt ...
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393883%2fffmpeg-read-an-input-link-from-a-text-file-directly-without-extra-tools-and-pi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There's no direct method to do this, but a workaround is to use the concat demuxer with a single entry.
Create a text file containing
file 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
and then run
ffmpeg -f concat -safe 0 -protocol_whitelist file,https,tcp,tls,crypto -i link.txt ...
add a comment |
There's no direct method to do this, but a workaround is to use the concat demuxer with a single entry.
Create a text file containing
file 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
and then run
ffmpeg -f concat -safe 0 -protocol_whitelist file,https,tcp,tls,crypto -i link.txt ...
add a comment |
There's no direct method to do this, but a workaround is to use the concat demuxer with a single entry.
Create a text file containing
file 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
and then run
ffmpeg -f concat -safe 0 -protocol_whitelist file,https,tcp,tls,crypto -i link.txt ...
There's no direct method to do this, but a workaround is to use the concat demuxer with a single entry.
Create a text file containing
file 'https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
and then run
ffmpeg -f concat -safe 0 -protocol_whitelist file,https,tcp,tls,crypto -i link.txt ...
answered Jan 14 at 6:35
GyanGyan
15.2k21845
15.2k21845
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393883%2fffmpeg-read-an-input-link-from-a-text-file-directly-without-extra-tools-and-pi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you control the text file?
– Gyan
Jan 14 at 4:40
@Gyan Yes, I control the text file
– Ivan Kolesnikov
Jan 14 at 6:18