
Recherche avancée
Médias (9)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (94)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
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 (11015)
-
Decoding Video using FFMpeg for android
29 novembre 2014, par Rahul UpadhyayI tried to decode video using FFMpeg library from the sample examples available on internet, i figure it out with new version of ffmpeg,
here is the code which I called from my class file,private static native int decodeVideo(String filename);
decodeVideo(getString(R.string._sdcard_abc_3gp));now in .c file located in JNI dir,I wrote this code,
jint Java_ru_dzakhov_ffmpeg_test_MainActivity_decodeVideo(JNIEnv* env, jobject
javaThis,jstring filename) {
AVFormatContext *pFormatCtx;
int i, videoStream;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;
// Register all formats and codecs
av_register_all();
// Open video file
const jbyte *str;
str = (*env)->GetStringUTFChars(env, filename, NULL);
if(av_open_input_file(&pFormatCtx, str, NULL, 0, NULL)!=0)
{
LOGI("Can't open file '%s'\n", str);
return 1;
}
else
{
LOGI("File is opened\n");
LOGI("File '%s', Codec %s",pFormatCtx->filename,pFormatCtx->iformat->name);
}
// Dump information about file onto standard error
LOGI("dump_format");
dump_format(pFormatCtx, 0, filename, 0);
LOGI("dump_format DONE");
// Find the first video stream
videoStream=-1;
for(i=0; inb_streams; i++)
if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
//if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
{
LOGI("videoStream:: %d",videoStream);
videoStream=i;
break;
}
if(videoStream==-1)
return -1; // Didn't find a video stream
// Get a pointer to the codec context for the video stream
pCodecCtx=pFormatCtx->streams[videoStream]->codec;
// Find the decoder for the video stream
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL) {
fprintf(stderr, "Unsupported codec!\n");
LOGI("Unsupported codec!\n");
return -1; // Codec not found
}
// Open codec
if(avcodec_open(pCodecCtx, pCodec)<0){
LOGI("Codec Opened!\n");
return -1; // Could not open codec
}
// Allocate video frame
pFrame=avcodec_alloc_frame();
// Allocate an AVFrame structure
pFrameRGB=avcodec_alloc_frame();
if(pFrameRGB==NULL){
LOGI("checking --->>> pFrameRGB==NULL\n");
return -1;
}
// Determine required buffer size and allocate buffer
LOGI("Determine required buffer size and allocate buffer\n");
numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
pCodecCtx->height);
LOGI("numBytes %d",numBytes);
buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
// Assign appropriate parts of buffer to image planes in pFrameRGB
// Note that pFrameRGB is an AVFrame, but AVFrame is a superset
// of AVPicture
avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
pCodecCtx->width, pCodecCtx->height);
// Read frames and save first five frames to disk
i=0;
while(av_read_frame(pFormatCtx, &packet)>=0) {
// Is this a packet from the video stream?
if(packet.stream_index==videoStream) {
// Decode video frame
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished,&packet);
//packet.data, packet.size);
// Did we get a video frame?
if(frameFinished) {
// Convert the image from its native format to RGB
/*Temporarily down
*
* img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
(AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height);*/
// Save the frame to phone memory
LOGI("Saving Frame\n");
SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, ++i);
LOGI("After Saving Frame\n");
}
}
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
}
// Free the RGB image
av_free(buffer);
av_free(pFrameRGB);
// Free the YUV frame
av_free(pFrame);
// Close the codec
avcodec_close(pCodecCtx);
// Close the video file
av_close_input_file(pFormatCtx);
return 0;
}after compiling the code i get this in log,
07-04 10:58:38.961: D/dalvikvm(1010): Trying to load lib /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878
07-04 10:58:38.971: D/dalvikvm(1010): Added shared lib /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878
07-04 10:58:38.971: D/dalvikvm(1010): No JNI_OnLoad found in /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so 0x4051e878, skipping init
07-04 10:58:39.011: I/System.out(1010): Creating Engine
07-04 10:58:39.011: I/mylib(1010): initiated
07-04 10:58:39.011: I/System.out(1010): Decoding Video
07-04 10:58:39.011: I/System.out(1010): passing video::/sdcard/NativeMedia.ts
07-04 10:58:39.101: W/dalvikvm(231): disableGcForExternalAlloc: false
07-04 10:58:39.121: I/DEBUG(71): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-04 10:58:39.121: I/DEBUG(71): Build fingerprint: 'htc_asia_india/htc_icong/icong:2.3.3/GRI40/68450.5:user/release-keys'
07-04 10:58:39.121: I/DEBUG(71): pid: 1010, tid: 1010 >>> ru.dzakhov.ffmpeg.test <<<
07-04 10:58:39.121: I/DEBUG(71): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8102de90
07-04 10:58:39.121: I/DEBUG(71): r0 0000ac28 r1 40521b98 r2 40526340 r3 42157cc8
07-04 10:58:39.121: I/DEBUG(71): r4 bee7d368 r5 00000004 r6 40521b98 r7 42157c88
07-04 10:58:39.121: I/DEBUG(71): r8 bee7d348 r9 42157c80 10 42157c6c fp 42f0f04c
07-04 10:58:39.121: I/DEBUG(71): ip 8102de91 sp bee7d348 lr 80018378 pc 8102de90 cpsr a0000030
07-04 10:58:39.121: I/DEBUG(71): d0 4140000041600000 d1 3ff0000041680000
07-04 10:58:39.121: I/DEBUG(71): d2 bf80000000000000 d3 0000000000000000
07-04 10:58:39.121: I/DEBUG(71): d4 0000000000000000 d5 3ff000003f800000
07-04 10:58:39.121: I/DEBUG(71): d6 bff000003f800000 d7 4160000000000000
07-04 10:58:39.121: I/DEBUG(71): d8 0000000000000000 d9 0000000000000000
07-04 10:58:39.121: I/DEBUG(71): d10 0000000000000000 d11 0000000000000000
07-04 10:58:39.121: I/DEBUG(71): d12 0000000000000000 d13 0000000000000000
07-04 10:58:39.121: I/DEBUG(71): d14 0000000000000000 d15 0000000000000000
07-04 10:58:39.121: I/DEBUG(71): scr 20000012
07-04 10:58:39.221: I/DEBUG(71): #00 pc 0002de90 /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
07-04 10:58:39.221: I/DEBUG(71): #01 pc 0004f13c /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #02 pc 0001d584 /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #03 pc 00022b8c /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #04 pc 00021a80 /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #05 pc 0006060a /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #06 pc 0006828e /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #07 pc 0001d584 /system/lib/libdvm.so
07-04 10:58:39.221: I/DEBUG(71): #08 pc 00022b8c /system/lib/libdvm.so
07-04 10:58:39.231: I/DEBUG(71): #09 pc 00021a80 /system/lib/libdvm.so
07-04 10:58:39.231: I/DEBUG(71): #10 pc 0006045c /system/lib/libdvm.so
07-04 10:58:39.231: I/DEBUG(71): #11 pc 0004c430 /system/lib/libdvm.so
07-04 10:58:39.231: I/DEBUG(71): #12 pc 00037638 /system/lib/libandroid_runtime.so
07-04 10:58:39.231: I/DEBUG(71): #13 pc 00038456 /system/lib/libandroid_runtime.so
07-04 10:58:39.231: I/DEBUG(71): #14 pc 00008ca2 /system/bin/app_process
07-04 10:58:39.231: I/DEBUG(71): #15 pc 00014f24 /system/lib/libc.so
07-04 10:58:39.231: I/DEBUG(71): code around pc:
07-04 10:58:39.231: I/DEBUG(71): 8102de70 003d9cd0 00000408 0029e598 0029e5de
07-04 10:58:39.231: I/DEBUG(71): 8102de80 0029e5d8 0029e5d8 0029e5cc 0029e5c8
07-04 10:58:39.231: I/DEBUG(71): 8102de90 4ff0e92d b0994604 f0004615 6823f945
07-04 10:58:39.231: I/DEBUG(71): 8102dea0 46294620 32a4f8d3 47982200 46044f81
07-04 10:58:39.231: I/DEBUG(71): 8102deb0 a8172300 22004621 9300447f f9c0f060
07-04 10:58:39.231: I/DEBUG(71): code around lr:
07-04 10:58:39.231: I/DEBUG(71): 80018358 3497c004 3488c004 3afffff9 e2888004
07-04 10:58:39.231: I/DEBUG(71): 80018368 eafffff9 e899000c e594c008 e12fff3c
07-04 10:58:39.231: I/DEBUG(71): 80018378 e3550000 1594c00c 188c0003 e914a3f0
07-04 10:58:39.231: I/DEBUG(71): 80018388 e1a05e22 e5946004 e3a02000 e4d6c001
07-04 10:58:39.231: I/DEBUG(71): 80018398 e35c0000 0a000007 e2822001 e35c0044
07-04 10:58:39.231: I/DEBUG(71): stack:
07-04 10:58:39.231: I/DEBUG(71): bee7d308 000001b4
07-04 10:58:39.231: I/DEBUG(71): bee7d30c c0000000
07-04 10:58:39.231: I/DEBUG(71): bee7d310 80018540 /system/lib/libdvm.so
07-04 10:58:39.231: I/DEBUG(71): bee7d314 0000cf98
07-04 10:58:39.231: I/DEBUG(71): bee7d318 42157c6c
07-04 10:58:39.231: I/DEBUG(71): bee7d31c afd139d9 /system/lib/libc.so
07-04 10:58:39.231: I/DEBUG(71): bee7d320 0002de91
07-04 10:58:39.241: I/DEBUG(71): bee7d324 0000000e
07-04 10:58:39.241: I/DEBUG(71): bee7d328 80018540 /system/lib/libdvm.so
07-04 10:58:39.241: I/DEBUG(71): bee7d32c 00000070
07-04 10:58:39.241: I/DEBUG(71): bee7d330 42157c6c
07-04 10:58:39.241: I/DEBUG(71): bee7d334 00238100
07-04 10:58:39.241: I/DEBUG(71): bee7d338 00000000
07-04 10:58:39.241: I/DEBUG(71): bee7d33c 00000000
07-04 10:58:39.241: I/DEBUG(71): bee7d340 df002777
07-04 10:58:39.241: I/DEBUG(71): bee7d344 e3a070ad
07-04 10:58:39.241: I/DEBUG(71): #00 bee7d348 423692b4
07-04 10:58:39.241: I/DEBUG(71): bee7d34c 0000cf98
07-04 10:58:39.241: I/DEBUG(71): bee7d350 40521b98
07-04 10:58:39.241: I/DEBUG(71): bee7d354 8102de91 /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
07-04 10:58:39.241: I/DEBUG(71): bee7d358 80018540 /system/lib/libdvm.so
07-04 10:58:39.241: I/DEBUG(71): bee7d35c 0000cf98
07-04 10:58:39.241: I/DEBUG(71): bee7d360 bee7d368
07-04 10:58:39.241: I/DEBUG(71): bee7d364 800499df /system/lib/libdvm.so
07-04 10:58:39.241: I/DEBUG(71): bee7d368 42157c80
07-04 10:58:39.241: I/DEBUG(71): bee7d36c 42d58795
07-04 10:58:39.241: I/DEBUG(71): bee7d370 8102de91 /data/data/ru.dzakhov.ffmpeg.test/lib/libmylib.so
07-04 10:58:39.241: I/DEBUG(71): bee7d374 bee7d418
07-04 10:58:39.241: I/DEBUG(71): bee7d378 00016de0
07-04 10:58:39.241: I/DEBUG(71): bee7d37c 0000ac28
07-04 10:58:39.241: I/DEBUG(71): bee7d380 00000001
07-04 10:58:39.241: I/DEBUG(71): bee7d384 bee7d418
07-04 10:58:39.241: I/DEBUG(71): bee7d388 42157c80
07-04 10:58:39.241: I/DEBUG(71): bee7d38c 40521b98
07-04 10:58:39.241: I/DEBUG(71): bee7d390 423692b4
07-04 10:58:39.241: I/DEBUG(71): bee7d394 800499a1 /system/lib/libdvm.so
07-04 10:58:39.241: I/DEBUG(71): bee7d398 42157c80
07-04 10:58:39.241: I/DEBUG(71): bee7d39c 8004f13f /system/lib/libdvm.so
07-04 10:58:39.241: I/DEBUG(71): #01 bee7d3a0 00000002
07-04 10:58:39.251: I/DEBUG(71): bee7d3a4 0000000e
07-04 10:58:39.251: I/DEBUG(71): bee7d3a8 bee7d418
07-04 10:58:39.251: I/DEBUG(71): bee7d3ac 0000cf98
07-04 10:58:39.251: I/DEBUG(71): bee7d3b0 400198b8
07-04 10:58:39.251: I/DEBUG(71): bee7d3b4 42d5861c
07-04 10:58:39.251: I/DEBUG(71): bee7d3b8 42157c98
07-04 10:58:39.251: I/DEBUG(71): bee7d3bc bee7d410
07-04 10:58:39.251: I/DEBUG(71): bee7d3c0 40521b98
07-04 10:58:39.251: I/DEBUG(71): bee7d3c4 8001d588 /system/lib/libdvm.soUnable to understand what’s exact problem is there ?
Here SaveFrame function is used it looks like,void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
FILE *pFile;
char szFilename[32];
int y;
// Open file
LOGI("Opening file!");
sprintf(szFilename, "frame%d.ppm", iFrame);
pFile=fopen(szFilename, "wb");
if(pFile==NULL)
return;
// Write header
fprintf(pFile, "P6\n%d %d\n255\n", width, height);
//LOGI("width::"+width+"Height::"+height);
// Write pixel data
for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);
}
// Close file
fclose(pFile);
}in log I didn’t get any Log which i placed in the code !
Please help me out,
Thanks
-
How can I check whether an RTMP live stream is working on the server side ?
10 juin 2015, par MoyersyI have a site where users can broadcast their own live streams. They are provided with a URL to push their stream to over RTMP. Viewers have an embedded flash player to watch each stream.
I need to be able to determine whether a particular stream is broadcasting. It doesn’t need to do any analysis, simply to check that there’s an actual stream at the RTMP URL.
It seems that VLC doesn’t support RMTP.
I’ve tried ffmpeg but not managed to solve the problem yet.Server is running Ubuntu.
Bonus : How can I update the database based on the results of this stream test ?
-
Adjusting The Timetable and SQL Shame
My Game Music Appreciation website has a big problem that many visitors quickly notice and comment upon. The problem looks like this :
The problem is that all of these songs are 2m30s in length. During the initial import process, unless a chiptune file already had curated length metadata attached, my metadata utility emitted a default play length of 150 seconds. This is not good if you want to listen to all the songs in a soundtrack without interacting with the player page, but have various short songs (think “game over” or other quick jingles) that are over in a few seconds. Such songs still pad out 150 seconds of silence.
So I needed to correct this. Possible solutions :
- Manually : At first, I figured I could ask the database which songs needed fixing and listen to them to determine the proper lengths. Then I realized that there were well over 1400 games affected by this problem. This just screams “automated solution”.
- Automatically : Ask the database which songs need fixing and then somehow ask the computer to listen to the songs and decide their proper lengths. This sounds like a winner, provided that I can figure out how to programmatically determine if a song has “finished”.
SQL Shame
This play adjustment task has been on my plate for a long time. A key factor that has blocked me is that I couldn’t figure out a single SQL query to feed to the SQLite database underlying the site which would give me all the songs I needed. To be clear, it was very simple and obvious to me how to write a program that would query the database in phases to get all the information. However, I felt that it would be impure to proceed with the task unless I could figure out one giant query to get all the information.This always seems to come up whenever I start interacting with a database in any serious way. I call it SQL shame. This task got some traction when I got over this nagging doubt and told myself that there’s nothing wrong with the multi-step query program if it solves the problem at hand.
Suddenly, I had a flash of inspiration about why the so-called NoSQL movement exists. Maybe there are a lot more people who don’t like trying to derive such long queries and are happy to allow other languages to pick up the slack.
Estimating Lengths
Anyway, my solution involved writing a Python script to iterate through all the games whose metadata was output by a certain engine (the one that makes the default play length 150 seconds). For each of those games, the script queries the song table and determines if each song is exactly 150 seconds. If it is, then go to work trying to estimate the true length.The forgoing paragraph describes what I figured was possible with only a single (possibly large) SQL query.
For each song represented in the chiptune file, I ran it through a custom length estimator program. My brilliant (err, naïve) solution to the length estimation problem was to synthesize seconds of audio up to a maximum of 120 seconds (tightening up the default length just a bit) and counting how many of those seconds had all 0 samples. If the count reached 5 consecutive seconds of silence, then the estimator rewound the running length by 5 seconds and declared that to be the proper length. Update the database.
There were about 1430 chiptune files whose songs needed updates. Some files had 1 single song. Some files had over 100. When I let the script run, it took nearly 65 minutes to process all the files. That was a single-threaded solution, of course. Even though I already had the data I needed, I wanted to try to hand at parallelizing the script. So I went to work with Python’s multiprocessing module and quickly refactored it to use all 4 CPU threads on the machine where the files live. Results :
- Single-threaded solution : 64m42s to process corpus (22 games/minute)
- Multi-threaded solution : 18m48s with 4 CPU threads (75 games/minute)
More than a 3x speedup across 4 CPU threads, which is decent for a primarily CPU-bound operation.
Epilogue
I suspect that this task will require some refinement or manual intervention. Maybe there are songs which actually have more than 5 legitimate seconds of silence. Also, I entertained the possibility that some songs would generate very low amplitude noise rather than being perfectly silent. In that case, I could refine the script to stipulate that amplitudes below a certain threshold count as 0. Fortunately, I marked which games were modified by this method, so I can run a new script as necessary.SQL Schema
Here is the schema of my SQlite3 database, for those who want to try their hand at a proper query. I am confident that it’s possible ; I just didn’t have the patience to work it out. The task is to retrieve all the rows from the games table where all of the corresponding songs in the songs table is 150000 milliseconds.
-
CREATE TABLE games
-
(
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
-
uncompressed_sha1 TEXT,
-
uncompressed_size INTEGER,
-
compressed_sha1 TEXT,
-
compressed_size INTEGER,
-
system TEXT,
-
game TEXT,
-
gme_system TEXT default NULL,
-
canonical_url TEXT default NULL,
-
extension TEXT default "gamemusicxz",
-
enabled INTEGER default 1,
-
redirect_to_id INT DEFAULT -1,
-
play_lengths_modified INT DEFAULT NULL) ;
-
CREATE TABLE songs
-
(
-
game_id INTEGER,
-
song_number INTEGER NOT NULL,
-
song TEXT,
-
author TEXT,
-
copyright TEXT,
-
dumper TEXT,
-
length INTEGER,
-
intro_length INTEGER,
-
loop_length INTEGER,
-
play_length INTEGER,
-
play_order INTEGER default -1) ;
-
CREATE TABLE tags
-
(
-
game_id INTEGER,
-
tag TEXT NOT NULL,
-
tag_type TEXT default "filename") ;
-
CREATE INDEX gameid_index_songs ON songs(game_id) ;
-
CREATE INDEX gameid_index_tag ON tags(game_id) ;
-
CREATE UNIQUE INDEX sha1_index ON games(uncompressed_sha1) ;