Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (99)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Les sons

    15 mai 2013, par
  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (16060)

  • ffmpeg converting PCM data file to wav file getting distorted(noisy) data

    3 janvier 2015, par Mahendra

    I have raw pcm data in following form :

    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0100
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0100 0100 0000 0000 efbf bdef bfbd
    0000 efbf bdef bfbd efbf bdef bfbd efbf
    bdef bfbd efbf bdef bfbd efbf bdef bfbd
    efbf bdef bfbd efbf bdef bfbd 0000 efbf
    bdef bfbd 0000 efbf bdef bfbd efbf bdef
    bfbd 2900 efbf bdef bfbd 0000 efbf bdef
    bfbd efbf bdef bfbd efbf bdef bfbd 0000

    and I want to make this data in wav file when I am converting by ffmpeg getting noisy data by this command :

    sox -V -t raw -b 16 -e signed -r 16000 -c 1 14_32_7_187.pcm  new.wav

    and :

    ffmpeg -f s16le -ar 16000 -ac 1 -i 14_32_7_187.pcm -ar 16000 -ac 1 oout.wav

    using both getting noisy data.

  • How to save frame from VOB with correct size ?

    18 mars 2017, par Paulo Barretto

    I am saving single frames from a vob file with ffmpeg.

    ffprobe shows for my vob file :

    Stream #0:1[0x1e0] : Video : mpeg2video (Main), yuv420p(tv), 720x480
    [SAR 8:9 DAR 4:3], Closed Captions, 3750 kb/s, 29.97 fps, 29.97 tbr,
    90k tbn, 59.94 tbc

    My command line is

    ffmpeg -i File1.vob -ss 10 -q:v 2 -vframes 1 -an -sn frame10s.jpg

    My jpeg files are being saved with 720x480, horizontally stretched. How can I make them be saved with correct display ratio 640x480 ?

  • Read, process and save video and audio with FFMPEG

    3 mai 2017, par sysseon

    I want to open a video resource with ffmpeg on Python, get the read frames from the pipe, modify them (e.g. put the timestamp with OpenCV) and write the result to an output video file. I also want to save the audio source with no changes.

    My code (with no audio and two processes) :

    import subprocess as sp
    import numpy as np
    # import time
    # import cv2

    FFMPEG_BIN = "C:/ffmpeg/bin/ffmpeg.exe"
    INPUT_VID = 'input.avi'
    res = [320, 240]

    command_in = [FFMPEG_BIN,
                 '-y',  # (optional) overwrite output file if it exists
                 '-i', INPUT_VID,
                 '-f', 'image2pipe',  # image2pipe or rawvideo?
                 '-pix_fmt', 'bgr24',
                 '-vcodec', 'rawvideo',
                 '-']

    command_out = [FFMPEG_BIN,
                  '-y',  # (optional) overwrite output file if it exists
                  '-f', 'rawvideo',
                  '-vcodec', 'rawvideo',
                  '-s', '320x240',
                  '-pix_fmt', 'bgr24',
                  '-r', '25',
                  '-i', '-',
                  # '-i', INPUT_VID,    # Audio
                  '-vcodec', 'mpeg4',
                  'output.mp4']

    pipe_in = sp.Popen(command_in, stdout=sp.PIPE, stderr=sp.PIPE)
    pipe_out = sp.Popen(command_out, stdin=sp.PIPE, stderr=sp.PIPE)

    while True:
       # Read 320*240*3 bytes (= 1 frame)
       raw_image = pipe_in.stdout.read(res[0] * res[1] * 3)
       # Transform the byte read into a numpy array
       image = np.fromstring(raw_image, dtype=np.uint8)
       image = image.reshape((res[1], res[0], 3))
       # Draw some text in the image
       # draw_text(image)

       # Show the image with OpenCV (not working, gray image, why?)
       # cv2.imshow("VIDEO", image)

       # Write image to output process
       pipe_out.stdin.write(image.tostring())

    print 'done'
    pipe_in.kill()
    pipe_out.kill()
    1. Could it be done with just a process ? (Read the input from a file,
      put it in the input pipe, get the image, process it, and put it in
      the output pipe to be saved into a video file)
    2. How can I save the audio ? In this example, I could use ’-i
      INPUT_VID’ in the second process to get the audio channel, but my
      source will be a RTSP, and I don’t want to create a connection for
      each process. Could I put video+audio in the pipe and rescue and
      separate it with numpy ? How ?
    3. I use a loop to process the frames and wait until I get an error.
      How can I check if all frames are already read ?
    4. Not important, but if I try to show the images with OpenCV
      (cv2.imshow(...)), I only see a gray screen. Why ?