Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (100)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (15032)

  • 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.

    


  • 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 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 !