Recherche avancée

Médias (91)

Autres articles (68)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (2527)

  • ffmpeg multiple input video in grid and simultaneous audio

    13 février 2023, par Hnusny Pleb

    i would like to copy a video into n videos in one grid :
best example : https://www.youtube.com/watch?v=lYKDTLGH-TQ&ab_channel=TheRabbit_123

    


    This is my code, its working, but problem is, the audio seems to be like its played by one version.. I want the "echo" thats created by a lot of files like on the video above.

    


    def create_4_in_one(number):
shutil.copy("start.mp4", f"video.mp4")
for i in range(number):
    shutil.copy("video.mp4", f"temp_videa/{i}.mp4")
    subprocess.call(f'ffmpeg -y -i video.mp4 -vf "scale=iw/2:ih/2" -c:a copy video_half.mp4',
                  shell=True)
    subprocess.call(f'ffmpeg -y -i video_half.mp4 -i video_half.mp4 -i video_half.mp4 -i video_half.mp4 -filter_complex "[0:v][1:v]hstack[t];[2:v][3:v]hstack[b];[t][b]vstack[v]; [0:a][1:a][2:a][3:a]amerge=inputs=4[a]" -map "[v]" -map "[a]" -map 0:a -map 1:a -map 2:a -map 3:a -c:a aac -b:a 128k -ac 2 -shortest output.mp4',
                  shell=True)
    os.remove("video.mp4")
    os.remove("video_half.mp4")
    os.rename('output.mp4', 'video.mp4')

os.remove("video.mp4")


    


    Thanks in advance.

    


  • Using ffmpeg with C++ : Undefined symbols for architecture x86_64

    31 mars 2017, par JavaRunner

    I’m dealing with one example of FFMPEG called is "muxing.c".

    So I tried to compile that file with two Makefiles. The first one is for C-language :

    FFMPEG_LIBS=    libavdevice                        \
                   libavformat                        \
                   libavfilter                        \
                   libavcodec                         \
                   libswresample                      \
                   libswscale                         \
                   libavutil                          \

    CFLAGS := -Wall -g $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
    LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) -lm $(LDLIBS)

    SOURCES=        muxing                             \

    OBJS=$(addsuffix .o,$(SOURCES))

    all: $(OBJS) $(SOURCES)

    That makefile compiles well. But if I trying to move this code to C++ : I rename muxing.c to muxing.cpp and use this Makefile :

    CC=g++

    FFMPEG_LIBS=    libavdevice                        \
                   libavformat                        \
                   libavfilter                        \
                   libavcodec                         \
                   libswresample                      \
                   libswscale                         \
                   libavutil                          \

    CPPFLAGS := -Wall -g $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CPPFLAGS)
    LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) -lm $(LDLIBS)

    SOURCES=        muxing                             \

    OBJS=$(addsuffix .o,$(SOURCES))

    all: $(OBJS) $(SOURCES)

    I get a bunch of error like this :

    $ g++   muxing.o  -L/usr/local/Cellar/ffmpeg/3.2.4/lib -lavdevice -lavformat -lavfilter -lavcodec -lswresample -lswscale -lavutil  -lm -o muxing
    Undefined symbols for architecture x86_64:
     "av_dict_set(AVDictionary**, char const*, char const*, int)", referenced from:
         _main in muxing.o
     "av_strerror(int, char*, unsigned long)", referenced from:
         av_make_error_string(char*, unsigned long, int) in muxing.o
     "avio_closep(AVIOContext**)", referenced from:
         _main in muxing.o
     "swr_convert(SwrContext*, unsigned char**, int, unsigned char const**, int)", referenced from:
         write_audio_frame(AVFormatContext*, OutputStream*) in muxing.o
     "av_dict_copy(AVDictionary**, AVDictionary const*, int)", referenced from:
         open_video(AVFormatContext*, AVCodec*, OutputStream*, AVDictionary*) in muxing.o
         open_audio(AVFormatContext*, AVCodec*, OutputStream*, AVDictionary*) in muxing.o
     "av_dict_free(AVDictionary**)", referenced from:
         open_video(AVFormatContext*, AVCodec*, OutputStream*, AVDictionary*) in muxing.o
         open_audio(AVFormatContext*, AVCodec*, OutputStream*, AVDictionary*) in muxing.o
     "av_rescale_q(long long, AVRational, AVRational)", referenced from:
         write_audio_frame(AVFormatContext*, OutputStream*) in muxing.o
     "av_compare_ts(long long, AVRational, long long, AVRational)", referenced from:
         _main in muxing.o
         get_video_frame(OutputStream*) in muxing.o
         get_audio_frame(OutputStream*) in muxing.o

    Is that mean those libs are not ready to work with x64 ? I strongly need to mix that code (muxing.c) with my C++ code because I have to render a video on the fly using ImageMagick (my code was written with C++) for the frames.

    How can I mix C++ and C in this case ?

    My env is : OS X 10.12.3

  • call ffmepg from apache php without full path

    14 février 2015, par ffmpeg fan

    I need a apache /php to recognize ffmpeg command without specifing the full bath of /usr/local/bin/ffmpeg

    calling ffmpeg from command line executes the program
    calling ffmpeg from php via web does not execute the program
    calling /usr/local/bin/ffmpeg from php via web does execute the program

    why :
    a php script calls youtube-dl (a compiled program) and executes ffmpeg internally

    thank you in advance -
    tried ffmpeg path :
    which ffmpeg
    /usr/local/bin/ffmpeg

    echo $PATH
    /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin


    #php code for testing:
    $output = shell_exec('/usr/local/bin/ffmpeg 2>&1');
    echo "shell exec /usr/local/bin/ffmpeg <pre>$output</pre>";
    #Response:
    ffmpeg version 2.5.3 Copyright #(good)

    #Second php code for testing:
    $output = shell_exec('ffmpeg 2>&amp;1');
    echo "shell exec <pre>$output</pre>";
    #Response:
    sh: ffmpeg: command not found #(bad)