
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (102)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Organiser par catégorie
17 mai 2013, parDans 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 (...)
Sur d’autres sites (17138)
-
FFMPEG Streaming, using list for multiple presentations
3 janvier 2021, par JJ The SecondI am currently using a third party library to transcode videos from mp4 to HLS. https://video.aminyazdanpanah.com/python/start?r=hls#hls Great documentation and works fine however I have an issue by passing a list to hls.representations() that I think is something wrong I do. Here is how I run my code.


presetList = []
rep_1 = Representation(Size(1920,1080), Bitrate(4096 * 1024, 320 * 1024))
 presetList.append(rep_1)
rep_2 = Representation(Size(1440, 900), Bitrate(2048 * 1024, 320 * 1024))
 presetList.append(rep_2)

video = "file.mp4"
video = ffmpeg_streaming.input(video)
completed_destination = "completed.m3u8"
hls = video.hls(Formats.h264())
hls.representations(presetList)
hls.output(completed_destination)



When I run this I get following error, that is triggered by library meaning values in my list not passed properly ?


File "/var/www/transcoder/transcoder/env/lib/python3.8/site-packages/ffmpeg_streaming/_hls_helper.py", line 87, in stream_info
 f'BANDWIDTH={rep.bitrate.calc_overall}',
AttributeError: 'list' object has no attribute 'bitrate'



if I instead run the same code with only change as below, works like a charm :


hls.representations(rep_1, rep_2)



What am I doing wrong here ? Thanks


-
i have to list all images,backgrounds, layers etc inside my video as json file using ffmpeg
25 juin 2021, par Awele studioPlease tell me the ffmpeg cammand line code to get information of mp4 file in json format. i want details of video(in mp4) to json format. The details include images, layers , background, audio information etc just as shown in code below.(The output is show below i need input command line code).Thanks in advance


