
Recherche avancée
Autres articles (30)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa 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. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (6267)
-
ffmpeg-python trim why not concat
1er décembre 2020, par 李良全I want to split the video, do some logical processing, and finally merge it


import ffmpeg

info = ffmpeg.probe("test.mp4")
vs = next(c for c in info['streams'] if c['codec_type'] == 'video')
num_frames = vs['nb_frames']
arr = []
in_file = ffmpeg.input('test.mp4')

for i in range(int(int(num_frames) / 30) + 1):
 startTime = i * 30 + 1
 endTime = (1 + i) * 30
 if endTime >= int(num_frames):
 endTime = int(num_frames)
 # more more
 arr.append(in_file.trim(start_frame=startTime, end_frame=endTime))

(
 ffmpeg
 .concat(arr)
 .output('out.mp4')
 .run()
)



I don't understand why this is happening


TypeError: Expected incoming stream(s) to be of one of the following types: ffmpeg.nodes.FilterableStream; got <class>
</class>


-
Merge video files using Concat filter in FFmpeg
8 juillet 2013, par vijayI am using FFmpeg to concat video files of different codecs in my android application.
I read the FFmpeg documentation and tried the following things.1. ffmpeg -i "concat:input1.mpg|input2.mpg" -c copy output.mp4
(works only for mpg files)2. ffmpeg -i 1.mp4 -c copy -bsf dump_extra 1.ts
ffmpeg -i 2.mp4 -c copy -bsf dump_extra 2.ts
ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4 (works for mp4 files)I tried both the methods for 3gp files but it throws an error in stream filters.The second method stores the .ts files in device that should not be done and also i lost the quality of the video.
When i googled it out i found that FFmpeg provides a way to concat files with different codecs.So i tried the following command to this in a single step without storing files in device.
fmpeg -i 1.mp4 -i 2.3gp -i 3.mpg -filter_complex '[0:0] [0:1] [1:0] [1:1]
[2:0] [2:1] concat=n=3:v=1:a=1 [a] [v] ' -map '[a]' -map '[v]' -c copy output.mp4It throws the following exception :
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 25 2013 20:34:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration:
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
F.mp4: No such file or directory
tsk@tsk:~/Android/Backups/android-ffmpeg-x264/Project/jni$ ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex '[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' output.mp4
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 25 2013 20:34:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration:
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: mp41
creation_time : 1970-01-01 00:00:00
Duration: 00:00:04.04, start: 0.000000, bitrate: 1457 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1454 kb/s, SAR 349:320 DAR 349:240, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: mp41
creation_time : 1970-01-01 00:00:00
Duration: 00:00:04.04, start: 0.000000, bitrate: 1498 kb/s
Stream #1:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1495 kb/s, SAR 349:320 DAR 349:240, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream specifier ':1' in filtergraph description [0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a] matches no streams.I googled out but found no solution yet.
Any help is appreciated.
-
ffmpeg : check videos conformance for dash before concat
26 janvier 2018, par Massimo VantaggioI wrote a small bash file that reads a folder, generates a playlist, concatenates, adds a logo and encode the big video result for dash ready, i would like to implement it by checking before all videos conformance : if they have same fps, same resolution, same time base etc.
Below my situation :#!/bin/bash
# CONCAT DEMUXER
#This demuxer reads a list of #files and other directives from a text file and demuxes them one after the other, as if #all their packets had been muxed together. All files must have the same streams (same #codecs, same time base, etc.) but can be wrapped in different container formats.
printf "file '%s'\n" *.mp4 > playlist.txt
ffmpeg -auto_convert 1 -f concat -safe 0 -i playlist.txt -c:a aac -b:a 384k -ar 48000 -ac 2 -async 1 -vsync 1 -c:v libx264 -x264opts 'keyint=50:min-keyint=50:no-scenecut' -r 25 -b:v 2400k -maxrate 2400k -bufsize 1200k -vf "scale=-1:432" -vf "movie=stable.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" out.mp4
clear
echo “VIDEO CONCAT COMPLETED”For example below i find this bash that calculate the total duration in second of the videos of the folder, unfortunately I’m unable to put the result into variable.. I’m newbie of bash.
times=()
for f in *.ts; do
_t=$(ffmpeg -i "$f" 2>&1 | grep "Duration" | grep -o " [0-9:.]*, " | head -n1 | tr ',' ' ' | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')
times+=("$_t")
done
echo "${times[@]}" | sed 's/ /+/g' | bcI wish to check if the videos have the same fps, and same resolution before process, and to get into variable this duration.
Thanks
Massimo