
Recherche avancée
Autres articles (36)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (4438)
-
avformat/options : log filename on open
2 juin 2017, par Michael Niedermayeravformat/options : log filename on open
The loglevel is choosen so that the main filename and any images of
multi image sequences are shown only at debug level to avoid
clutter.This makes exploits in playlists more visible. As they would show
accesses to private/sensitive filesSigned-off-by : Michael Niedermayer <michael@niedermayer.cc>
-
Could not open file v_YoYo_g07_c04.jpeg av_interleaved_write_frame() : Input/output error
26 octobre 2017, par Josephthe purpose of the following code is to extract frames from a list of videos.
To do so l defined in python 3.5 extract_frames function which calls extract_frame function. In this latter a ffmpeg instruction is given to extract the framesdef extract_frames(vidlist,vidDir,outputDir):
f = open(vidlist, 'r')
vids = f.readlines()
f.close()
vids = [video.rstrip() for video in vids]
for vid in vids:
videoName = os.path.join(vidDir,vid.split('.')[0]+".avi")
frameName = os.path.join(outputDir, vid.split('.')[0]+".jpeg")
extract_frame(videoName,frameName)
extract_frames(trainlist01, ucf101_path,training_output)such that :
ucf101_path = "/local/common-data/UCF/UCF-101" # Path to the root dataset
trainlist01="/local/common-data/UCF/ucfTrainTestlist/trainlist01.txt"
training_output = '/local/common-data/UCF/tmp_frames/train/'where trainlist01.txt contains a set of lines as follow (first column the path to the video and the second is the class of the video) :
ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01.avi 1 .....
And videoname and framename correspond for instance to :
videoname="/local/common-data/UCF/UCF-101/YoYo/v_YoYo_g07_c04.avi"
framename="/local/common-data/UCF/tmp_frames/test/YoYo/v_YoYo_g07_c04.jpeg"The error is returned by the following function
import subprocess
def extract_frame(videoName,frameName):
if not os.path.exists(videoName):
print('%s does not exist!' % videoName)
return False
# call ffmpeg and grab its stderr output
p = subprocess.call('ffmpeg -i %s -r 1 -s qvga -t 1 -f image2 %s' % (videoName,frameName), shell=True)
return pThe error is :
[image2 @ 0x422ff80] Could not open file : /local/common-data/UCF/tmp_frames/train/YoYo/v_YoYo_g25_c05.jpeg
av_interleaved_write_frame() : Input/output errorand the output files training_output where l supposed to get my frames is empty.
files and folders ad subfolders have all right .
What’s wrong with my code ?
EDIT 1
After creating a subfolder YoYo/ in /local/common-data/UCF/tmp_frames/train/ and run again the code l got this new error :
Could not get frame filename number 2 from pattern '/local/common-data/UCF/tmp_frames/train/YoYo/v_YoYo_g25_c05.jpeg' (either set updatefirst or use a pattern like %03d within the filename pattern) av_interleaved_write_frame(): Invalid argument
-
How to copy a file open from open dialog to other location in vb.net
4 juillet 2017, par Silvia FonsecaI have start a new application that converts video to image and then image to gif
every thing is ok if i put my video in side of the same folder but if i not put my video in the same folder of the project the ffmpeg its says no such file or directory. wen i click to chose my file with openfiledialog , how can i copy or move my chose video to the correct directory in this case C :\avitogifconverterI have try to move the file to other location but wen i try to move the file to a different location its say i can not find the directory but the directory exist. what i have miss here this is the code
This is my code
Imports System.Diagnostics
Imports System.ComponentModel
Imports System
Imports System.IO
Imports System.IO.Compression
Imports System.Windows.Forms
Imports System.Net
Public Class Form1
Dim fpsx = 10
Dim video = ""
Dim startInfo As New ProcessStartInfo("ffmpeg.exe")
Dim frame As Long 'individual frames
Dim tempdir As String = "C:\avitogifconverter\" ' images temp directory
Dim DestPath As String = "C:\avitogifconverter\"
Public Declare Auto Function FindWindowNullClassName Lib "user32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
Dim Counter As Integer = 0
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
My.Computer.FileSystem.CreateDirectory(tempdir)
TextBox1.Text = "exp:-->video.avi or webm or flv"
TextBox1.Clear()
TextBox2.Text = fpsx
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
fpsx = TextBox2.Text
TextBox2.Text = fpsx
Dim p As Process = Process.Start("cmd", "/k ffmpeg.exe -i " + TextBox1.Text + " -framerate 5/1 -filter:v fps=" + TextBox2.Text + " C:\avitogifconverter\out%02d.jpg")
p.WaitForExit()
If p.HasExited Then
MsgBox("The Extraction Are Finish...")
End If
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If (OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK) Then
'TextBox1.Text = OpenFileDialog1.FileName
'TextBox1.Text = System.IO.Path.GetFileName(OpenFileDialog1.FileName)
TextBox1.Text = System.IO.Path.GetDirectoryName(OpenFileDialog1.FileName)
Dim newdialog As New OpenFileDialog()
If newdialog.ShowDialog() = DialogResult.OK Then
System.IO.File.Copy(newdialog.FileName, tempdir)
MessageBox.Show(System.IO.Path.GetDirectoryName(newdialog.FileName) & "\" & System.IO.Path.GetFileName(newdialog.FileName))
End If
End If
If TextBox1.Text = Nothing Then
Return
End If
If TextBox1.Text <> Nothing Then
'My.Computer.FileSystem.CopyFile(TextBox1.Text, DestPath)
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim args As String 'declare args
args = " -i C:\avitogifconverter\out%02d.jpg -r 10 C:\avitogifconverter\out.gif "
'args = " -i C:\avitogifconverter\out%02d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p C:\avitogifconverter\out.mp4 "
Dim proc As New Process
Dim proci As New ProcessStartInfo
proci.FileName = My.Application.Info.DirectoryPath & "\ffmpeg.exe"
proci.Arguments = args
proci.WindowStyle = ProcessWindowStyle.Hidden
proci.CreateNoWindow = True
proci.UseShellExecute = False
proc.StartInfo = proci
proc.Start()
Do Until proc.HasExited = True
Me.Text = "Saving"
Loop
Me.Text = "your video done"
MsgBox("Done")
Dim directoryName As String = "C:\avitogifconverter\"
For Each deleteFile In Directory.GetFiles(directoryName, "*.jpg", SearchOption.TopDirectoryOnly)
File.Delete(deleteFile)
Next
'IO.Directory.Delete(tempdir, True)
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Form2.Show()
End Sub
End Class