Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Method describe failed : 404 Client error in python

    13 février 2020, par ygHong
    import cv2
    cap = cv2.VideoCapture('rtsp://192.168.0.17:7779',cv2.CAP_FFMPEG)
    ret, frame = cap.read()
    
    while ret:
        frame = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
        cv2.imshow('frame', frame)
        # do other processing on frame...
    
    
    
        ret, frame = cap.read()
        if (cv2.waitKey(1) & 0xFF == ord('q')):
            break
    
    cap.release()
    cv2.destroyAllWindows()
    

    VLC failed to read the movie streaming.

    Terminates without any errors.

    But in jupyternotebook Promt says 'method DESCRIBE failed: 404 Client error'

  • FFmpeg : concat multiple videos, some with audio, some without

    13 février 2020, par Tommy Adeniyi

    I'm trying to concatenate 5 videos where the first and last have no audio track. I have tried the following command:

        ffmpeg -i 1-copyright/copyright2018640x480.mp4 -i 2-openingtitle/EOTIntroFINAL640x480.mp4 -i 3-videos/yelling.mp4 -i 4-endtitle/EOTOutroFINAL640x480.mp4 -i 5-learnabout/Niambi640.mp4 -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] [3:v:0] [3:a:0] [4:v:0] [4:a:0] concat=n=5:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output_video.mp4
    

    and I get the output error:

        Stream specifier ':a:0' in filtergraph description [0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] [3:v:0] [3:a:0] [4:v:0] [4:a:0] concat=n=5:v=1:a=1 [v] [a] matches no streams.
    

    I know the first and last videos have no audio but I dont know how to write the statement to ignore the audio track in those videos. I have tried removing the [0:a:0] but that just throws another error:

       Stream specifier ':v:0' in filtergraph description [0:v:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] [3:v:0] [3:a:0] [4:v:0] [4:a:0] concat=n=5:v=1:a=1 [v] [a] matches no streams.
    

    It doesnt make sense and Im kinda lost.

  • Real Time Audio Effects and Reverb [closed]

    13 février 2020, par Muhammad Haroon

    Hi i got stuck in applying real time audio effect while recording audio is there any native way to apply reverb on audio.please suggest what is best way to achieve this as i am already using tarsosdsp for pitch detection.

  • Removing file in windows batch script not working

    13 février 2020, par BluePrint

    I'm trying to create a batch script for trimming 25 seconds from the beginning of all mp4 files in a folder. The batch script is located in the same folder as the files, and there is a folder called trimmed in the same folder. This is my script so far:

    @echo off
    setlocal DisableDelayedExpansion
    
    :promptdel
    set /p delorig=Delete original file (default no)? [Y/N]: 
    
    if not defined delorig (
      set delorig=N
    )
    
    set "vartwo="&for /f "delims=YNyn" %%i in ("%delorig%") do set vartwo=%%i
    
    if defined vartwo (
      echo Please state Y or N!
      goto :promptdel
    )
    
    for %%a in ("*.mp4") do (
      echo Starting %%a
    
      rem "Need to rename since file names may contain whitespaces"
      ren "%%a" "working.mp4"
      ffmpeg -loglevel panic -hide_banner -i "working.mp4" -ss 00:00:25.000 -c:v copy -c:a copy "trimmed\%%a"
      ren "working.mp4" "%%a"
    
      echo %delorig%
      if %delorig% == "Y" (del "%%a" /f /q)
      if %delorig% == "y" (del "%%a" /f /q)
    
      echo %%a finished!
    )
    
    pause
    

    My problem is that the original file does not get removed regardless of if I input y/Y or n/N. What am I doing wrong?

  • How to set ffmpeg command line option in FFmpeg.AutoGen

    13 février 2020, par Yurii Zhukow

    I am trying to read/decode RTSP stream from my ip camera using FFmpeg.AutoGen lib. The server responds with error when ffmpeg tries to connect via UDP. The same thing happens when i try to connect via ffmpeg exe:

    ffmpeg -i rtsp:// -vcodec h264 c:\out.mp4

    But when use -rtsp_transport tcp every thing works fine:

    ffmpeg -rtsp_transport tcp -i rtsp:// -vcodec h264 c:\out.mp4

    Can anyone suggest how to enable such options (in general, or in particular -rtsp_transport tcp option) in FFmpeg.AutoGen?