Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (54)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (7925)

  • Google Speech - Streaming Request Returns EOF Error

    16 octobre 2017, par Josh

    Using Go, I’m taking a RTMP stream, transcoding it to FLAC (using ffmpeg) and attempting to stream to Google’s Speech API to transcribe the audio. However, I keep getting EOF errors when sending the data. I can’t find any information on this error in the docs so I’m not exactly sure what’s causing it.

    I’m chunking the received data into 3s clips (length isn’t relevant as long as it’s less than the maximum length of a streaming recognition request).

    Here is the core of my code :

    func main() {

       done := make(chan os.Signal)
       received := make(chan []byte)

       go receive(received)
       go transcribe(received)

       signal.Notify(done, os.Interrupt, syscall.SIGTERM)

       select {
       case <-done:
           os.Exit(0)
       }
    }

    func receive(received chan<- []byte) {
       var b bytes.Buffer
       stdout := bufio.NewWriter(&b)

       cmd := exec.Command("ffmpeg", "-i", "rtmp://127.0.0.1:1935/live/key", "-f", "flac", "-ar", "16000", "-")
       cmd.Stdout = stdout

       if err := cmd.Start(); err != nil {
           log.Fatal(err)
       }

       duration, _ := time.ParseDuration("3s")
       ticker := time.NewTicker(duration)

       for {
           select {
           case <-ticker.C:
               stdout.Flush()
               log.Printf("Received %d bytes", b.Len())
               received <- b.Bytes()
               b.Reset()
           }
       }
    }

    func transcribe(received <-chan []byte) {
       ctx := context.TODO()

       client, err := speech.NewClient(ctx)
       if err != nil {
           log.Fatal(err)
       }

       stream, err := client.StreamingRecognize(ctx)
       if err != nil {
           log.Fatal(err)
       }

       // Send the initial configuration message.
       if err = stream.Send(&speechpb.StreamingRecognizeRequest{
           StreamingRequest: &speechpb.StreamingRecognizeRequest_StreamingConfig{
               StreamingConfig: &speechpb.StreamingRecognitionConfig{
                   Config: &speechpb.RecognitionConfig{
                       Encoding:        speechpb.RecognitionConfig_FLAC,
                       LanguageCode:    "en-GB",
                       SampleRateHertz: 16000,
                   },
               },
           },
       }); err != nil {
           log.Fatal(err)
       }

       for {
           select {
           case data := <-received:
               if len(data) > 0 {
                   log.Printf("Sending %d bytes", len(data))
                   if err := stream.Send(&speechpb.StreamingRecognizeRequest{
                       StreamingRequest: &speechpb.StreamingRecognizeRequest_AudioContent{
                           AudioContent: data,
                       },
                   }); err != nil {
                       log.Printf("Could not send audio: %v", err)
                   }
               }
           }
       }
    }

    Running this code gives this output :

    2017/10/09 16:05:00 Received 191704 bytes
    2017/10/09 16:05:00 Saving 191704 bytes
    2017/10/09 16:05:00 Sending 191704 bytes
    2017/10/09 16:05:00 Could not send audio: EOF

    2017/10/09 16:05:03 Received 193192 bytes
    2017/10/09 16:05:03 Saving 193192 bytes
    2017/10/09 16:05:03 Sending 193192 bytes
    2017/10/09 16:05:03 Could not send audio: EOF

    2017/10/09 16:05:06 Received 193188 bytes
    2017/10/09 16:05:06 Saving 193188 bytes
    2017/10/09 16:05:06 Sending 193188 bytes // Notice that this doesn't error

    2017/10/09 16:05:09 Received 191704 bytes
    2017/10/09 16:05:09 Saving 191704 bytes
    2017/10/09 16:05:09 Sending 191704 bytes
    2017/10/09 16:05:09 Could not send audio: EOF

    Notice that not all of the Sends fail.

    Could anyone point me in the right direction here ? Is it something to do with the FLAC headers or something ? I also wonder if maybe resetting the buffer causes some of the data to be dropped (i.e. it’s a non-trivial operation that actually takes some time to complete) and it doesn’t like this missing information ?

    Any help would be really appreciated.

  • Revision 89af744ba6 : Change vp9_ prefix function names in vpx_scale to vpx_ Change-Id : Iac85902cbbb3

    15 août 2015, par Jingning Han

    Changed Paths :
     Modify /vp10/common/alloccommon.c


     Modify /vp10/common/postproc.c


     Modify /vp10/decoder/decodeframe.c


     Modify /vp10/encoder/denoiser.c


     Modify /vp10/encoder/encoder.c


     Modify /vp10/encoder/firstpass.c


     Modify /vp10/encoder/lookahead.c


     Modify /vp10/encoder/skin_detection.c


     Modify /vp10/encoder/svc_layercontext.c


     Modify /vp10/encoder/temporal_filter.c


     Modify /vp9/common/vp9_alloccommon.c


     Modify /vp9/common/vp9_postproc.c


     Modify /vp9/decoder/vp9_decodeframe.c


     Modify /vp9/encoder/vp9_denoiser.c


     Modify /vp9/encoder/vp9_encoder.c


     Modify /vp9/encoder/vp9_firstpass.c


     Modify /vp9/encoder/vp9_lookahead.c


     Modify /vp9/encoder/vp9_skin_detection.c


     Modify /vp9/encoder/vp9_svc_layercontext.c


     Modify /vp9/encoder/vp9_temporal_filter.c


     Modify /vpx_scale/generic/yv12config.c


     Modify /vpx_scale/generic/yv12extend.c


     Modify /vpx_scale/mips/dspr2/yv12extend_dspr2.c


     Modify /vpx_scale/vpx_scale_rtcd.pl


     Modify /vpx_scale/yv12config.h



    Change vp9_ prefix function names in vpx_scale to vpx_

    Change-Id : Iac85902cbbb3e752801dc85de9a3c778e47304aa

  • ffmpeg is failing to load shared libraries after a ./configure with a prefix inside a conda environment

    30 janvier 2024, par user3133806

    I am using conda and building ffmpeg from source within that environment.

    


    I ran the following commands :

    


    conda create --name my_conda_env
