
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (45)
-
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6943)
-
Creating automated ffmpeg converter
27 janvier 2019, par Jeffrey MoserI am trying to create an automated process using ffmpeg and am having issues understanding how to adapt the code to automator.
The code works beautifully in the terminal, but requires each filename to me entered manually. I am trying to automate the process.
for f in "$@"
do
FILE= "$f"
OUT=${FILE/mp4/png}
OUT_WIDTH=10800
OUT_HEIGHT=3600
eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width "${FILE}")
IN_WIDTH=${streams_stream_0_width}
IN_HEIGHT=${streams_stream_0_height}
eval $(ffprobe -v error -of flat=s=_ -count_frames -select_streams v:0 -show_entries stream=nb_read_frames "${FILE}")
IN_FRAMES=${streams_stream_0_nb_read_frames}
W_TILES=$(bc <<< "(sqrt($OUT_WIDTH*$IN_FRAMES*$IN_HEIGHT/($IN_WIDTH*$OUT_HEIGHT))+3)")
H_TILES=$(bc <<< "(sqrt($OUT_HEIGHT*$IN_FRAMES*$IN_WIDTH/($OUT_WIDTH*$IN_HEIGHT)))")
W_SHRUNK=$(bc <<< "$OUT_WIDTH/$W_TILES")
H_SHRUNK=$(bc <<< "$OUT_HEIGHT/$H_TILES")
ffmpeg -i "${FILE}" -vf "hflip,transpose=cclock,scale=${H_SHRUNK}:${W_SHRUNK},tile=${H_TILES}x${W_TILES},transpose=clock,hflip,scale=${OUT_WIDTH}x${OUT_HEIGHT}" -an -sn -vsync 0 "${OUT}"
doneI expected the code to produce an image of every frame of the film. But instead I got a massive error message.
The action “Run Shell Script” encountered an error: “-: line 5: /Users/jeffreymoser/21 A New Dawn.mp4: Permission denied
-: line 14: ffprobe: command not found
-: line 18: ffprobe: command not found
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 2: parse error
-: line 29: ffmpeg: command not found
-: line 5: /Users/jeffreymoser/22 Battle Hymn.mp4: Permission denied
-: line 14: ffprobe: command not found
-: line 18: ffprobe: command not found
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 2: parse error
-: line 29: ffmpeg: command not found
-: line 5: /Users/jeffreymoser/23 Reckless.mp4: Permission denied
-: line 14: ffprobe: command not found
-: line 18: ffprobe: command not found
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 2: parse error
-: line 29: ffmpeg: command not found
-: line 5: /Users/jeffreymoser/24 Showdown.mp4: Permission denied
-: line 14: ffprobe: command not found
-: line 18: ffprobe: command not found
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 2: parse error
-: line 29: ffmpeg: command not found
-: line 5: /Users/jeffreymoser/25 Wedding Bells.mp4: Permission denied
-: line 14: ffprobe: command not found
-: line 18: ffprobe: command not found
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 2: parse error
-: line 29: ffmpeg: command not found -
RGB to x264 : Strange color render
16 janvier 2014, par Maypeuri’m trying to make a video from an OpenGl context.
I’m Using glReadPixel, to be sure RGB buffer data is Ok i save it into a bmp file, wich i can read correctly.
My .h264 video is encoded but there are some artefact and i don’t understand why.
I tried a lot of different parameters for the x264_param_t but anything better !Bitmap saved (OpenGL real data) : Bitmap from OpenGl (1mo)
Raw h264 with error : Raw h264 video (1mo)
OpenGl ReadPixel :
int nSize = ClientHeight * ClientWidth * 3;
GLubyte *inBuff = new GLubyte[nSize];
glReadBuffer(GL_FRONT);
glReadPixels(0, 0, ldwidth, ldheight, GL_BGR, GL_UNSIGNED_BYTE, inBuff);The params define :
x264_param_default(&mX264_param_t);
x264_param_default_preset(&mX264_param_t, "placebo", "film");
mX264_param_t.i_csp = X264_CSP_BGR;
mX264_param_t.i_threads = 6;
mX264_param_t.i_width = mWidth;
mX264_param_t.i_height = mHeight;
mX264_param_t.i_fps_num = mFps;
mX264_param_t.i_fps_den = 1;
// Intra refres:
mX264_param_t.i_keyint_max = mFps;
mX264_param_t.b_intra_refresh = 1;
//Rate control:
mX264_param_t.rc.i_rc_method = X264_RC_CRF;
mX264_param_t.rc.f_rf_constant = 25;
mX264_param_t.rc.f_rf_constant_max = 35;
int bps = 5000;
mX264_param_t.rc.i_bitrate = bps;
mX264_param_t.rc.i_vbv_max_bitrate = bps;
mX264_param_t.i_bframe = 2;
mX264_param_t.i_keyint_min = mFps / 4;
//For streaming:
mX264_param_t.b_repeat_headers = 1;
mX264_param_t.b_annexb = 1;
mX264_param_t.i_log_level = X264_LOG_DEBUG;
x264_param_apply_profile(&mX264_param_t, "baseline");
mpEncoder = x264_encoder_open(&mX264_param_t);
x264_encoder_parameters(mpEncoder, &mX264_param_t);
mpPictureOut = new x264_picture_t();
mpPictureIn = new x264_picture_t();
x264_picture_alloc(mpPictureIn, X264_CSP_BGR | X264_CSP_VFLIP, mWidth, mHeight);Then the encoding loop :
mpPictureIn->img.i_csp = X264_CSP_BGR;
mpPictureIn->img.i_plane = 1;
mpPictureIn->img.i_stride[0] = 3 * mWidth;
mpPictureIn->img.plane[0] = rgbframe;
mpPictureIn->i_pts = mFrameCount;
mpPictureIn->i_type = X264_TYPE_AUTO;
mpPictureOut->i_pts = mFrameCount;
int i_nals;
x264_nal_t* nals;
int frame_size = x264_encoder_encode(mpEncoder, &nals, &i_nals, mpPictureIn, mpPictureOut);
if(frame_size > 0)
{
mpFileOut->write_frame(nals[0].p_payload, frame_size, mpPictureOut);
mFrameCount++;
}The write frame :
int TVideoFileWriter::write_frame(uint8_t *p_nalu, int i_size, x264_picture_t *p_picture)
{
if(fwrite(p_nalu, i_size, 1, mFileHandle))
return i_size;
return -1;
} -
JPEG 2000 decoder for DCinema
22 avril 2013, par Nicolas BertrandJPEG 2000 decoder for DCinema