Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow using ffmpeg -vf ( video filters ) in --external-downloader-args #12072
Comments
|
An adhoc fix: diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py
index bdd3545a2..61acb3510 100644
--- a/youtube_dl/downloader/external.py
+++ b/youtube_dl/downloader/external.py
@@ -208,8 +208,6 @@ class FFmpegFD(ExternalFD):
# http://trac.ffmpeg.org/ticket/6125#comment:10
args += ['-seekable', '1' if seekable else '0']
- args += self._configuration_args()
-
# start_time = info_dict.get('start_time') or 0
# if start_time:
# args += ['-ss', compat_str(start_time)]
@@ -269,7 +267,9 @@ class FFmpegFD(ExternalFD):
if live:
args += ['-rtmp_live', 'live']
- args += ['-i', url, '-c', 'copy']
+ args += ['-i', url]
+ args += self._configuration_args()
+
if protocol in ('m3u8', 'm3u8_native'):
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
args += ['-f', 'mpegts'] |
|
That fix seems problematic (maybe that's why you didn't commit it), since ffmpeg can have input args and output args. Right now, --external-downloader-args are treated as input args, and with your patch they change to output args. But both kinds of args are potentially useful, so a different paradigm is needed somehow... Maybe a wrapper script to ffmpeg is the right solution in this case? That's not very appealing either, especially for output args if it involves removing I guess that leaves |
|
how would i do this? would i have to modify source? I cant find the file in my machine with the executable present. |
Yes
You can download https://github.com/rg3/youtube-dl/archive/master.zip and extract it |
|
Hi again, I made the changes as @yan12125 demonstrated, and recompiled the source code, but after checking the video (ctrl-c, remove '.part', then play in vlc) from the livestream, there are no timestamps appended to the video. Is the VF appended only after the stream/download finishes or something? when running the ffmpeg command outside of youtube-dl, the same command certainly works. Thanks |
|
When you run |
|
|
I'm sorry, I meant the full output of the actual download with the addition of
(or whatever). |
|
|
Notice that this never invokes ffmpeg. It looks like it's using the You ought to see a:
group of lines that show youtube-dl is invoking ffmpeg. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.02.10. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output:
Description of your issue, suggested solution and other information
I would like to add a timestamp to a live video stream that I'm downloading. The command I'm running is as follows:
I have tested the ffmpeg -vf drawtext arguments without youtube-dl and the timestamp is video filter is correctly added. example:
But the error above ( Option vf (set video filters) cannot be applied to input url ... ) shows up when i run the youtube-dl command above. Please can you tell me if you know of a way I can get a time stamp appended to my livestream download? Thank you very much.