conda activate my_conda_env
# Now I am in the conda environment
# $CONDA_PREFIX is /home/myuser/.conda/envs/my_conda_env/bin/ffmpeg

# Checkout ffmpeg code
# git checkout ...

./configure --prefix=$CONDA_PREFIX --enable-shared --disable-static && make distclean && make -j 100 && make install

# The above command does install the newly built ffmpeg into:
# /home/myuser/.conda/envs/my_conda_env/bin/ffmpeg

# However it fails to execute:
ffmpeg
ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory

# When I add the conda lib path to LD_LIBRARY_PATH it works:
LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH ffmpeg
ffmpeg version n4.2.9-4-gd7beb0c61f Copyright (c) 2000-2023 the FFmpeg developers

# I thought ./configure with a --prefix will build a binary that will search for libraries relative to itself, but that does not appear to be the case:

strace -o /tmp/strace.out ffmpeg
tail /tmp/strace.out

openat(AT_FDCWD, "/usr/lib64/haswell/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/haswell/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/haswell/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/haswell", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/avx512_1/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/avx512_1/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/avx512_1/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/avx512_1", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib64", {st_mode=S_IFDIR|0555, st_size=49526, ...}, 0) = 0
writev(2, [{iov_base="ffmpeg", iov_len=6}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {i
ov_base=": ", iov_len=2}, {iov_base="libavdevice.so.58", iov_len=17}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10) = 
123


    


    Conda documentation says not to use LD_LIBRARY_PATH here :

    


    https://docs.conda.io/projects/conda-build/en/stable/resources/use-shared-libraries.html#shared-libraries-in-macos-and-linux

    


    How can I build ffmpeg from source in a conda environment and have the binary find the .so file relative to itself ?