
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (98)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (11220)
-
ffmpeg record screen and save video file to disk as .mp4 or .mpg
5 janvier 2015, par musimbateI want to record the screen of my pc (using gdigrab on my windows machine) and store the saved video file on my disk as an mp4 or mpg file .I have found an example piece of code that grabs the screen and shows it in an SDL window here :http://xwk.iteye.com/blog/2125720 (The code is on the bottom of the page and has an english version) and the ffmpeg muxing example https://ffmpeg.org/doxygen/trunk/muxing_8c-source.html seems to be able to help encode audio and video into a desired output video file.
I have tried to combine these two by having a format context for grabbing the screen (AVFormatContext *pFormatCtx ; in my code ) and a separate format context to write the desired video file (AVFormatContext *outFormatContextEncoded ;).Within the loop to read packets from the input stream( screen grab stream) I directly encode write packets to the output file as shown in my code.I have kept the SDL code so I can see what I am recording.Below is my code with my modified write_video_frame() function .
The code builds OK but the output video can’t be played by vlc. When I run the command
ffmpeg -i filename.mpg
I get this output
[mpeg @ 003fed20] probed stream 0 failed
[mpeg @ 003fed20] Stream #0: not enough frames to estimate rate; consider increasing probesize
[mpeg @ 003fed20] Could not find codec parameters for stream 0 (Video: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
karamage.mpg: could not find codec parameters
Input #0, mpeg, from 'karamage.mpg':
Duration: 19:30:09.25, start: 37545.438756, bitrate: 2 kb/s
Stream #0:0[0x1e0]: Video: none, 90k tbr, 90k tbn
At least one output file must be specifiedAm I doing something wrong here ? I am new to ffmpeg and any guidance on this is highly appreciated.Thank you for your time.
int main(int argc, char* argv[])
{
AVFormatContext *pFormatCtx;
int i, videoindex;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
av_register_all();
avformat_network_init();
//Localy defined structure.
OutputStream outVideoStream = { 0 };
const char *filename;
AVOutputFormat *outFormatEncoded;
AVFormatContext *outFormatContextEncoded;
AVCodec *videoCodec;
filename="karamage.mpg";
int ret1;
int have_video = 0, have_audio = 0;
int encode_video = 0, encode_audio = 0;
AVDictionary *opt = NULL;
//ASSIGN STH TO THE FORMAT CONTEXT.
pFormatCtx = avformat_alloc_context();
//
//Use this when opening a local file.
//char filepath[]="src01_480x272_22.h265";
//avformat_open_input(&pFormatCtx,filepath,NULL,NULL)
//Register Device
avdevice_register_all();
//Use gdigrab
AVDictionary* options = NULL;
//Set some options
//grabbing frame rate
//av_dict_set(&options,"framerate","5",0);
//The distance from the left edge of the screen or desktop
//av_dict_set(&options,"offset_x","20",0);
//The distance from the top edge of the screen or desktop
//av_dict_set(&options,"offset_y","40",0);
//Video frame size. The default is to capture the full screen
//av_dict_set(&options,"video_size","640x480",0);
AVInputFormat *ifmt=av_find_input_format("gdigrab");
if(avformat_open_input(&pFormatCtx,"desktop",ifmt,&options)!=0){
printf("Couldn't open input stream.\n");
return -1;
}
if(avformat_find_stream_info(pFormatCtx,NULL)<0)
{
printf("Couldn't find stream information.\n");
return -1;
}
videoindex=-1;
for(i=0; inb_streams; i++)
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
{
videoindex=i;
break;
}
if(videoindex==-1)
{
printf("Didn't find a video stream.\n");
return -1;
}
pCodecCtx=pFormatCtx->streams[videoindex]->codec;
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL)
{
printf("Codec not found.\n");
return -1;
}
if(avcodec_open2(pCodecCtx, pCodec,NULL)<0)
{
printf("Could not open codec.\n");
return -1;
}
AVFrame *pFrame,*pFrameYUV;
pFrame=avcodec_alloc_frame();
pFrameYUV=avcodec_alloc_frame();
//PIX_FMT_YUV420P WHAT DOES THIS SAY ABOUT THE FORMAT??
uint8_t *out_buffer=(uint8_t *)av_malloc(avpicture_get_size(PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height));
avpicture_fill((AVPicture *)pFrameYUV, out_buffer, PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
//<<<<<<<<<<<-------PREP WORK TO WRITE ENCODED VIDEO FILES-----
avformat_alloc_output_context2(&outFormatContextEncoded, NULL, NULL, filename);
if (!outFormatContextEncoded) {
printf("Could not deduce output format from file extension: using MPEG.\n");
avformat_alloc_output_context2(&outFormatContextEncoded, NULL, "mpeg", filename);
}
if (!outFormatContextEncoded)
return 1;
outFormatEncoded=outFormatContextEncoded->oformat;
//THIS CREATES THE STREAMS(AUDIO AND VIDEO) ADDED TO OUR OUTPUT STREAM
if (outFormatEncoded->video_codec != AV_CODEC_ID_NONE) {
//YOUR VIDEO AND AUDIO PROPS ARE SET HERE.
add_stream(&outVideoStream, outFormatContextEncoded, &videoCodec, outFormatEncoded->video_codec);
have_video = 1;
encode_video = 1;
}
// Now that all the parameters are set, we can open the audio and
// video codecs and allocate the necessary encode buffers.
if (have_video)
open_video(outFormatContextEncoded, videoCodec, &outVideoStream, opt);
av_dump_format(outFormatContextEncoded, 0, filename, 1);
/* open the output file, if needed */
if (!(outFormatEncoded->flags & AVFMT_NOFILE)) {
ret1 = avio_open(&outFormatContextEncoded->pb, filename, AVIO_FLAG_WRITE);
if (ret1 < 0) {
//fprintf(stderr, "Could not open '%s': %s\n", filename,
// av_err2str(ret));
fprintf(stderr, "Could not open your dumb file.\n");
return 1;
}
}
/* Write the stream header, if any. */
ret1 = avformat_write_header(outFormatContextEncoded, &opt);
if (ret1 < 0) {
//fprintf(stderr, "Error occurred when opening output file: %s\n",
// av_err2str(ret));
fprintf(stderr, "Error occurred when opening output file\n");
return 1;
}
//<<<<<<<<<<<-------PREP WORK TO WRITE ENCODED VIDEO FILES-----
//SDL----------------------------
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
printf( "Could not initialize SDL - %s\n", SDL_GetError());
return -1;
}
int screen_w=640,screen_h=360;
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
//Half of the Desktop's width and height.
screen_w = vi->current_w/2;
screen_h = vi->current_h/2;
SDL_Surface *screen;
screen = SDL_SetVideoMode(screen_w, screen_h, 0,0);
if(!screen) {
printf("SDL: could not set video mode - exiting:%s\n",SDL_GetError());
return -1;
}
SDL_Overlay *bmp;
bmp = SDL_CreateYUVOverlay(pCodecCtx->width, pCodecCtx->height,SDL_YV12_OVERLAY, screen);
SDL_Rect rect;
//SDL End------------------------
int ret, got_picture;
AVPacket *packet=(AVPacket *)av_malloc(sizeof(AVPacket));
//TRY TO INIT THE PACKET HERE
av_init_packet(packet);
//Output Information-----------------------------
printf("File Information---------------------\n");
av_dump_format(pFormatCtx,0,NULL,0);
printf("-------------------------------------------------\n");
struct SwsContext *img_convert_ctx;
img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height, PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
//------------------------------
//
while(av_read_frame(pFormatCtx, packet)>=0)
{
if(packet->stream_index==videoindex)
{
//HERE WE DECODE THE PACKET INTO THE FRAME
ret = avcodec_decode_video2(pCodecCtx, pFrame, &got_picture, packet);
if(ret < 0)
{
printf("Decode Error.\n");
return -1;
}
if(got_picture)
{
//THIS IS WHERE WE DO STH WITH THE FRAME WE JUST GOT FROM THE STREAM
//FREE AREA--START
//IN HERE YOU CAN WORK WITH THE FRAME OF THE PACKET.
write_video_frame(outFormatContextEncoded, &outVideoStream,packet);
//FREE AREA--END
sws_scale(img_convert_ctx, (const uint8_t* const*)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameYUV->data, pFrameYUV->linesize);
SDL_LockYUVOverlay(bmp);
bmp->pixels[0]=pFrameYUV->data[0];
bmp->pixels[2]=pFrameYUV->data[1];
bmp->pixels[1]=pFrameYUV->data[2];
bmp->pitches[0]=pFrameYUV->linesize[0];
bmp->pitches[2]=pFrameYUV->linesize[1];
bmp->pitches[1]=pFrameYUV->linesize[2];
SDL_UnlockYUVOverlay(bmp);
rect.x = 0;
rect.y = 0;
rect.w = screen_w;
rect.h = screen_h;
SDL_DisplayYUVOverlay(bmp, &rect);
//Delay 40ms----WHY THIS DELAY????
SDL_Delay(40);
}
}
av_free_packet(packet);
}//THE LOOP TO PULL PACKETS FROM THE FORMAT CONTEXT ENDS HERE.
//AFTER THE WHILE LOOP WE DO SOME CLEANING
//av_read_pause(context);
av_write_trailer(outFormatContextEncoded);
close_stream(outFormatContextEncoded, &outVideoStream);
if (!(outFormatContextEncoded->flags & AVFMT_NOFILE))
/* Close the output file. */
avio_close(outFormatContextEncoded->pb);
/* free the stream */
avformat_free_context(outFormatContextEncoded);
//STOP DOING YOUR CLEANING
sws_freeContext(img_convert_ctx);
SDL_Quit();
av_free(out_buffer);
av_free(pFrameYUV);
avcodec_close(pCodecCtx);
avformat_close_input(&pFormatCtx);
return 0;
}
/*
* encode one video frame and send it to the muxer
* return 1 when encoding is finished, 0 otherwise
*/
static int write_video_frame(AVFormatContext *oc, OutputStream *ost,AVPacket * pkt11)
{
int ret;
AVCodecContext *c;
AVFrame *frame;
int got_packet = 0;
c = ost->st->codec;
//DO NOT NEED THIS FRAME.
//frame = get_video_frame(ost);
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
//IGNORE THIS FOR A MOMENT
/* a hack to avoid data copy with some raw video muxers */
AVPacket pkt;
av_init_packet(&pkt);
if (!frame)
return 1;
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index = ost->st->index;
pkt.data = (uint8_t *)frame;
pkt.size = sizeof(AVPicture);
pkt.pts = pkt.dts = frame->pts;
av_packet_rescale_ts(&pkt, c->time_base, ost->st->time_base);
ret = av_interleaved_write_frame(oc, &pkt);
} else {
ret = write_frame(oc, &c->time_base, ost->st, pkt11);
}
if (ret < 0) {
fprintf(stderr, "Error while writing video frame: %s\n");
exit(1);
}
return 1;
} -
make : *** [ffmpeg_g] Error 1
22 décembre 2014, par P C SAS3hi i am trying to install ffmpeg . i choose to do it from source because i am using a vps server so i did these steps i am using git command for getting source from github after compiling i got the below result
#cd ~/ffmpeg_sources
#git clone --depth 1 git://source.ffmpeg.org/ffmpeg
#cd ffmpeg
#PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
install prefix /root/ffmpeg_build
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
yasm yes
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AVX enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support yes
new filter support yes
network support yes
threading support pthreads
safe bitstream reader yes
SDL support no
opencl enabled no
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
External libraries:
iconv libopus libx264
libfdk_aac libvorbis zlib
libmp3lame libvpx
Enabled decoders:
aac bfi gsm
aac_latm bink gsm_ms
aasc binkaudio_dct h261
ac3 binkaudio_rdft h263
ac3_fixed bintext h263i
adpcm_4xm bmp h263p
adpcm_adx bmv_audio h264
adpcm_afc bmv_video hevc
adpcm_ct brender_pix hnm4_video
adpcm_dtk c93 huffyuv
adpcm_ea cavs iac
adpcm_ea_maxis_xa cdgraphics idcin
adpcm_ea_r1 cdxl idf
adpcm_ea_r2 cinepak iff_byterun1
adpcm_ea_r3 cljr iff_ilbm
adpcm_ea_xas cllc imc
adpcm_g722 comfortnoise indeo2
adpcm_g726 cook indeo3
adpcm_g726le cpia indeo4
adpcm_ima_amv cscd indeo5
adpcm_ima_apc cyuv interplay_dpcm
adpcm_ima_dk3 dca interplay_video
adpcm_ima_dk4 dfa jacosub
adpcm_ima_ea_eacs dirac jpeg2000
adpcm_ima_ea_sead dnxhd jpegls
adpcm_ima_iss dpx jv
adpcm_ima_oki dsd_lsbf kgv1
adpcm_ima_qt dsd_lsbf_planar kmvc
adpcm_ima_rad dsd_msbf lagarith
adpcm_ima_smjpeg dsd_msbf_planar libfdk_aac
adpcm_ima_wav dsicinaudio libopus
adpcm_ima_ws dsicinvideo libvorbis
adpcm_ms dvbsub libvpx_vp8
adpcm_sbpro_2 dvdsub libvpx_vp9
adpcm_sbpro_3 dvvideo loco
adpcm_sbpro_4 dxa mace3
adpcm_swf dxtory mace6
adpcm_thp eac3 mdec
adpcm_vima eacmv metasound
adpcm_xa eamad microdvd
adpcm_yamaha eatgq mimic
aic eatgv mjpeg
alac eatqi mjpegb
alias_pix eightbps mlp
als eightsvx_exp mmvideo
amrnb eightsvx_fib motionpixels
amrwb escape124 movtext
amv escape130 mp1
anm evrc mp1float
ansi exr mp2
ape ffv1 mp2float
apng ffvhuff mp3
ass ffwavesynth mp3adu
asv1 fic mp3adufloat
asv2 flac mp3float
atrac1 flashsv mp3on4
atrac3 flashsv2 mp3on4float
atrac3p flic mpc7
aura flv mpc8
aura2 fourxm mpeg1video
avrn fraps mpeg2video
avrp frwu mpeg4
avs g2m mpegvideo
avui g723_1 mpl2
ayuv g729 msa1
bethsoftvid gif msmpeg4v1
msmpeg4v2 qcelp twinvq
msmpeg4v3 qdm2 txd
msrle qdraw ulti
mss1 qpeg utvideo
mss2 qtrle v210
msvideo1 r10k v210x
mszh r210 v308
mts2 ra_144 v408
mvc1 ra_288 v410
mvc2 ralf vb
mxpeg rawvideo vble
nellymoser realtext vc1
nuv rl2 vc1image
on2avc roq vcr1
opus roq_dpcm vima
paf_audio rpza vmdaudio
paf_video rv10 vmdvideo
pam rv20 vmnc
pbm rv30 vorbis
pcm_alaw rv40 vp3
pcm_bluray s302m vp5
pcm_dvd sami vp6
pcm_f32be sanm vp6a
pcm_f32le sgi vp6f
pcm_f64be sgirle vp7
pcm_f64le shorten vp8
pcm_lxf sipr vp9
pcm_mulaw smackaud vplayer
pcm_s16be smacker vqa
pcm_s16be_planar smc wavpack
pcm_s16le smvjpeg webp
pcm_s16le_planar snow webvtt
pcm_s24be sol_dpcm wmalossless
pcm_s24daud sonic wmapro
pcm_s24le sp5x wmav1
pcm_s24le_planar srt wmav2
pcm_s32be ssa wmavoice
pcm_s32le stl wmv1
pcm_s32le_planar subrip wmv2
pcm_s8 subviewer wmv3
pcm_s8_planar subviewer1 wmv3image
pcm_u16be sunrast wnv1
pcm_u16le svq1 ws_snd1
pcm_u24be svq3 xan_dpcm
pcm_u24le tak xan_wc3
pcm_u32be targa xan_wc4
pcm_u32le targa_y216 xbin
pcm_u8 text xbm
pcm_zork theora xface
pcx thp xl
pgm tiertexseqvideo xsub
pgmyuv tiff xwd
pgssub tmv y41p
pictor truehd yop
pjs truemotion1 yuv4
png truemotion2 zero12v
ppm truespeech zerocodec
prores tscc zlib
prores_lgpl tscc2 zmbv
ptx tta
Enabled encoders:
a64multi libopus pgmyuv
a64multi5 libvorbis png
aac libvpx_vp8 ppm
ac3 libvpx_vp9 prores
ac3_fixed libx264 prores_aw
adpcm_adx libx264rgb prores_ks
adpcm_g722 ljpeg qtrle
adpcm_g726 mjpeg r10k
adpcm_ima_qt movtext r210
adpcm_ima_wav mp2 ra_144
adpcm_ms mp2fixed rawvideo
adpcm_swf mpeg1video roq
adpcm_yamaha mpeg2video roq_dpcm
alac mpeg4 rv10
alias_pix msmpeg4v2 rv20
amv msmpeg4v3 s302m
ass msvideo1 sgi
asv1 nellymoser snow
asv2 pam sonic
avrp pbm sonic_ls
avui pcm_alaw srt
ayuv pcm_f32be ssa
bmp pcm_f32le subrip
cinepak pcm_f64be sunrast
cljr pcm_f64le svq1
comfortnoise pcm_mulaw targa
dca pcm_s16be tiff
dnxhd pcm_s16be_planar tta
dpx pcm_s16le utvideo
dvbsub pcm_s16le_planar v210
dvdsub pcm_s24be v308
dvvideo pcm_s24daud v408
eac3 pcm_s24le v410
ffv1 pcm_s24le_planar vorbis
ffvhuff pcm_s32be wavpack
flac pcm_s32le webvtt
flashsv pcm_s32le_planar wmav1
flashsv2 pcm_s8 wmav2
flv pcm_s8_planar wmv1
g723_1 pcm_u16be wmv2
gif pcm_u16le xbm
h261 pcm_u24be xface
h263 pcm_u24le xsub
h263p pcm_u32be xwd
huffyuv pcm_u32le y41p
jpeg2000 pcm_u8 yuv4
jpegls pcx zlib
libfdk_aac pgm zmbv
libmp3lame
Enabled hwaccels:
Enabled parsers:
aac dvd_nav mpegvideo
aac_latm dvdsub opus
ac3 flac png
adx gsm pnm
bmp h261 rv30
cavsvideo h263 rv40
cook h264 tak
dca hevc vc1
dirac mjpeg vorbis
dnxhd mlp vp3
dpx mpeg4video vp8
dvbsub mpegaudio vp9
Enabled demuxers:
aac h261 mxg
ac3 h263 nc
act h264 nistsphere
adf hevc nsv
adp hls nut
adx hnm nuv
aea ico ogg
afc idcin oma
aiff idf paf
amr iff pcm_alaw
anm ilbc pcm_f32be
apc image2 pcm_f32le
ape image2_alias_pix pcm_f64be
apng image2_brender_pix pcm_f64le
aqtitle image2pipe pcm_mulaw
asf image_bmp_pipe pcm_s16be
ass image_dpx_pipe pcm_s16le
ast image_exr_pipe pcm_s24be
au image_j2k_pipe pcm_s24le
avi image_jpeg_pipe pcm_s32be
avr image_jpegls_pipe pcm_s32le
avs image_pictor_pipe pcm_s8
bethsoftvid image_png_pipe pcm_u16be
bfi image_sgi_pipe pcm_u16le
bink image_sunrast_pipe pcm_u24be
bintext image_tiff_pipe pcm_u24le
bit image_webp_pipe pcm_u32be
bmv ingenient pcm_u32le
boa ipmovie pcm_u8
brstm ircam pjs
c93 iss pmp
caf iv8 pva
cavsvideo ivf pvf
cdg jacosub qcp
cdxl jv r3d
cine latm rawvideo
concat live_flv realtext
data lmlm4 redspark
daud loas rl2
dfa lrc rm
dirac lvf roq
dnxhd lxf rpl
dsf m4v rsd
dsicin matroska rso
dts mgsts rtp
dtshd microdvd rtsp
dv mjpeg sami
dxa mlp sap
ea mlv sbg
ea_cdata mm sdp
eac3 mmf sdr2
epaf mov segafilm
ffm mp3 shorten
ffmetadata mpc siff
filmstrip mpc8 sln
flac mpegps smacker
flic mpegts smjpeg
flv mpegtsraw smush
fourxm mpegvideo sol
frm mpl2 sox
g722 mpsub spdif
g723_1 msnwc_tcp srt
g729 mtv stl
gif mv str
gsm mvi subviewer
gxf mxf subviewer1
sup vc1t webvtt
swf vivo wsaud
tak vmd wsvqa
tedcaptions vobsub wtv
thp voc wv
tiertexseq vplayer xa
tmv vqf xbin
truehd w64 xmv
tta wav xwma
tty wc3 yop
txd webm_dash_manifest yuv4mpegpipe
vc1
Enabled muxers:
a64 ipod pcm_s24le
ac3 ircam pcm_s32be
adts ismv pcm_s32le
adx ivf pcm_s8
aiff jacosub pcm_u16be
amr latm pcm_u16le
asf lrc pcm_u24be
asf_stream m4v pcm_u24le
ass matroska pcm_u32be
ast matroska_audio pcm_u32le
au md5 pcm_u8
avi microdvd psp
avm2 mjpeg rawvideo
bit mkvtimestamp_v2 rm
caf mlp roq
cavsvideo mmf rso
crc mov rtp
dash mp2 rtp_mpegts
data mp3 rtsp
daud mp4 sap
dirac mpeg1system segment
dnxhd mpeg1vcd smjpeg
dts mpeg1video smoothstreaming
dv mpeg2dvd sox
eac3 mpeg2svcd spdif
f4v mpeg2video spx
ffm mpeg2vob srt
ffmetadata mpegts stream_segment
filmstrip mpjpeg swf
flac mxf tee
flv mxf_d10 tg2
framecrc null tgp
framemd5 nut truehd
g722 oga uncodedframecrc
g723_1 ogg vc1
gif oma vc1t
gxf opus voc
h261 pcm_alaw w64
h263 pcm_f32be wav
h264 pcm_f32le webm
hds pcm_f64be webm_dash_manifest
hevc pcm_f64le webp
hls pcm_mulaw webvtt
ico pcm_s16be wtv
ilbc pcm_s16le wv
image2 pcm_s24be yuv4mpegpipe
image2pipe
Enabled protocols:
cache http rtmpt
concat httpproxy rtp
crypto icecast srtp
data md5 subfile
ffrtmphttp mmsh tcp
file mmst udp
ftp pipe udplite
gopher rtmp unix
hls
Enabled filters:
adelay dejudder pad
aecho delogo pan
aeval deshake perms
aevalsrc drawbox perspective
afade drawgrid phase
aformat earwax pixdesctest
ainterleave ebur128 pp
allpass edgedetect psnr
alphaextract elbg pullup
alphamerge equalizer removelogo
amerge extractplanes replaygain
amix fade rgbtestsrc
amovie field rotate
anull fieldmatch sab
anullsink fieldorder scale
anullsrc flanger select
apad format sendcmd
aperms fps separatefields
aphaser framepack setdar
aresample framestep setfield
aselect geq setpts
asendcmd gradfun setsar
asetnsamples haldclut settb
asetpts haldclutsrc showcqt
asetrate hflip showinfo
asettb highpass showspectrum
ashowinfo histeq showwaves
asplit histogram shuffleplanes
astats hqdn3d signalstats
astreamsync hqx silencedetect
atempo hue silenceremove
atrim idet sine
avectorscope il smartblur
bandpass interlace smptebars
bandreject interleave smptehdbars
bass join split
bbox kerndeint spp
biquad lenscorrection stereo3d
blackdetect life super2xsai
blackframe lowpass swapuv
blend lut telecine
boxblur lut3d testsrc
cellauto lutrgb thumbnail
channelmap lutyuv tile
channelsplit mandelbrot tinterlace
codecview mcdeint transpose
color mergeplanes treble
colorbalance movie trim
colorchannelmixer mp unsharp
colorlevels mpdecimate uspp
colormatrix mptestsrc vflip
compand negate vignette
concat noformat volume
copy noise volumedetect
crop null w3fdif
cropdetect nullsink xbr
curves nullsrc yadif
dctdnoiz overlay zoompan
decimate owdenoise
Enabled bsfs:
aac_adtstoasc imx_dump_header mp3_header_decompress
chomp mjpeg2jpeg noise
dump_extradata mjpega_dump_header remove_extradata
h264_mp4toannexb mov2textsub text2movsub
Enabled indevs:
dv1394 lavfi v4l2
fbdev oss
Enabled outdevs:
fbdev oss v4l2
License: nonfree and unredistributable
Creating config.mak, config.h, and doc/config.texi...
config.h is unchanged
config.asm is unchanged
libavutil/avconfig.h is unchangednow i am trying to run make command but getting the following error
make
POD doc/ffmpeg.pod
POD doc/ffprobe.pod
POD doc/ffserver.pod
POD doc/ffmpeg-all.pod
POD doc/ffprobe-all.pod
POD doc/ffserver-all.pod
MAN doc/ffmpeg.1
MAN doc/ffprobe.1
MAN doc/ffserver.1
MAN doc/ffmpeg-all.1
MAN doc/ffprobe-all.1
MAN doc/ffserver-all.1
LD ffmpeg_g
libavcodec/libavcodec.a(tiertexseqv.o): In function `seq_decode_op1':
/root/ffmpeg_sources/ffmpeg/libavcodec/tiertexseqv.c:111: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(xsubdec.o): In function `decode_frame':
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubdec.c:121: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(xsubenc.o): In function `put_xsub_rle':
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
/root/ffmpeg_sources/ffmpeg/libavcodec/xsubenc.c:45: undefined reference to `ff_log2_tab'
libavcodec/libavcodec.a(aacps.o):/root/ffmpeg_sources/ffmpeg/libavcodec/aacps.c:196: more undefined references to `ff_log2_tab' follow
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1can anyone help me for it . thank you in advance
-
Issue in CV_FOURCC('H', '2', '6', '4')
16 décembre 2014, par AshwinI am trying to use H264 encoding type for compressing the live streaming from Camera (which is supporting the H264 codec) am getting below -
[I am using OPENCV 3.0 beta version (latest)in windows 7 64 bit system .My camera is also supporting H264 codec (find more details below) ]
My ffmpeg code got built with h264 lib :
This build was compiled with the following external libraries :
x264 20140826-git-dd79a61 http://videolan.org/developers/x264.html**error :**
Frame size = 1280x720
Could not find encoder for codec id 28: Encoder not foundERROR: Failed to write the video
Press any key to continue . . .Below is my code :
int main(int argc, char *argv[])
{
// QApplication a(argc, argv);
VideoCapture cap(0); //capture webcam
if (!cap.isOpened()) //if not successful then exit
{
cout << "Cannot open webcam";
return -1;
}
namedWindow("Camera feed", 1); //create window
cap.set(3, 1280);
cap.set(4, 720);
double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH); //get width of frames of video
double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT); //get height of frames of video
Size frameSize(static_cast<int>(dWidth), static_cast<int>(dHeight));
cout << "Frame size = " << dWidth << "x" << dHeight << endl;
VideoWriter oVideoWriter("video.avi", CV_FOURCC('X', '2', '6', '4'), 30, frameSize);
if(!oVideoWriter.isOpened())
{
cout << "ERROR: Failed to write the video" << endl;
return -1;
}
while(1)
{
Mat frame;
bool bSuccess = cap.read(frame); //read a new frame from video
if(!bSuccess) //if unsuccessful, break loop
{
cout << "Cannot read frame from video file" << endl;
break;
}
oVideoWriter.write(frame); //write the frame into the file
imshow("Camera feed", frame); //show the frame in "Live Feed" window
cout << "Recording" << endl;
if (waitKey(30) == 27)
{
cout<< "Esc key is pressed by user" << endl;
break;
}
}
return 0;
}
</int></int>Here is the proof that my camera is supporting the H264 :
C:\Users>ffmpeg -f dshow -list_options true -i video="Logitech HD Pro Webcam C920"
ffmpeg version N-66116-g720c21d Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 22:09:48 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
[dshow @ 0000000002faf680] DirectShow video device options
[dshow @ 0000000002faf680] Pin "Capture"
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=2304x1296 fps=2 max s=2304x1296 fps=2
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=2304x1536 fps=2 max s=2304x1536 fps=2
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=2304x1296 fps=2 max s=2304x1296 fps=2
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=2304x1536 fps=2 max s=2304x1536 fps=2
[dshow @ 0000000002faf680] vcodec=mjpeg min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] Pin "Capture"
[dshow @ 0000000002faf680] vcodec=h264 min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1920x1080 fps=5 max s=1920x1080 fps=30
video=Logitech HD Pro Webcam C920: Immediate exit requested