Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (46)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (8732)

  • Using command line find to encode files and save to same directory

    15 janvier 2017, par Ali Samii

    I am trying to execute a find bash command to process hundreds of video files that are all named video-original.mp4 but are in subdirectories of a parent directory.

    Here’s an example of the directory structure :

    videos
    ├── 01a
    │   └── video-original.mp4
    ├── 01b
    │   └── video-original.mp4
    ├── 02a
    │   └── video-original.mp4
    ├── 02b
    │   └── video-original.mp4
    ├── 03a
    │   └── video-original.mp4
    └── 03b
       └── video-original.mp4

    I am using the following command :

    find ./ -name 'video-original.mp4' -exec bash -c 'ffmpeg -i "$0" -f mp4 -vcodec libx264 -preset veryslow -profile:v high -acodec aac -movflags faststart video.mp4 -hide_banner' {} \;

    The problem I am having is that it is saving the file video.mp4 in the parent videos directory, instead of in the subdirectory next to the original video-original.mp4

    Afterwards, I want to delete the file video-original.mp4. Currently, my process entails waiting for all the videos to be reencoded, and then once complete, issuing a separate command to delete the file video-original.mp4 :

    find ./ -name 'video-original.mp4' -exec bash -c 'rm -rf "$0"' {} \;

    And my final step would be to extract a screenshot of the new video.mp4 at 10 seconds and save it as thumbnail.jpg. Again, I am currently doing that as a separate step that I execute after the previous two steps are completed.

    find ./ -name 'video.mp4' -exec bash -c 'ffmpeg -i "$0" -ss 00:00:10 -vframes 1 thumbnail.jpg' {} \;

    What I would like to do is combine these three steps into a single command so the end result will be :

    videos
    ├── 01a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 01b
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 02a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 02b
    │   ├── thumbnail.jpg
    │   └── video.mp4
    ├── 03a
    │   ├── thumbnail.jpg
    │   └── video.mp4
    └── 03b
       ├── thumbnail.jpg
       └── video.mp4

    Finally, it would be great to save that as a bash script and include it in my path in /usr/local/bin or ~/bin as an executable so I could just issue the command reencode and it would run. Would be even better if the input file could have any video file, for example, random_name.mp4 or random_name.mov or random_name.webm, basically any video file (but skipping video.mp4 at the encoding step).

  • Revision dcacce6dd9 : Merge "Save pixels instead of coefficients in intra4x4 RD loop."

    27 juillet 2013, par Ronald S. Bultje

    Changed Paths :
     Modify /vp9/encoder/vp9_rdopt.c



    Merge "Save pixels instead of coefficients in intra4x4 RD loop."

  • FFMPEG save last 10 sec before a movement and next 30secs

    2 novembre 2020, par Set1ish

    I have a surveillance camera that process frame by frame live video. In case of movement, I want to save a video containing the last 10 seconds before the movement and next 30 seconds after the movement.
I beleve (may be I'm wrong), that last 10 second + next 30seconds task, should be obtained without decoding-rencoding process.

    


    I try to use python with fmmpeg pipes, creating a reader and a writer, but the reader seams too slow for the stream and I loose some packets (= loose on video quality for saved file).

    


    Here my code

    


    import ffmpeg
import numpy as np

width = 1280
height = 720


process1 = (
    ffmpeg
    .input('rtsp://.....',rtsp_transport='udp', r='10', t="00:00:30")
    .output('pipe:', format='rawvideo', pix_fmt='yuv420p')
    .run_async(pipe_stdout=True)
)

process2 = (
    ffmpeg
    .input('pipe:', format='rawvideo', pix_fmt='yuv420p', s='{}x{}'.format(width, height))
    .output("prova-02-11-2020.avi", pix_fmt='yuv420p',r='10')
    .overwrite_output()
    .run_async(pipe_stdin=True)
)
while True:
    in_bytes = process1.stdout.read(width * height * 3)
    if not in_bytes:
        break
    in_frame = (
        np
        .frombuffer(in_bytes, np.uint8)
        )

    #In future I will save in_frame in a queue
    out_frame = in_frame
   
    process2.stdin.write(
        out_frame
        .astype(np.uint8)
        .tobytes()
    )

process2.stdin.close()
process1.wait()
process2.wait()


    


    If I run

    


    ffmpeg -i rtsp://... -acodec copy -vcodec copy -t "00:00:30" out.avi


    


    It look that decode-rencode process is done in quick/smart way without loosing any packet.
My dream is to make the same on python for the surveillance camera but intergrating with code that analyse the stream.

    


    I would like that the flow for creating the file, does not requires decoding + enconding. The last 10secs frames are in a queue and, at specific event, the contenet of queue plus next 30secs frames are saved into a avi file

    


    I have the constraints to have realtime motion detection on live streaming

    


    Did you have any comments or suggestion ?