
Recherche avancée
Autres articles (106)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)
Sur d’autres sites (12864)
-
Any video format to mp4 using ffmpeg in C#
8 juin 2015, par SangeethaI am converting any format videos to mp4 format in following way using FFMPEG in c# application,
string targetFilePath = Path.Combine(_file + @"\ffmpeg\", "ffmpeg.exe");
string ffmpegargs = "";
if (exten == "flv")
{
ffmpegargs = " -i " + inputFileName + " -acodec libmp3lame -ar " + samplingrate + " -ab " + bitrate + " -f flv -s " + size + " " + outputFileName;
}
else
{
ffmpegargs = " -i " + inputFileName + " " + outputFileName;
}
//string ffmpegargs = " -y -i " + inputFileName + " -b 2000k "+ outputFileName;
System.Diagnostics.Process pProcess = new Process();
pProcess.StartInfo.FileName = targetFilePath;
pProcess.StartInfo.UseShellExecute = false;
pProcess.StartInfo.RedirectStandardOutput = true;
pProcess.StartInfo.CreateNoWindow = true;
pProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
pProcess.StartInfo.Arguments = ffmpegargs;
pProcess.EnableRaisingEvents = true;
pProcess.Start();
pProcess.WaitForExit();
pProcess.Close();
pProcess.Dispose();
pProcess = null;It works fine when convert from flv file. But when convert an avi or f4v file, able to save mp4 format in temp file. But when try to identify the file in following way it throws avformatcontext return memory corruption error.
IntPtr pFormatContext;
FFmpeg.av_register_all();
int ret;
ret = FFmpeg.av_open_input_file(out pFormatContext, this.Filename, IntPtr.Zero, 0, IntPtr.Zero);
ret = FFmpeg.av_find_stream_info(pFormatContext);Throws memory corruption in the following line,
ret = FFmpeg.av_find_stream_info(pFormatContext) ;
What could be the reason, Or what is the mistake i am making here.
Regards
-
Anomalie #2374 (Fermé) : request url too long
17 octobre 2011, par Ben .la solution : define(’_CACHE_CONTEXTES_AJAX’,true) ; dans le mes_options.php duplicate #2123
-
How to slow down the ouput speed of ffmpeg while streaming to a RTMP server ?
25 avril 2023, par Loc Bui NhienI'm currently trying to process multipul short videos (each is about 0.5s long) to be stream on a RTMP server. However, the output/fps/speed when sending is too high (results printed here), making the server crashed very often.


Here is the the code and settings that I'm using :


import cv2
import ffmpeg
import av
import numpy as np
import os
import subprocess

url = "rtmp://..."
key = "..."
rtmp_url = url + "/" + key

cap = cv2.VideoCapture('traffic.mp4')

# gather video info to ffmpeg
fps = int(cap.get(cv2.CAP_PROP_FPS))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

# command and params for ffmpeg
command = ['ffmpeg',
 '-y',
 '-f', 'rawvideo',
 '-vcodec', 'rawvideo',
 '-pix_fmt', 'bgr24',
 '-s', "{}x{}".format(width, height),
 '-i', '-',
 '-r', '20',
 '-c:v', 'libx264',
 '-pix_fmt', 'yuv420p',
 '-preset', 'slow',
 '-f', 'flv',
 rtmp_url]

# using subprocess and pipe to fetch frame data
p = subprocess.Popen(command, stdin=subprocess.PIPE, shell=True)

received_video_path = 'ReceivedRecording'
while True:
 video_files = [filenames for filenames in sorted(os.listdir(received_video_path), reverse=True)]
 # Loop through the videos and concatenate them
 for filename in video_files[:len(video_files)-3]:
 video = cv2.VideoCapture(os.path.join(received_video_path,filename))

 # Loop through the frames of each video
 while True:
 ret, frame = video.read()
 if not ret:
 # End of video, move to next video
 video.release()
 break
 
 p.stdin.write(frame.tobytes())

 os.remove(os.path.join(received_video_path, filename))



The same settings work fine with the webcam, but I can not control the speed and fps of it sending to the server. The stream on the server seems to work fine with a steady 20fps as intended.