{ 
 "images":[
{
 "name":"img_0.jpg",
 "w":540,
 "h":960,
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
},
{
 "name":"img_1.jpg",
 "w":540,
 "h":960,
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
},
{
 "name":"img_2.jpg",
 "w":540,
 "h":960,
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
},
{
 "name":"img_3.jpg",
 "w":540,
 "h":960,
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
},
{
 "name":"img_4.jpg",
 "w":540,
 "h":960,
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
}
],
"static_inputs":[
{
 "name":"background_video.mp4",
 "prefix":[
 "-i"
 ],
 "postfix":[

 ]
}
],
 "video":{
"h":960,
"w":1080,
"duration":30
},
"e":[],
"m":[
"-{pythoncomplex}"
],
"r":["[5]split=2[color][alpha]; [color]crop=iw/2:ih:0:0[color]; [alpha]crop=iw/2:ih:iw/2:0[alpha]; 
[color][alpha]{pythonmerge}[ovrly]; [0]scale=540:960,setsar=1[0_scalled]; 
[1]scale=540:960,setsar=1[1_scalled]; [2]scale=540:960,setsar=1[2_scalled]; 
[3]scale=540:960,setsar=1[3_scalled]; [4]scale=540:960,setsar=1[4_scalled]; [0_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*5:s=540x960, 
{pythonf}=t=out:st=6:d=1[v0]; [1_scalled]{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001, 
{pythonz}-0.0015))':d=25*5:s=540x960,{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=6:d=1[v1]; 
[2_scalled]{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*7:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=8:d=1[v2]; [3_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*7:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=8:d=1[v3]; [4_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*6:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=7:d=1[v4]; [v0][v1][v2][v3] 
[v4]concat=n=5:v=1:a=0,format=yuv420p[concatenated_video]; [concatenated_video][ovrly] 
{pythono}=0:0[base_video]; [base_video][6] 
{pythono}=enable='between(t,0,15)':x=30:y=30[watermarked_part1]; [watermarked_part1][6] 
{pythono}=enable='between(t,15,30)':x=(main_w-{pythono}_w-30):y=(main_h-{pythono}_h-30)"],
"i":["[5]split=2[color][alpha]; [color]crop=iw/2:ih:0:0[color]; [alpha]crop=iw/2:ih:iw/2:0[alpha]; 
[color][alpha]{pythonmerge}[ovrly]; [0]scale=540:960,setsar=1[0_scalled]; 
[1]scale=540:960,setsar=1[1_scalled]; [2]scale=540:960,setsar=1[2_scalled]; 
[3]scale=540:960,setsar=1[3_scalled]; [4]scale=540:960,setsar=1[4_scalled]; [0_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*5:s=540x960, 
{pythonf}=t=out:st=6:d=1[v0]; [1_scalled]{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001, 
{pythonz}-0.0015))':d=25*5:s=540x960,{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=6:d=1[v1]; 
[2_scalled]{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*7:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=8:d=1[v2]; [3_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*7:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=8:d=1[v3]; [4_scalled] 
{pythonz}pan=z='if(lte({pythonz},1.0),1.1,max(1.001,{pythonz}-0.0015))':d=25*6:s=540x960, 
{pythonf}=t=in:st=0:d=1,{pythonf}=t=out:st=7:d=1[v4]; [v0][v1][v2][v3] 
[v4]concat=n=5:v=1:a=0,format=yuv420p[concatenated_video]; [concatenated_video][ovrly] 
{pythono}=0:0[base_video]; [base_video][6] 
{pythono}=enable='between(t,0,15)':x=30:y=30[watermarked_part1]; [watermarked_part1][6] 
{pythono}=enable='between(t,15,30)':x=(main_w-{pythono}_w-30):y=(main_h-{pythono}_h-30) 
[final_video]"],
"n":[],
"g":[],
"c":[],
"o":[
"-map",
"[final_video]",
"-map",
"7:a"
],
"d":[
"-t",
"30"
],
"s":[],
 "layers": [
{
 "ao": 0,
 "bm": 1,
 "ddd": 0,
 "ind": 1,
 "ip": 0,
 "ks": {
 "a": {
 "a": 0,
 "ix": 1,
 "k": [
 270,
 480,
 0
 ]
 },
 "o": {
 "a": 0,
 "ix": 11,
 "k": 18.039
 },
 "p": {
 "a": 0,
 "ix": 2,
 "k": [
 270,
 480,
 0
 ]
 },
 "r": {
 "a": 0,
 "ix": 10,
 "k": 0
 },
 "s": {
 "a": 0,
 "ix": 6,
 "k": [
 100,
 100,
 100
 ]
 }
 },
 "nm": "all",
 "op": 327,
 "refId": "image_0",
 "sr": 1,
 "st": 0,
 "ty": 2
},
{
 "ao": 0,
 "bm": 3,
 "ddd": 0,
 "ind": 2,
 "ip": 76,
 "ks": {
 "a": {
 "a": 0,
 "ix": 1,
 "k": [
 270,
 480,
 0
 ]
 },
 "o": {
 "a": 0,
 "ix": 11,
 "k": 40
 },
 "p": {
 "a": 0,
 "ix": 2,
 "k": [
 270,
 480,
 0
 ]
 },
 "r": {
 "a": 0,
 "ix": 10,
 "k": 0
 },
 "s": {
 "a": 0,
 "ix": 6,
 "k": [
 100,
 100,
 100
 ]
 }
 },
 "nm": "lvjing all 3",
 "op": 327,
 "refId": "image_1",
 "sr": 1,
 "st": -8,
 "ty": 2
},
{
 "ao": 0,
 "bm": 13,
 "ddd": 0,
 "ind": 3,
 "ip": 76,
 "ks": {
 "a": {
 "a": 0,
 "ix": 1,
 "k": [
 270,
 480,
 0
 ]
 },
 "o": {
 "a": 0,
 "ix": 11,
 "k": 50.196
 },
 "p": {
 "a": 0,
 "ix": 2,
 "k": [
 270,
 480,
 0
 ]
 },
 "r": {
 "a": 0,
 "ix": 10,
 "k": 0
 },
 "s": {
 "a": 0,
 "ix": 6,
 "k": [
 100,
 100,
 100
 ]
 }
 },
 "nm": "baohedu all 3",
 "op": 327,
 "refId": "image_2",
 "sr": 1,
 "st": -8,
 "ty": 2
}
]
}



-
Extract list of specific frames to numpy array with ffmpeg
20 janvier 2021, par linesdTo extract a list of specific frames to file I can use :


ffmpeg -i in.mp4 -vf select='eq(n\,100)+eq(n\,184)+eq(n\,213)' -vsync 0 frames%d.jpg



And to extract frames sequentially to numpy :


command = [ 'ffmpeg',
 '-i', 'input.mp4',
 '-f', 'image2pipe',
 '-pix_fmt', 'rgb24',
 '-vcodec', 'rawvideo', '-']

pipe = subprocess.Popen(command, stdout = subprocess.PIPE, bufsize=10**8)

raw_image = pipe.stdout.read(420*360*3) 

image = numpy.fromstring(raw_image, dtype='uint8') 

image = image.reshape((360,420,3))



Is it possible to combine these commands so that when I call
pipe.stdout.read(420*360*3)
the first time I get frame 100 and the second time frame 184 etc.

I have tried :


command = ['ffmpeg', 
 '-i', 'input.mp4', 
 'select=eq(n\,100)+eq(n\,184)+eq(n\,213)', 
 '-vsync', '0', '-f', 
 'image2pipe', '-pix_fmt', 
 'rgb24', '-vcodec', 
 'rawvideo', '-']



But I get the error :


[NULL @ 0x55718f7f6fc0] Unable to find a suitable output format for 'select=eq(n\,20)+eq(n\,100)+eq(n\,500)'
select=eq(n\,20)+eq(n\,100)+eq(n\,500): Invalid argument



Any ideas ?