
Recherche avancée
Autres articles (103)
-
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 ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (14471)
-
OpenCV CUDA VideoReader RTSP video play UNSUPPORTED Format Issue
17 octobre 2018, par oktykrkI am trying to play an rtsp stream with OpenCV 3.4 built with CUDA 9.1 in C++. I have enabled FFMPEG flag while building OpenCV, however getting OpenCV error like :
OpenCV Error: Unsupported format or combination of formats (Unsupported video source) in cv::cudacodec::detail::FFmpegVideoSource::FFmpegVideoSource, file C:\opencv-3.4.0\modules\cudacodec\src\ffmpeg_video_source.cpp, line 110
here is the code :
const cv::String fname = "rtsp://admin:admin@192.168.2.46/media/video1";
cv::namedWindow("GPU", cv::WINDOW_NORMAL);
cv::cuda::GpuMat d_frame;
cv::Ptr d_reader = cv::cudacodec::createVideoReader(fname);
for (;;)
{
if (!d_reader->nextFrame(d_frame))
break;
cv::Mat frame;
d_frame.download(frame);
cv::imshow("GPU", frame);
if (cv::waitKey(3) > 0)
break;
}I can play the video with the same source with CPU but getting this error with
cudacodec
interfacecreateVideoReader
function.Getting the error below when debug.
Can anybody help with this. Thank you all.
-
Cannot play compressed video
23 mai 2017, par RaresI am trying to compress a video from gallery.
Steps :1)I open gallery.
2)Pick a video and get it’s path
3)Create new path for the output video
4)Compress the video using FFmpeg( the video is saved automatically)
Can you tell me why I can’t open the compressed video in my phone ? For example I run the code below and when I go in my phone to open the created file I get an error :
Cannot play video. Unsupported file type.
Here is an example : http://imgur.com/a/ePHzqI am compressing videos with size between 50-300MB.
String filePath = getRealPathFromURI(getApplicationContext(), data.getData());
///get the name of file without extension
StringBuilder stringBuilder = new StringBuilder(filePath);
int start = filePath.lastIndexOf('.');
stringBuilder.delete(start, filePath.length());
//--------------
//get file extension(e.g mp4)
File file = new File(filePath);
String contentType = getFileType(file.getAbsolutePath());
//--------------
//create compressed file path=initial file path+ _compressed+(random nr.)+ extension .mp4
Random random = new Random();
int fileNr = random.nextInt(999);
String compressedFilePath = stringBuilder.toString() + "_compressed" + fileNr +"."+ contentType;
//compress file from gallery and save it with the above name
String[] command = {"-y", "-i", filePath, "-s", "640x480", "-r", "25", "-vcodec",
"mpeg4", "-b:v", "150k", "-b:a", "48000", "-ac", "2", "-ar", "22050", compressedFilePath};
executeFFmpegBinary(command); -
Play H.264 camera streams using OpenCV
26 octobre 2018, par peter benceHow to play
H.264
camera streams usingOpenCV
? I was searching for a while but i didn’t find an answer. I thinkOpenCV
can encode and decodeh.264
videos since it usesffmpeg
and it is the documentation of the classVideoWriter
ensures that as shown in this example :#include <iostream> // for standard I/O
#include <string> // for strings
#include <opencv2></opencv2>core/core.hpp> // Basic OpenCV structures (cv::Mat)
#include <opencv2></opencv2>highgui/highgui.hpp> // Video write
using namespace std;
using namespace cv;
int main()
{
VideoWriter outputVideo; // For writing the video
int width = ...; // Declare width here
int height = ...; // Declare height here
Size S = Size(width, height); // Declare Size structure
// Open up the video for writing
const string filename = ...; // Declare name of file here
// Declare FourCC code
int fourcc = CV_FOURCC('H','2','6','4');
// Declare FPS here
int fps = ...;
outputVideo.open(filename, fourcc, fps, S);
// Put your processing code here
// ...
// Logic to write frames here... see below for more details
// ...
return 0;
}
</string></iostream>So can
OpenCV
encode-decodeh.264
stream as well ? if yes, please let me know how. thanks !!