Recherche avancée

Médias (91)

Autres articles (37)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (5999)

  • lavu/tx : support in-place FFT transforms

    10 février 2021, par Lynne
    lavu/tx : support in-place FFT transforms
    

    This commit adds support for in-place FFT transforms. Since our
    internal transforms were all in-place anyway, this only changes
    the permutation on the input.

    Unfortunately, research papers were of no help here. All focused
    on dry hardware implementations, where permutes are free, or on
    software implementations where binary bloat is of no concern so
    storing dozen times the transforms for each permutation and version
    is not considered bad practice.
    Still, for a pure C implementation, it's only around 28% slower
    than the multi-megabyte FFTW3 in unaligned mode.

    Unlike a closed permutation like with PFA, split-radix FFT bit-reversals
    contain multiple NOPs, multiple simple swaps, and a few chained swaps,
    so regular single-loop single-state permute loops were not possible.
    Instead, we filter out parts of the input indices which are redundant.
    This allows for a single branch, and with some clever AVX512 asm,
    could possibly be SIMD'd without refactoring.

    The inplace_idx array is guaranteed to never be larger than the
    revtab array, and in practice only requires around log2(len) entries.

    The power-of-two MDCTs can be done in-place as well. And it's
    possible to eliminate a copy in the compound MDCTs too, however
    it'll be slower than doing them out of place, and we'd need to dirty
    the input array.

    • [DH] doc/APIchanges
    • [DH] libavutil/tx.c
    • [DH] libavutil/tx.h
    • [DH] libavutil/tx_priv.h
    • [DH] libavutil/tx_template.c
    • [DH] libavutil/version.h
  • Spaces in FFMPEG Input Thwart Execution

    2 septembre 2021, par Woolwit

    What's so baffling, is why spaces in the audio input seem to work fine, but spaces in the video input break things.
This fetches random images from a directory, pairs them with random audio clips and joins them into an mp4 video.

    


    def makeAudioImgMovs():
    randImgs = getImgs()
    compAudClips = makeAudioClips()
    audioJpgs = dict(zip(randImgs,compAudClips)) #Heres where we join the completed audio clips and the jpgs into a dict
    for jpg, aud in audioJpgs.items():
        print(f'The img is {jpg}, the type of the img is {type(jpg)} the aud is {aud} the type of the aud is {type(aud)}')
        subprocess.call('ffmpeg -hide_banner -loglevel error -loop 1 -i "{0}" -i "{1}"\
        -filter:v \
        "fade=in:st=0:d=1, fade=out:st=10:d=1,scale=720:480:force_original_aspect_ratio=decrease,pad=720:480:(ow-iw)/2:(oh-ih)/2,setsar=1" \
         -filter:a "afade=in:st=0:d=1, afade=out:st=10:d=1" \
        -c:v libx264 -t 11 -pix_fmt yuv420p -preset faster -shortest -c:a aac {2}.mp4'.format(jpg,aud,timePath/(pathlib.Path(jpg).stem)),shell=True)
makeAudioImgMovs()


    


    The print statement is writing what is in the dict of audioJpgs list. For example...

    


    The img is 2021-09-02-1-40/ponty_me.jpg, the type of the img is the aud is 2021-09-02-1-40/Jms Brn like it is like it was.aiff the type of the aud is

    


    The img is 2021-09-02-1-40/1966taxiToMassFromMomBack 2.tiff, the type of the img is the aud is 2021-09-02-1-40/Lola_Fay.mp3 the type of the aud is

    


    [NULL @ 0x7fe503021400] Unable to find a suitable output format for '2021-09-02-1-40/1966taxiToMassFromMomBack'
2021-09-02-1-40/1966taxiToMassFromMomBack : Invalid argument

    


    The img is 2021-09-02-1-40/1966taxiToMassFromMomBack 5.tiff, the type of the img is the aud is 2021-09-02-1-40/M Miller Lonnie's Lament.aiff the type of the aud is

    


    [NULL @ 0x7fd32a854c00] Unable to find a suitable output format for '2021-09-02-1-40/1966taxiToMassFromMomBack'
