Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

Sur d’autres sites (13936)

  • What is the equivalent of ImageMagick's -liquid-rescale in FFMPEG

    22 février 2024, par Mouaad Abdelghafour AITALI

    I'm interested in the Content-Aware Scale effect. So far, the only way to achieve it is by using ImageMagick (distortion algorithm)

    


    enter image description here

    


    cmd = f"magick {curFramePath}\

-liquid-rescale {100-DISTORT_PERCENTAGE}x{100-DISTORT_PERCENTAGE}%!\

-resize {videoSize[0]}x{videoSize[1]}\! {resFramePath}"


    


    I would love to achieve comparable results using only FFMPEG.

    


    Thank you for your help

    


  • Is there an ffmpeg equivalent to Gstreamers "shmsink" ?

    5 juillet 2022, par Yllier123

    I have a Gstreamer command that I'd like to port to ffmpeg. Is there an equivalent to shmsink in ffmpeg ? Best way I can think of is to stream ffmpeg's output to a FIFO pipe allocated with mkfifo but I do not think that is equivalent. Thank you in advance.

    


    This command converts h264 mp4 file to rawvideo and streams it to a shared memory object. I would ideally like to do something like this

    


    ffmpeg -i "VideoFile.mp4" -f rawvideo -pix_fmt bgra pipe:1 > /tmp/feed2-control-pipe

    


    Gstreamer Command :
gst-launch-1.0 -v filesrc location="VideoFile.mp4" qtdemux name=demux demux.video_0 h264parse v4l2h264dec v4l2convert 'video/x-raw,format=BGRA' shmsink socket-path=/tmp/feed2-control-pipe shm-size=81100800

    


  • Python script and equivalent command do not run the same

    19 août 2021, par user32882

    I would like to use youtubedl to download the audio from a YouTube video into an mp3 file. I came up with the following command to do so :

    


    youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=SF8DGbfOFig&ab_channel=derang

    


    When I run the above command through my command line, it seems that I successfully manage to download the file in mp3 format :

    


    [youtube] SF8DGbfOFig: Downloading webpage
[download] Destination: Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k]-SF8DGbfOFig.webm
[download] 100% of 5.57MiB in 00:03
[ffmpeg] Destination: Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k]-SF8DGbfOFig.mp3
Deleting original file Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k]-SF8DGbfOFig.webm (pass -k to keep)


    


    I then tried to convert the above command to an equivalent python script as follows :

    


    import youtube_dl
links = ["https://www.youtube.com/watch?v=SF8DGbfOFig&ab_channel=derang"]
ydl_args = {
        'audioformat': 'mp3',
        'outtmpl': '%(title)s.%(ext)s',
        'extractaudio': True
    }
with youtube_dl.YoutubeDL(ydl_args) as ydl:
    results = ydl.download(links)


    


    However, this does not succeed in generating an mp3 file of the audio. These are the logs I am getting :

    


    WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k].f135.mp4
[download] 100% of 4.42MiB in 00:02
[download] Destination: Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k].f251.webm
[download] 100% of 5.57MiB in 00:03
[ffmpeg] Merging formats into "Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k].mkv"
Deleting original file Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k].f135.mp4 (pass -k to keep)
Deleting original file Total Science & S.P.Y - Piano Funk (Ft. Riya & DāM FunK) [320k].f251.webm (pass -k to keep)


    


    What am I doing wrong here ? Aren't my command and python script equivalent ?