Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (99)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5618)

  • ffmpeg - pipe metadata about stream

    4 février 2021, par Mike S.

    I'm in process of writing an app which should process live AV stream and do some magic. Well, it should just display some audio levels.

    


    So far, everything works with one exception. The problem is that I'm piping the stream from basically unknown source (it may be whatever) and I can only guess the channel count and the sample rate.

    


    Is there a way how ffmpeg can tell me this ? Right now, I'm using following command to execute ffmpeg :

    


    ffmpeg -loglevel 40 -hide_banner -re -i pipe:0 -vn -f s16le -acodec pcm_s16le
 pipe:3 -progress pipe:4 -f ffmetadata pipe:5


    


    But ffmetadata is empty and progress does not contain any of required info. I've found ffprobe, which could tell me all I need and then I would kill it, but I believe there is a way to achieve the same with just ffmpeg (and without parsing its stdout).

    


    Thank you !

    


  • ffmpeg : error reading header pipe:0 : Invalid argument

    25 février 2021, par Дмитрий Бондаренко

    I need microservice (converter audio using streams), but have problem with ffmpeg

    


    my test ffmpeg

    


    package codec

import (
    "bytes"
    "os"
    "os/exec"
    "testing"
)

func Test1(t *testing.T) {
    in, err := os.Open("/mp4-mp3/src.m4a")
    if err != nil {
        t.Fatal(err.Error())
    }
    out, err := os.OpenFile("/mp4-mp3/out.mp3", os.O_RDWR|os.O_CREATE, 0666)
    if err != nil {
        t.Fatal(err.Error())
    }
    cmd := exec.Command(
        "ffmpeg",
        "-f", "m4a",
        "-i", "pipe:0",
        "-f", "mp3",
        "pipe:1")

    cmd.Stdin = in
    cmd.Stdout = out
    stderr := &bytes.Buffer{}
    cmd.Stderr = stderr
    if err := cmd.Run(); err != nil {
        t.Logf(stderr.String())
        t.Fatal(err.Error())
    }

}



    


    At the exit, I have the error invalid argument
i tried different options but the problem didn't change

    


    === RUN   Test1
    codec_test.go:31: ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
          built with gcc 10.2.1 (GCC) 20200805
          configuration: hide...
          libavutil      56. 58.100 / 56. 58.100
          libavcodec     58.101.101 / 58.101.101
          libavformat    58. 51.101 / 58. 51.101
          libavdevice    58. 11.101 / 58. 11.101
          libavfilter     7. 87.100 /  7. 87.100
          libswscale      5.  8.100 /  5.  8.100
          libswresample   3.  8.100 /  3.  8.100
          libpostproc    55.  8.100 / 55.  8.100
        [mov,mp4,m4a,3gp,3g2,mj2 @ 0000019ccc3acb40] error reading header
        pipe:0: Invalid argument
    codec_test.go:32: exit status 1
--- FAIL: Test1 (0.07s)
FAIL

Process finished with exit code 1


    


    i decided to use cmd, but i have new problem
pipe:0 : Invalid data found when processing input

    


    cat src.m4a | ffmpeg -f m4a -i pipe:0 out.mp3
ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200805
  configuration: hide...
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.101.101 / 58.101.101
  libavformat    58. 51.101 / 58. 51.101
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000019afa98d800] invalid STSD entries 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000019afa98d800] error reading header
pipe:0: Invalid data found when processing input



    


    How to properly set ffmpeg parameters to convert from stream to stream ?

    


  • ffmpeg pipe to generate h264 chunks from numpy array or bgr24 bytes

    25 février 2021, par harsh solanki

    is there a possibility if someone can help me with FFmpeg pipe to generate h264 chunks from NumPy array

    


    This is what I am doing now :

    


    process = (
ffmpeg
.input('pipe :', format='rawvideo', pix_fmt='bgr24', s='{}x{}'.format(self._deeptwin.image_width, self._deeptwin.image_height))
.output(path, pix_fmt='yuv420p', vcodec='libx264', r=25)
.overwrite_output()
.run_async(pipe_stdin=True)
)

    


    for res in response:
    st = datetime.datetime.now()
    print(f'{res.status} image {res.id} rendered at {datetime.datetime.now()}')
    img = np.frombuffer(res.image, dtype=np.uint8)
    img = img.reshape((int(self._deeptwin.image_height * 1.5), self._deeptwin.image_width))
    img = cv2.cvtColor(img, cv2.COLOR_YUV2BGR_I420)
    
    for frame in img:
        start = datetime.datetime.now()
        process.stdin.write(
            frame
            .astype(np.uint8)
            .tobytes()
        )
        end = datetime.datetime.now()
    stop = datetime.datetime.now()
    print(f'{res.id} conversion done at {stop-st}')
process.stdin.close()
process.wait()


    


    `
What this is doing currently is generating an out.h264 file. It is fine and playing a correct video as well.

    


    However, what I need to achieve : I want to generate chunks of h264 frames in the following way : 1.h264, 2.h264............n.h264

    


    Any guidance would be really appreciated and helpful.

    


    Thanks in advance.