Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (64)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

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

Sur d’autres sites (10861)

  • Add watermark in video with Google Cloud function python

    26 septembre 2020, par Dharmeshsharma

    I am adding watermark in uploaded video by http google cloud function but my code is return on ffmpeg non zero. my python code

    


    import os
from google.cloud import storage
from subprocess import check_output
from videoprops import get_video_properties


def hello_world(request):

client = storage.Client()
bucket = client.get_bucket('bucket_name')
request_json = request.get_json()
req_data = request.get_json()
name = req_data['file']
videofile_name = req_data['file_name']
os.makedirs('/tmp/'+os.path.dirname(name), exist_ok=True)
file_name = '/tmp/' + name
output_file_name = '/tmp/' + name.split('.')[0] + '_.'+name.split('.')[1]
print(output_file_name)
logo_path = '/temp/watermark.png'
logo_name = 'watermark.png'
print('logo found')

print(file_name)

try:
    os.remove(file_name)
except OSError:
    pass

try:
    os.remove(logo_path)
except OSError:
    pass

print("File has been removed")

# Downloading the video to the cloud functions
blob = bucket.get_blob(name)
blob.download_to_filename(file_name)

blob_logo = bucket.get_blob(logo_name)
blob_logo.download_to_filename(logo_path)

print("Video Downloaded")

props = get_video_properties(file_name)

if os.path.exists(file_name):
    print("NEW MP4 EXISTS")
    #   check_output('ffmpeg  -itsoffset -4  -i '+file_name+' -vcodec mjpeg -vframes 1 -an -f rawvideo -s '+str(props['width'])+'x'+str(props['height'])+' '+thumbnail_file_name, shell=True)
    #   thumbnail_blob = bucket.blob(os.path.dirname(name)+'/thumbnail.jpg')
    #   thumbnail_blob.upload_from_filename(thumbnail_file_name)
    # 19-7-2020
    check_output('ffmpeg  -i '+file_name+' -i '+logo_path +
                 ' -filter_complex overlay=10:10 -codec:a copy -preset ultrafast -async 1 '+output_file_name, shell=True)
    thumbnail_blob = bucket.blob(
        os.path.dirname(name) + '/'+videofile_name)
    thumbnail_blob.upload_from_filename(output_file_name)
    # -------------------------------------
else:
    print("MP4 not created")

print("uploaded")


    


    In this code accessing video add watermark also accessing from bucket and applying with ffmpeg and uploading.

    


    error is :-

    


    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError : Command 'ffmpeg -i /tmp/Upload/Video/1060/ad69ec74-49db-4fdb-b118-d23b9468a7b8.mp4 -i /temp/watermark.png -filter_complex overlay=10:10 -codec:a copy -preset ultrafast -async 1 /tmp/Upload/Video/1060/ad69ec74-49db-4fdb-b118-d23b9468a7b8_.mp4' returned non-zero exit status 1.

    


  • Add watermark-overlay with -filter_complex to multiple outputs (dash)

    13 juillet 2020, par Werner

    I'm creating a set of files for DASH (without audio) with :

    


    ffmpeg -i "input.mov"
 -y
 -keyint_min 100 -g 100
 -sc_threshold 0
 -c:v libx264
 -pix_fmt yuv420p
 -map v:0 -s:0 320x180 -b:v:0 681.125k -maxrate:0 681.125k -bufsize:0 340.5625k
 -map v:0 -s:1 640x360 -b:v:1 2724.5k -maxrate:1 2724.5k -bufsize:1 1362.25k
 -map v:0 -s:2 1280x720 -b:v:2 5449k -maxrate:2 5449k -bufsize:2 2724.5k
 -map v:0 -s:3 1920x1080 -b:v:3 10898k -maxrate:3 10898k -bufsize:3 5449k
 -init_seg_name "myname_$RepresentationID$.$ext$"
 -media_seg_name "myname_$RepresentationID$-$Number%05d$.$ext$"
 -use_template 1 -use_timeline 1
 -seg_duration 4 -adaptation_sets "id=0,streams=v"
 -f dash "myname.mpd"


    


    Now I want to add a watermark. How is it done ? I tried something like :

    


    ffmpeg -i "input.mov"
 -y
 -i "watermark.png" // Added
 -filter_complex "overlay=24:960" // Added
 -keyint_min 100 -g 100
 -sc_threshold 0
 -c:v libx264
 -pix_fmt yuv420p
 -map v:0 -s:0 320x180 -b:v:0 681.125k -maxrate:0 681.125k -bufsize:0 340.5625k
 -map v:0 -s:1 640x360 -b:v:1 2724.5k -maxrate:1 2724.5k -bufsize:1 1362.25k
 -map v:0 -s:2 1280x720 -b:v:2 5449k -maxrate:2 5449k -bufsize:2 2724.5k
 -map v:0 -s:3 1920x1080 -b:v:3 10898k -maxrate:3 10898k -bufsize:3 5449k
 -init_seg_name "myname_$RepresentationID$.$ext$"
 -media_seg_name "myname_$RepresentationID$-$Number%05d$.$ext$"
 -use_template 1 -use_timeline 1
 -seg_duration 4 -adaptation_sets "id=0,streams=v"
 -f dash "myname.mpd"


    


    But this results in only getting the 180p-Version of the video. How can I still get all versions of the video with the overlay ?

    


    Added :
