Bug 1065746 - REQUEST: Please allow passing of -ss and -to (-t) to ffmpeg
Summary: REQUEST: Please allow passing of -ss and -to (-t) to ffmpeg
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: youtube-dl
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Till Maas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-16 16:28 UTC by Ali Akcaagac
Modified: 2015-02-20 16:13 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-10 11:20:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ali Akcaagac 2014-02-16 16:28:58 UTC
As the description explains. I would like to ask a feature request and hope the maintainer of this fedora package could forward my request to upstream developers.

It's nice that you can dump youtube videos into audio and even have it convert using ffmpeg. What would be nice is to allow youtube-dl to pass START and STOP (duration) through to either ffmpeg or whatever is used as alternative.

Reason behind my request:

Some movies have some talking before or after the music-video (or whatever I watch). I would really like to avoid using youtube-dl AND ffmpeg afterwards only to convert one file. It would be a huge benefit to have this offered by youtube-dl. So I only need to deal with youtube-dl alone.

Thanks.

Comment 1 Ali Akcaagac 2014-05-10 07:50:43 UTC
Closing because of no feedback from package owner.

Comment 2 Rahul Sundaram 2014-05-10 18:27:48 UTC
This still needs to be forwarded to upstream.

Comment 3 Till Maas 2015-01-28 19:59:47 UTC
Reported upstream: https://github.com/rg3/youtube-dl/issues/4803

Comment 4 Till Maas 2015-01-28 21:09:03 UTC
Upstream comment:

 jaimeMF commented 28 minutes ago

For a few versions, youtube-dl has the --exec option which allows you to execute arbitrary commands after each file has been downloaded. This can be used for you usercase:

    Create the file cut.sh and make it executable:

    #!/bin/sh

    start=$1
    duration=$2
    file="$3"
    tempfile="$file.tmp"
    mv "$file" "$tempfile"

    ffmpeg -y -i "$tempfile" -ss "$start" -t "$duration" -c copy "$file"

    rm "$tempfile"

    Then run, for example, youtube-dl test:youtube_1 --exec "./cut.sh 20 40 {}". You can even use options like --extract-audio. You may want to give it a proper name to the script and put it in your $PATH, so that you can call it from everywhere.

I thinks that's enough and youtube-dl shouldn't have special support for it, for a few reasons:

    You can adapt it to any options you need.
    You can use any program you want, you are not limited to ffmpeg/avconv.
    We could of course ad an option --ffmpeg-options which would add the arguments in the ffmpeg command (before the output filename). But this can't be done in the existing postprocessors (for example if you combine the --add-metadata and --embed-subtitles options, ffmpeg would be run twice with -ss 20 -t 40 which is not the expected behaviour). So it would need its own postprocessor, which would be equivalent to the script I posted.

This is just my opinion, so if you (or someone else) thinks that we should really add support for passing these options, I don't mind reopening the issue.


----------------------------

Please reply, whether you would like me to reopen the issue.

Comment 5 Fedora Admin XMLRPC Client 2015-02-09 00:16:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Ali Akcaagac 2015-02-20 16:13:05 UTC
Yes closing it that's fine. The RFE was old anyways.


Note You need to log in before you can comment on or make changes to this bug.