
Recherche avancée
Autres articles (17)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
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 (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (6268)
-
lavc/tiff : Convert DNGs to sRGB color space
29 août 2019, par Nick Renieris -
avcodec/extract_extradata : don't allocate more space than needed when removing NALUs...
9 mars 2018, par James Almer -
Stream video from mobile camera to ffmpeg with NDK
19 juillet 2013, par user2598307I need to create an application that captures video from a camera phone and send it to ffmpeg. Everything should be done only NDK level without SDK and Java
The phone can be Root
I am trying to open camera on my android device with this function "avformat_open_input()". I give this function a reference to device folder "/dev/msm_camera/" or "/dev/video0".
I try like this :
void Java_com_example_camera_MainActivity_testVideo(JNIEnv *env, jclass jc, jstring *filename)
{
av_register_all();
avcodec_register_all();
avformat_network_init();
AVFormatContext* context = avformat_alloc_context();
int video_stream_index,ret,i;
AVInputFormat *input_format = NULL;
const char formatName[] = "mpeg"; //for example mpeg
const jbyte *str;
str = (*env)->GetStringUTFChars(env, filename, NULL); //filename = "/dev/msm_camera"
input_format = av_find_input_format(formatName);
ret = avformat_open_input(&context, str, input_format, NULL);
if (ret < 0){
LOGE("Not open");
}else{
LOGI("camera was open");
}
if(avformat_find_stream_info(context,NULL) < 0){
LOGE("No stream");
}
for(i =0;inb_streams;i++){
if(context->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
video_stream_index = i;
}
AVPacket packet;
AVFrame *pFrame;
av_init_packet(&packet);
pFrame = avcodec_alloc_frame();
//open output file
AVOutputFormat* fmt = av_guess_format("avi", NULL, NULL);
AVFormatContext* outputContext = avformat_alloc_context();
outputContext->oformat = fmt;
avio_open2(&outputContext->pb, "/sdcard/test.avi", AVIO_FLAG_WRITE,NULL,NULL);
AVStream* stream=NULL;
AVFrame * frame;
frame = avcodec_alloc_frame();
int cnt = 0, frameDecoded;
//start reading packets from stream and write them to file
av_read_play(context);
while(av_read_frame(context,&packet)>=0 && cnt <300){ //Here function return -1
if(packet.stream_index == video_stream_index)
{//packet is video
if(stream == NULL){
//create stream in file
stream = avformat_new_stream(outputContext,context->streams[video_stream_index]->codec->codec);
avcodec_copy_context(stream->codec,context->streams[video_stream_index]->codec);
stream->sample_aspect_ratio = context->streams[video_stream_index]->codec->sample_aspect_ratio;
avformat_write_header(outputContext,NULL);
}
packet.stream_index = stream->id;
av_write_frame(outputContext,&packet);
cnt++;
}
av_free_packet(&packet);
av_init_packet(&packet);
}
av_read_pause(context);
av_write_trailer(outputContext);
avio_close(outputContext->pb);
avformat_free_context(outputContext);
}As I know, we cannot get access to camera because my program has not root permission. So how I can give my program root permission ? Or how I can go around this problem ?
I also tried to interact with the device driver using ioctl commands on C\C++, but I did not succeed because I have no experience and examples in Google.
Thank you !!!