Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (95)

  • Les sons

    15 mai 2013, par
  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (7833)

  • java.io.IOException : Cannot run program "/data/user/0/com.package.name/files/ffmpeg" : error=13, Permission denied

    12 avril 2020, par KANAYO AUGUSTIN UG

    I am trying to cut a video using FFmpeg library from com.writingminds:FFmpegAndroid:0.3.2...
When I try to run my command

    



    String[] complexCommand = { "-y", "-i", inputFilePath,"-ss", "" + trimStart, "-t", "" + trim, "-c","copy", outputFilePath};
execFFmpegBinary(complexCommand);


    



    I get this error :

    



    


    E/FFmpeg : Exception while trying to run : [Ljava.lang.String ;@c7a48dd

    
 


    java.io.IOException : Cannot run program "/data/user/0/com.package.name/files/ffmpeg" : error=13, Permission denied

    


    



    Even after making sure the library loaded successfully

    



    private void loadFFMpegBinary() {
    try {
        if (ffmpeg == null) {
            ffmpeg = FFmpeg.getInstance(cntxt);
        }
        ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
            @Override
            public void onFailure() {
                Log.i("success", "false");
            }

            @Override
            public void onSuccess() {
                Log.i("success", "true");
            }
        });
    } catch (FFmpegNotSupportedException e) {
    } catch (Exception e) {
    }
}


    



    I have enabled WRITE_PERMISSION in Android.manifest file, and I also tried to write a file to the storage and it worked.

    



    I guess FFmpeg has a default path to write a file which is /data/user/0/com.package.name/files/ffmpeg, but I need to change the default path please anyone with an idea ?

    


  • OpenCV VideoWriter produces "can't find starting number" error

    5 avril 2020, par user3325139

    I am trying to write 16-bit grayscale video using the FFV1 codec and opencv.ImageWriter on Windows 10

    



    Here is my code :

    



    import numpy as np
import cv2, pdb

print(cv2.getBuildInformation())

def to8(img):
    return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

out = cv2.VideoWriter('out.avi', cv2.VideoWriter_fourcc('F','F','V','1'), cap.get(cv2.CAP_PROP_FPS), (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))))

while True:
    ret, frame = cap.read()
    frame = cv2.normalize(frame,None,0,65535,cv2.NORM_MINMAX)

    cv2.imshow('Video',to8(frame))
    out.write(frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()
out.release()
cv2.destroyAllWindows()


    



    And here is my error :

    



    [ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): out.avi in function 'cv::icvExtractPattern'


    



    I am running this script from a command window with admin privileges. I've tried both making sure the output file does and does not exist before running.

    



    My OpenCV build information is here : https://pastebin.com/whtF6ixG

    



    Thanks !

    



    EDIT :
Based on Rotem's suggestion, instead of using VideoWriter I piped directly to FFMPEG using ffmpeg-python :

    



    import numpy as np
import cv2, pdb
import ffmpeg

def to8(img):
    return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

ff_proc = (
    ffmpeg
    .input('pipe:',format='rawvideo',pix_fmt='gray16le',s='%sx%s'%(int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))),r='60')
    .output('out3.avi',vcodec='ffv1',an=None)
    .run_async(pipe_stdin=True)
)

while True:
    ret, frame = cap.read()

    cv2.imshow('Video',to8(frame))
    ff_proc.stdin.write(frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

out.terminate()
cap.release()
cv2.destroyAllWindows()


    


  • Why am I getting FFMPEG "cannot set sample format 0x10000 2 (Invalid argument)" error ? [duplicate]

    30 mars 2020, par Embedded

    I’m trying to stream audio input from Seeed Studio 4-Mic-Array Respeaker on desired IP address and port on Raspberry Pi 4.

    Command that I’m using is :

    ffmpeg -re -f alsa -i hw:1,0 -ac 4 -ar 16000 -f rtp rtp://10.0.0.1:1234

    Error I’m getting is :

    cannot set sample format 0x10000 2 (Invalid argument)

    Result from arecord --dump-hw-params -D hw:1,0 command is :

    Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
    HW Params of device "hw:1,0":
    --------------------
    ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
    FORMAT:  S32_LE
    SUBFORMAT:  STD
    SAMPLE_BITS: 32
    FRAME_BITS: 128
    CHANNELS: 4
    RATE: [8000 48000]
    PERIOD_TIME: (333 2048000]
    PERIOD_SIZE: [16 16384]
    PERIOD_BYTES: [256 262144]
    PERIODS: [2 2048]
    BUFFER_TIME: (666 4096000]
    BUFFER_SIZE: [32 32768]
    BUFFER_BYTES: [512 524288]
    TICK_TIME: ALL
    --------------------
    arecord: set_params:1299: Sample format non available
    Available formats:
    - S32_LE