VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Hello

    I would like to know if is there any yt-dlp command to extract a video (say from youtube) and convert it into slowmotion.

    Thank you very much in advance for any help!

    Pib
    Quote Quote  
  2. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    QUick search says no. WHich I expected, I'd be very surprised if any streaming downloader did this.
    Quote Quote  
  3. I would like to know if is there any yt-dlp command to extract a video (say from youtube) and convert it into slowmotion.
    You need to download the video and then use ffmpeg to implement the speed change


    read here


    https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
    Quote Quote  
  4. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Thank you guys for the prompt reply!
    I managed to do a version for windows system but using temporary files.
    I would like to do it via web with no temp files. I guess i will have to use pipes stdin and stdout and multiple/sequential commands.
    It won't be easy that's why i would like some help.
    Quote Quote  
  5. The basic format for piping yt-dlp to ffplay is:

    Code:
    yt-dlp "https://path/to/video" -o - | "x:\path\to\ffplay.exe" -
    It should be easy to modify that to pipe to ffmpeg. But I believe remuxing with modified timecodes requires a demux to an elementary stream (to lose the original timecodes), then a remux of that ES with new timecodes.
    Quote Quote  
  6. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Thank you jagabo for the help!

    I managed to get the solution in linux bash command like this:
    yt-dlp -i "https://www.youtube.com/watch?v=UT5F9AXjwhg" -f 22 -o - | ffmpeg -i - -vsync 0 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=(1/2.0)[a]" -map "[v]" -map "[a]" "slow.mp4"

    I also went further and managed to get the slowmotion of a partial video extracted like this:
    yt-dlp -i "https://www.youtube.com/watch?v=UT5F9AXjwhg" --download-sections "*30-45" -f 22 -o - | ffmpeg -i - -vsync 0 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=(1/2.0)[a]" -map "[v]" -map "[a]" "slow.mp4"

    Now i will use the passthru command of PHP to output the result to the browser

    Finally, I will have to extract a part of the video and then concatenate with the slowmotion of that part (using only pipes, without temporary files). Any ideias?
    Quote Quote  
  7. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Hello again

    To convert to slow motion in bash shell I managed like this
    yt-dlp -f 22 -i "https://www.youtube.com/watch?v=SIX4-JQkLEU" --download-sections "*1:30-2:00" -o - | ffmpeg -i pipe:0 -vsync 0 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=(1/2.0)[a]" -map "[v]" -map "[a]" "slow.mp4"

    Somehow, the pipe to ffmpeg does not seem to be working in the web server
    I already tried many ways but so far no luck :\The last was was like this:

    $cmd="yt-dlp -f 22 -i \"https://www.youtube.com/watch?v=SIX4-JQkLEU\" --download-sections \"*1:30-2:00\" -o - | ffmpeg -i pipe:0 -vsync 0 -filter_complex \"[0:v]setpts=2.0*PTS[v];[0:a]atempo=(1/2.0)[a]\" -map \"[v]\" -map \"[a]\" -f mp4 pipe:1";

    and then with PHP passtru command i would do the follwing:
    $get_video=passthru($cmd);

    I always get a corrupt file with 16bytes :\
    I looked at the server logs and I didn't find anything :\
    What might be wrong above?

    I would appreciate any single help

    Thank you in advance
    pib
    Quote Quote  
  8. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    I managed to find out!
    I just had to replace mp4 by mpgets at the end of the command.
    Last edited by pib; 11th May 2023 at 20:57.
    Quote Quote  
  9. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Another question please. I want to duplicate mp4 video.

    In command line I issue the following command:
    ffmpeg -i input.mp4 -i input.mp4 -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1" -vsync vfr output.mp4

    I was trying the following in web environment:
    ... -o - | ffmpeg -i pipe:0 -i pipe:0 -filter_complex \"[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1\" -vsync vfr -f mpgets pipe:1";

    It does not give any error but it does not duplicate video. What might be wrong?
    Can anybody give me an hint?
    Quote Quote  
  10. Member
    Join Date
    Apr 2023
    Location
    Lisbon
    Search Comp PM
    Hello

    Before I could use YT-dlp to download facebook reels but since the biginning of this month I can't download facebook reels using Yt-dlp.
    Anyone knows what has changed? Maybe in facebook video format, no?
    I would appreciate any help
    Thank you very much in advance.

    Pib
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!