
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 (35)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
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 -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (4083)
-
libx264 encoder video plays too fast
23 avril 2014, par NickI’m trying to write a program that uses libx264 to encode the video frames. I’ve wrapped this code into a small class (see below). I have frames that are in YUV420 format. libx264 encodes the frames and I save them to a file. I can play the file back in VLC, all of the frames are there, but it plays back at several hundred times the actual frame rate. Currently I am capturing frames at 2.5 FPS, but they play back as if it was recorded at 250 or more FPS. I’ve tried to change the frame rate with no luck.
I’ve also tried to set
_param.b_vfr_input = 1
and then set the time bases appropriately, but that causes my program to crash. Any ideas ? My encode code is shown below. I’ve also included the output of ffprobe -show_frames
Wrapper Class :
x264wrapper::x264wrapper(int width, int height, int fps, int timeBaseNum, int timeBaseDen, int vfr)
{
x264_param_default_preset(&_param, "veryfast", "zerolatency");
_param.i_threads = 1;
_param.i_width = width;
_param.i_height = height;
_param.i_fps_num = fps;
_param.i_fps_den = 1;
// Intra refres:
_param.i_keyint_max = fps;
_param.b_intra_refresh = 1;
//Rate control:
_param.rc.i_rc_method = X264_RC_CRF;
//_param.rc.i_rc_method = X264_RC_CQP;
_param.rc.f_rf_constant = 25;
_param.rc.f_rf_constant_max = 35;
//For streaming:
_param.b_repeat_headers = 1;
_param.b_annexb = 1;
// misc
_param.b_vfr_input = vfr;
_param.i_timebase_num = timeBaseNum;
_param.i_timebase_den = timeBaseDen;
_param.i_log_level = X264_LOG_DEBUG;
_encoder = x264_encoder_open(&_param);
cout << "Timebase " << _param.i_timebase_num << "/" << _param.i_timebase_den << endl;
cout << "fps " << _param.i_fps_num << "/" << _param.i_fps_den << endl;
_ticks_per_frame = (int64_t)_param.i_timebase_den * _param.i_fps_den / _param.i_timebase_num / _param.i_fps_num;
cout << "ticks_per_frame " << _ticks_per_frame << endl;
int result = x264_picture_alloc(&_pic_in, X264_CSP_I420, width, height);
if (result != 0)
{
cout << "Failed to allocate picture" << endl;
throw(1);
}
_ofs = new ofstream("output.h264", ofstream::out | ofstream::binary);
_pts = 0;
}
x264wrapper::~x264wrapper(void)
{
_ofs->close();
}
void x264wrapper::encode(uint8_t * buf)
{
x264_nal_t* nals;
int i_nals;
convertFromBalserToX264(buf);
_pts += _ticks_per_frame;
_pic_in.i_pts = _pts;
x264_picture_t pic_out;
int frame_size = x264_encoder_encode(_encoder, &nals, &i_nals, &_pic_in, &pic_out);
if (frame_size >= 0)
{
_ofs->write((char*)nals[0].p_payload, frame_size);
}
else
{
cout << "error: x264_encoder_encode failed" << endl;
}
}Output of ffprobe -show_frames :
[FRAME]
media_type=video
key_frame=1
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=N/A
pkt_dts_time=N/A
pkt_duration=48000
pkt_duration_time=0.040000
pkt_pos=0
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
reference=0
[/FRAME]
[FRAME]
media_type=video
key_frame=0
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=N/A
pkt_dts_time=N/A
pkt_duration=N/A
pkt_duration_time=N/A
pkt_pos=54947
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
reference=0
[/FRAME]
[FRAME]
media_type=video
key_frame=0
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=N/A
pkt_dts_time=N/A
pkt_duration=N/A
pkt_duration_time=N/A
pkt_pos=57899
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=2
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
reference=0
[/FRAME] -
setting bit rates in creating video from images in ffmpeg not working
2 mai 2014, par mast kalandarI have a HQ video of one second
Some information of this video is as below
Dimensions : 1920 x 1080
Codec : H.264
Framerate : 30 frames per second
Size : 684.7 kB (6,84,673 bytes)
Bitrates : 5458 kbpsI have extracted frames from video
ffmpeg -i f1.mp4 f%d.jpg
All images are of 1920 x 1020 pixels by default 30 frames are generated (f7_1.jpg, f7_2.jpg,.....,f7_30.jpg)
I have added some texts and objects to these images (without changing dimensions of any image, all 30 images are still of 1920 x 1020 pixels)
Now I am trying to merge all these images to create single video (of 1 second)
I referred this official document, I have run below command
ffmpeg -f image2 -i f7_%d.jpg -r 30 -b:v 5458k foo_5458_2.mp4
Video created is also of one second, thing is its bit rates are higher then the original one. New video has 6091 kbps bit rates, while I expect are 5458 kbps only.
Because of higher bits, its gets finish very quickly compare to original video in video player.
Is there any thing I missing ??
And I don’t know what is exact meaning and job of
-f image2
option, when I run command without this option, I am getting same video. -
FFMPEG - convert video without losing resolution
20 février 2020, par SrhI am using ffmpeg to convert mp4 video from youtube. The video is HD 1080. When I convert it to mpeg2video, the video loses its sharpness, regardless of the
-s 1920x1080
parameter. How can I convert the video without losing picture sharpness ? The command I use is :ffmpeg -i BBB.mp4 -vcodec mpeg2video -s1920x1080 -acodec copy -f mpegts BBB.ts