Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (56)

Sur d’autres sites (9350)

  • FFMPEG : could not run filter error

    3 octobre 2013, par Vigo

    I have static builds for FFMPEG. I run a video streaming command from the console. I get a 'could not run filter error'.

    enter image description here

    What are the generic causes of this error ? Is it an issue with the parameters passed or is it something to do with the video capturing device (in my case, Webcam) itself ? Could anyone throw some light on this ?

  • Python/FFMPEG command line issues

    5 octobre 2011, par 12hys

    I have a problem with running an FFMPEG command from within a Python script. When I run the following command from the terminal, I can stream video and audio from my attached webcam (Logitech C310) and output to file "out.avi" without any errors.

    ffmpeg -f alsa -i default -itsoffset 00:00:00 -f video4linux2 -s 1280x720 -r 25 -i /dev/video0 out.avi

    When I run the same command in a Python script below,

    def call_command(command):
       subprocess.Popen(command.split(' '))

    call_command("ffmpeg -f alsa -i default -itsoffset 00:00:00 -f video4linux2 -s 1280x720 -r 25 -i /dev/video0 out.avi")

    it gives me the error :

    Input #0, alsa, from 'default':
     Duration: N/A, start: 1317762562.695397, bitrate: N/A
     Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
    [video4linux2 @ 0x165eb10]Cannot find a proper format for codec_id 0, pix_fmt -1.
    /dev/video0: Input/output error

    Could anyone shed some light on what could be going on here ? I've tried using os.system() as well as subprocess.call() and it gives me the same errors. I'm not sure where to start on what could be going wrong here. I tried searching for the "video4linux2 Cannot find a proper format for codec_id 0, pix_fmt -1" error, but couldn't find anything consistent.

    I've also tried putting the "ffmpeg -f..." command in a shell script "test.sh", and giving it executable permissions. I then open terminal, and run "./test.sh", and it works. When I try calling the command "./test.sh" from within my Python script, I'm left with the original error as before. This is the Python command I tried with the test.sh script :

    subprocess.call(["./test.sh"])
  • Dissappearing characters in youtube-dl, ffmpeg, and windows

    4 juin 2014, par user3407161

    so what happens is that if the video title has a symbol that isn’t supported by your current locale then ffmpeg won’t be able to get to that file properly.

    Here’s one example

    ►2 HOURS BEST MELODIC DUBSTEP MIX APRIL 2013◄ ヽ( ≧ω≦)ノ

    as you may or may not be able to see, lots of symbols from unicode.

    The problem is that in cmd and ffmpeg, though cmd can see

    ►2 HOURS BEST MELODIC DUBSTEP MIX APRIL 2013◄ ヽ( ≧ω≦)ノ

    ffmpeg only sees

    2 HOURS DUBSTEP_DRUMSTEP MIX AUGUST 2013 ヽ(≧ω≦)ノ

    This is the exact error message (i’m using youtube-dl)

    [ffmpeg] Adding metadata to 'C:\Music\ToBeDone\2014-06-01\►2 HOURS DUBSTEP_DRUMSTEP MIX AUGUST 2013◄ ヽ( ≧ω≦)ノ.mp4'
    ERROR: C:\Music\ToBeDone\2014-06-01\2 HOURS DUBSTEP_DRUMSTEP MIX AUGUST 2013 ヽ(≧ω≦)ノ.mp4: No such file or directory
    ERROR: WARNING: unable to obtain file audio codec with ffprobe

    After some research i’ve determined that by changing the system locale you can change which symbols cmd can support.

    However

    Used to appear as a box in a question mark in United states locale. In japanese locale it appears as it does on your screen right now.

    the problem with

    is that even though it’s not appearing as a question mark in a box (it’s appearing as how it should be), ffmpeg (or cmd) can’t detect it properly.

    (Refer back to the error message, i’ll repost it below.)

    [ffmpeg] Adding metadata to 'C:\Music\ToBeDone\2014-06-01\►2 HOURS DUBSTEP_DRUMSTEP MIX AUGUST 2013◄ ヽ( ≧ω≦)ノ.mp4'
    ERROR: C:\Music\ToBeDone\2014-06-01\2 HOURS DUBSTEP_DRUMSTEP MIX AUGUST 2013 ヽ(≧ω≦)ノ.mp4: No such file or directory
    ERROR: WARNING: unable to obtain file audio codec with ffprobe

    So as you can see, I think cmd passed on the symbol correctly to ffmpeg seeing from the adding metadata line, but when it actually does the operation ffmpeg loses

    ► and ◄

    Could this be a bug with ffmpeg ? MY workaround so far with incompatible symbols was to change the system locale, but I don’t think i can do that with these two symbols...

    These are the unique characters that i need to have a locale that supports

    Ö

    ◄ ヽ( ≧ω≦)ノ

    ( ͡° ͜ʖ ͡°)

    (_≧∇≦)



    More info on the problem in general

    https://github.com/rg3/youtube-dl/issues/2999

    and this is what’s going on (Batch Script)

    @echo off
    setlocal
    cd C:\youtube-dl

    set /p "var1=Enter URL: " %=% pause
    if defined var1 set "var1=%var1:"=%"
    set "var2=%date:/=-%"
    set "var3=%%(title)s.%%(ext)s"
    youtube-dl "%var1%" -ci -o "C:\Music\ToBeDone\%var2%\%var3%" -f best -x --no-mtime --add-metadata
    youtube-dl "%var1%" --skip-download -ci -o "C:\Music\ToBeDone\%var2%\Thumbnail\%var3%" --write-   thumbnail
    youtube-dl "%var1%" --skip-download -ci -o "C:\Music\ToBeDone\%var2%\Description\%var3%" --write-description