
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (107)
-
La gestion des forums
3 novembre 2011, parSi les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
Accès à l’interface de modération des messages
Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...) -
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 ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (10853)
-
Loading and unloading ffmpeg jni library based on when it's needed
30 septembre 2014, par AlinI finally managed to compile ffmpeg for android and I’ve been able to use it in my app.
Here is the scenario of my app :
- I show the user a gridview with thumbnails of images and videos
- the user can click on a cell and it is taken to image/video details where he can see the full image or play the video
- the user can apply an image over an video and this is when ffmpeg is used
So basically, the user might never actually use the watermarking option or he can do it very rare because the amount of available videos is way smaller than images.
I am loading the ffmpeg library, first time it is needed by running :
static {
System.loadLibrary("ffmpeglib");
}Now here are my questions :
- loading the library like this, uses app’s memory and resources ?
- can I unload the library, or better said, is it needed to unload it ? I have not found any java code like System.unloadLibrary to take care of unloading
- Since the library might be used rarely, wouldn’t a load => do encoding => unload be a better approach ? Or maybe having it loaded would allow easy reuse since no loading is necessary.
- If I use an IntentService to load the library and make the encoding, when the service completes the job, does the library gets unloaded ?
-
Executing an exe and reading the OutputStream
30 septembre 2014, par vlatkozelkaI have a program called FFprobe which probes media (files/live streams ... ) and outputs result in different formats , for example :
ffprobe.exe -i test.ts -print_format xml -show_programs
gives this output :
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
<programs>
<program>
<tag key="service_name" value="Arabica TV"></tag>
<tag key="service_provider" value="Nilesat"></tag>
<streams>
<stream index="10" profile="Main" width="720" height="576" level="8" timecode="08:28:54:09">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0"></disposition>
</stream>
<stream index="4" channels="2">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0"></disposition>
</stream>
</streams>
</program>
... more programs
</programs></ffprobe>to retrieve this info in java i used ProcessBuilder and a scanner , and then id write to a file once the result is ok ... but it wasnt :
Process proc = new ProcessBuilder("ffprobe.exe","-i", ... same arguments );
Scanner sc = new Scanner (proc.getInputStream()) // im 100% sure its not errorStream
while(sc.hasNext()){
System.out.println(sc.nextLine());
}the app just hangs with no output , i know its hanging cuz the process is still running and scanner has next , but , i don’t know why it would do that ?If i execute the same in cmd i would get good result and ofc i can write to file with ">"
Ive tried it w/o the -print_format option , which gives the info in a plain text on the errorstream(i know its error cuz i was able to write with 2> not >> ) , and i was able to read the error stream in java , but its not meant for parsing cuz very very un-organized .
Input #0, mpegts, from 'PBR_REC_20140426094852_486.ts':
Duration: 00:13:34.30, start: 7791.344722, bitrate: 42154 kb/s
Program 1201
Metadata:
service_name : Arabica TV
service_provider: Nilesat
Stream #0:19[0x7db]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 2348 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:3[0xbcf]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s
Program 1202
Metadata:
service_name : NBN
service_provider: NILESAT
Stream #0:10[0x7d1]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 2600 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:11[0xbba](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 125 kb/s
Program 1203
Metadata:
service_name : Heya TV
service_provider: NILESAT
Stream #0:5[0x7d2]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 2600 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:6[0xbbc](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 125 kb/s
Program 1204 ... more programsnow it might seem organized and "parse-able" and i actually made a parser that worked to some point , but sometimes it doesnt stick to this structure and ruins the whole parsing, its why i need a xml/json ...
The -print_format im sure outputs to outputstream.
Im not asking for help on how to use FFprobe as thats not this place’s purpose , Im asking why am i not being able to get the output stream from java while it is definitely outputting if i execute in windows .
I also tried apache commons-exec as i know processbuilder can be a pain ,it did execute perfectly and showed in System.in (black for intput and red for error), but getting the stream with apache is something i couldn’t understand , i tried this example
The xml parser i already taken care of , simply put i just need to execute that first command from java and read the output , but for some reason its not working .
-
Loading and unloading C jni library based on when it's needed
30 septembre 2014, par AlinI finally managed to compile ffmpeg for android and I’ve been able to use it in my app.
Here is the scenario of my app :
- I show the user a gridview with thumbnails of images and videos
- the user can click on a cell and it is taken to image/video details where he can see the full image or play the video
- the user can apply an image over an video and this is when ffmpeg is used
So basically, the user might never actually use the watermarking option or he can do it very rare because the amount of available videos is way smaller than images.
I am loading the ffmpeg library, first time it is needed by running :
static {
System.loadLibrary("ffmpeglib");
}Now here are my questions :
- loading the library like this, uses app’s memory and resources ?
- can I unload the library, or better said, is it needed to unload it ? I have not found any java code like System.unloadLibrary to take care of unloading
- Since the library might be used rarely, wouldn’t a load => do encoding => unload be a better approach ? Or maybe having it loaded would allow easy reuse since no loading is necessary.
- If I use an IntentService to load the library and make the encoding, when the service completes the job, does the library gets unloaded ?