
Recherche avancée
Autres articles (59)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (14125)
-
How can I encode a video to play on a DLink DSM-520 using FFMPEG ?
4 octobre 2015, par tolsen64I have been searching, testing, and coming up with nothing for over a week. I want to use FFMPEG to convert mp4’s and mkv’s to AVI files that will play on my DLink DSM-520. Mencoder will do it. The files that FFMPEG generates cause the player to lock up less than a minute into the video. First, here’s what I use to encode the file using Mencoder (scraped from the test.bat file that PocketDIVXEncoder generates :
mencoder.exe ftwd105.mp4 -af volnorm -srate 44100 -oac mp3lame -lameopts mode=0:cbr:br=128 -noodml -vf pp=ac,scale=720:404,crop=720:400,harddup -sws 9 -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:last_pred=2:vstrict=1:threads=2:vmax_b_frames=0:vbitrate=1200 -ffourcc XVID -o ftwd105_HDTV.avi
The output file plays perfectly on the DSM-520. Looking at the file using FFPROBE, I see this :
Input #0, avi, from 'ftwd105_HDTV.avi':
Metadata:
encoder : MEncoder Redxii-SVN-r37527-4.9.3 (x86_64)
Duration: 00:44:32.96, start: 0.000000, bitrate: 1193 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1053 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/sSo now I try the same thing with FFMPEG.
ffmpeg -i ftwd105.mp4 -vcodec mpeg4 -vtag XVID -b:v 1200k -s 720x400 -acodec libmp3lame -ab 128k -ar 44100 -ac 2 -f avi ftwd105_ffmpeg.avi
This file does not play on the media player. It plays choppy with only clicking for sound for about 15-30 seconds, then it freezes. Looking at it with FFPROBE, it looks exactly the same as the one created by Mencoder.
Input #0, avi, from 'ftwd105_ffmpeg.avi':
Metadata:
encoder : Lavf57.0.100
Duration: 00:44:33.14, start: 0.000000, bitrate: 1305 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1165 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/sSo now I encode the video using Xvid4PSP. It plays perfectly fine and FFPROBE shows this :
Input #0, avi, from 'ftwd105_ps2.avi':
Metadata:
encoder : VirtualDubMod 1.5.10.3 | www.virtualdub-fr.org || (build 2550/release)
Duration: 00:44:33.09, start: 0.000000, bitrate: 861 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 723 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/sIt’s using Advanced Simple Profile so I look this up and change my FFMPEG options :
ffmpeg -i ftwd105.mp4 -vcodec mpeg4 -vtag XVID -b:v 1200k -s 720x400 -profile:v 15 -level 0 -acodec libmp3lame -ab 128k -ar 44100 -ac 2 -f avi ftwd105_ffmpeg.avi
But though the output file looks the same using FFPROBE as the one made by Xvid4PSP, it still doesn’t play on the DSM-520.
Input #0, avi, from 'ftwd105_ffmpeg_asp.avi':
Metadata:
encoder : Lavf57.0.100
Duration: 00:44:33.14, start: 0.000000, bitrate: 1305 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1165 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/sSo now i’m at a loss. Is FFMPEG incapable of generating a file that the DSM-520 can play ? The reason I want to use FFMPEG over Mencoder is that it’s much faster. What takes FFMPEG 15 minutes takes Mencoder 40.
I should note that all the files created by FFMPEG play fine on the PC and on my Visio television. The DSM-520 is hooked up to a bedroom tv that isn’t a smart tv.
Edit : I also tried libxvid in place of mpeg4 with the same results.
-
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 !! -
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);