2021-09-02-1-40/1966taxiToMassFromMomBack : Invalid argument

    


    The img is 2021-09-02-1-40/10_021390_danny ? 1_jpg.jpg, the type of the img is the aud is 2021-09-02-1-40/i_got_to_rock.mp3 the type of the aud is

    


    [NULL @ 0x7f8449835800] Unable to find a suitable output format for '2021-09-02-1-40/10_021390_danny ?'
2021-09-02-1-40/10_021390_danny ? : Invalid argument

    


    The img is 2021-09-02-1-40/11_021390_danny_2_jpg.jpg, the type of the img is the aud is 2021-09-02-1-40/M Miller Power.aiff the type of the aud is

    


    The last pair of img/aud complete fine and write an mp4. Notice there, that the audio file has spaces in it !
Notice that the errors 'Invalid argument' get thrown where there is a space in the jpg file name.

    


    Help greatly appreciated.

    


  • Continuous RTSP stream recording with ffmpeg. Can I optimize it to not damage the SD card ?

    10 juillet 2019, par Mona

    I have got an IP camera with RTSP stream. I decided to record the stream using ffmpeg (version 3.2.14-1 deb9u1) on the Odroid-N2 device with Armbian. I have created a .sh script which is launched by Croon every minute. It checks if the ffmpeg recording is active for selected camera and also deletes files older than 7 days :

    #!/bin/bash
    RecordPathAndFind='/home/mona/CameraRecordings/Camera1/'
    SegmentTime=900
    MinutesAfterDeleteOldFiles=10080
    DaysSecurityLimit=31

    tempoutput=$(ps aux | grep ffmpeg | grep $RecordPathAndFind)
    if [ ${#tempoutput} -ge 5 ];
    then
         echo "FFMPEG with record command is already running. Skipping.\n"
    else
         echo "FFMPEG with record command is not running. Starting now...\n"
         FFMPEGSTART=$(su - mona -c "cd /home/mona; /usr/bin/screen -dmS ffmpegcamera1 ffmpeg -rtsp_transport udp -i 'rtsp://admin:password@192.168.1.xxx:554/onvif1' -vcodec copy -c:a aac -map 0 -f segment -segment_time $(echo $SegmentTime) -segment_format mp4 -strftime 1 $(echo $RecordPathAndFind)%Y-%m-%d_%H-%M-%S.mp4")
    fi

    currenthourminutes=$(date +%M)
    if [ "$currenthourminutes" == "00" ]; then
       echo "Current Minute is 00. Checking for old files to delete.\n"
       FILESDELETECOMMAND=$(find $(echo $RecordPathAndFind) -maxdepth 1 -type f -mmin +$(echo $MinutesAfterDeleteOldFiles) -mtime -$(echo $DaysSecurityLimit) -name '*.mp4' -ls -exec rm {} \;)
    else
       echo "Current Minute is NOT 00. Skipping.\n"
    fi

    The script works fine, but I’m afraid of the life of the SD card in this device. I detected that ffmpeg is continuously writing the mp4 file (file size grows all the time). I think it would be better if ffmpeg waited for 1MiB before flushing it to disk.

    I tried different ffmpeg settings (adding "blocksize", "flush_packets", "reorder_queue_size" and few others I can’t recall now), unfortunately it didn’t change anything. The mp4 file size was increasing all the time (even by few KBs).

    The first question is : Should I be worried about the microSD card life when ffmpeg is all the time writing the file (current environment) ?

    The second question is : Are there any other ffmpeg optimization settings which I missed ?

    If my fears regarding the SD card life are correct, can you please recommend some other things which I could add to my script (or change in system) in order to increase the life of micro SD cards (or USB sticks) used for recording purposes ? I was thinking about using the ramdisk, and then manually move the files, however this could cause files loss in case of system reboot, hang, or power outage.