I tried as well :

    


    ffmpeg -i "input.mov"
 -y
 -i "watermark.png"
 -filter_complex "[0:v][1:v]overlay=24:960[out0][out1][out2][out3]"
 -keyint_min 100 -g 100
 -sc_threshold 0
 -c:v libx264
 -pix_fmt yuv420p
 -map "[out0]" -s:0 320x180 -b:v:0 681.125k -maxrate:0 681.125k -bufsize:0 340.5625k
 -map "[out1]" -s:1 640x360 -b:v:1 2724.5k -maxrate:1 2724.5k -bufsize:1 1362.25k
 -map "[out2]" -s:2 1280x720 -b:v:2 5449k -maxrate:2 5449k -bufsize:2 2724.5k
 -map "[out3]" -s:3 1920x1080 -b:v:3 10898k -maxrate:3 10898k -bufsize:3 5449k
 -init_seg_name "myname_$RepresentationID$.$ext$"
 -media_seg_name "myname_$RepresentationID$-$Number%05d$.$ext$"
 -use_template 1 -use_timeline 1
 -seg_duration 4 -adaptation_sets "id=0,streams=v"
 -f dash "myname.mpd"


    


    which results in the error :
No output pad can be associated to link label 'out1'.

    


  • FFMPEG - Merge 2 Files (video_video), with TC and watermark

    11 juin 2020, par Felipe Silva

    I need to merge two video files, add a watermaker and a timecode burned in the video.

    



    I see this (by @llogan :)

    



    ffmpeg -i video.mp4 -i audio.mp3 -i watermark.png -filter_complex "[0:v:0]drawtext=fontfile=/usr/share/fonts/TTF/DejaVuSansMono.ttf:timecode='01\:23\:45\:00':r=25:x=(w-text_w)/2:y=h-text_h-20:fontsize=20:fontcolor=white:box=1:boxborderw=4:boxcolor=black[bg];[1][bg]overlay=W-w-10:H-h-12:format=auto[v]" -map "[v]" -map 1:a -shortest output.mp4


    



    But I can't apply for two videos, because of the map. Can someone help me, please ? My last attempt was :

    



    ffmpeg -i [video1] -i [video2] -i [image-overlay] -filter_complex "[0:v:0]drawtext=fontfile=/Windows/Fonts/arial.ttf: timecode='00\:00\:00\:00': r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=0xccFFFF@1: fontsize=85: box=1: boxcolor=0x000000@0.2[bg];concat=n=2:v=1:a=1[vv][a];[vv][2:v]overlay=0:0[v];[vv][bg]overlay=0:0" -map "[v]" -map "[a]" -c:v libx264 -b 2000k -preset fast -c:a aac [output file]