
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (30)
-
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. -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (5812)
-
iPhone - IMA WAV ADPCM audio stream for iOS
21 mai 2013, par SirissI am trying to write an app for a school project that will play a video stream of the lab. They use Foscam cameras, and from what I understand they only stream audio in FFMPEG and VLC (a wrapper of FFMPEG and others, correct ?). I can play the video stream in a UIWebView just fine, but I can't figure out how to get audio to work. I have read a bunch of post on here about the different audio stream options, but none support this format. I have also looked into VLCKit, but that seems to only work in OS X, not iOS.
Is there a Framework, or Kit that can stream IMA WAV ADPCM audio from a VLC/FFMPEG file, or does someone know of a better way to get audio from a Foscam ?
EDIT - I know more about the stream and I have tried a few things. I tried AVPlayer, but discovered Audio FIle Stream and Audio Queue Services but can't find a good tutorial.
I also found THIS site, and tried the project with my stream and it did not work.
-
Translating Return To Ringworld
17 août 2016, par Multimedia Mike — Game HackingAs indicated in my previous post, the Translator has expressed interest in applying his hobby towards another DOS adventure game from the mid 1990s : Return to Ringworld (henceforth R2RW) by Tsunami Media. This represents significantly more work than the previous outing, Phantasmagoria.
Return to Ringworld Title Screen
I have been largely successful thus far in crafting translation tools. I have pushed the fruits of these labors to a Github repository named improved-spoon (named using Github’s random name generator because I wanted something more interesting than ‘game-hacking-tools’).
Further, I have recorded everything I have learned about the game’s resource format (named RLB) at the XentaxWiki.
New Challenges
The previous project mostly involved scribbling subtitle text on an endless series of video files by leveraging a separate software library which took care of rendering fonts. In contrast, R2RW has at least 30k words of English text contained in various blocks which require translation. Further, the game encodes its own fonts (9 of them) which stubbornly refuse to be useful for rendering text in nearly any other language.Thus, the immediate 2 challenges are :
- Translating volumes of text to Spanish
- Expanding the fonts to represent Spanish characters
Normally, “figuring out the file format data structures involved” is on the list as well. Thankfully, understanding the formats is not a huge challenge since the folks at the ScummVM project already did all the heavy lifting of reverse engineering the file formats.
The Pitch
Here was the plan :- Create a tool that can dump out the interesting data from the game’s master resource file.
- Create a tool that can perform the elaborate file copy described in the previous post. The new file should be bit for bit compatible with the original file.
- Modify the rewriting tool to repack some modified strings into the new resource file.
- Unpack the fonts and figure out a way to add new characters.
- Repack the new fonts into the resource file.
- Repack message strings with Spanish characters.
Showing The Work : Modifying Strings
First, I created the tool to unpack blocks of message string resources. I elected to dump the strings to disk as JSON data since it’s easy to write and read JSON using Python, and it’s quick to check if any mistakes have crept in.The next step is to find a string to focus on. So I started the game and looked for the first string I could trigger :
This shows up in the JSON string dump as :
"Spanish" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle.", "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle." ,
As you can see, many of the strings are encoded with an ID key as part of the string which should probably be left unmodified. I changed the Spanish string :
"Spanish" : " !0205Hey, is this thing on ?", "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle." ,
And then I wrote the repacking tool to substitute this message block for the original one. Look ! The engine liked it !
Little steps, little steps.
Showing The Work : Modifying Fonts
The next little step is to find a place to put the new characters. First, a problem definition : The immediate goal is to translate the game into Spanish. The current fonts encoded in the game resource only support 128 characters, corresponding to 7-bit ASCII. In order to properly express Spanish, 16 new characters are required : á, é, í, ó, ú, ü, ñ (each in upper and lower case for a total of 14 characters) as well as the inverted punctuation symbols : ¿, ¡.Again, ScummVM already documents (via code) the font coding format. So I quickly determined that each of the 9 fonts is comprised of 128 individual bitmaps with either 1 or 2 bits per pixel. I wrote a tool to unpack each character into an individual portable grey map (PGM) image. These can be edited with graphics editors or with text editors since they are just text files.
Where to put the 16 new Spanish characters ? ASCII characters 1-31 are non-printable, so my first theory was that these characters would be empty and could be repurposed. However, after dumping and inspecting, I learned that they represent the same set of characters as seen in DOS Code Page 437. So that’s a no-go (so I assumed ; I didn’t check if any existing strings leveraged those characters).
My next plan was hope that I could extend the font beyond index 127 and use positions 128-143. This worked superbly. This is the new example string :
"Spanish" : " !0205¿Ves esto ? ¡La puntuacion se hace girar !", "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle." ,
Fortunately, JSON understands UTF-8 and after mapping the 16 necessary characters down to the numeric range of 128-143, I repacked the new fonts and the new string :
Translation : “See this ? The punctuation is rotated !”
Another victory. Notice that there are no diacritics in this string. None are required for this translation (according to Google Translate). But adding the diacritics to the 14 characters isn’t my department. My tool does help by prepopulating [aeiounAEIOUN] into the right positions to make editing easier for the Translator. But the tool does make the effort to rotate the punctuation since that is easy to automate.
Next Steps and Residual Weirdness
There is another method for storing ASCII text inside the R2RW resource called strip resources. These store conversation scripts. There are plenty of fields in the data structures that I don’t fully understand. So, following the lessons I learned from my previous translation outing, I was determined to modify as little as possible. This means copying over most of the original data structures intact, but changing the field representing the relative offset that points to the corresponding string. This works well since the strings are invariably stored NULL-terminated in a concatenated manner.I wanted to document for the record that the format that R2RW uses has some weirdness in they way it handles residual bytes in a resource. The variant of the resource format that R2RW uses requires every block to be aligned on a 16-byte boundary. If there is space between the logical end of the resource and the start of the next resource, there are random bytes in that space. This leads me to believe that these bytes were originally recorded from stale/uninitialized memory. This frustrates me because when I write the initial file copy tool which unpacks and repacks each block, I want the new file to be identical to the original. However, these apparent nonsense bytes at the end thwart that effort.
But leaving those bytes as 0 produces an acceptable resource file.
Text On Static Images
There is one last resource type we are working on translating. There are various bits of text that are rendered as images. For example, from the intro :
It’s possible to locate and extract the exact image that is overlaid on this scene, though without the colors :
The palettes are stored in a separate resource type. So it seems the challenge is to figure out the palette in use for these frames and render a transparent image that uses the same palette, then repack the new text-image into the new resource file.
The post Translating Return To Ringworld first appeared on Breaking Eggs And Making Omelettes.
-
How to build FFMPEG lib with android ndk
27 janvier 2017, par S. Le GalloudecI introduce my problem : I’m a student working on a project asked by a company to my school.
My part is to develop an android application (i have to use c++) who can make an authentication, ask to an api wich camera the client can watch, then display in real time the stream of the IP camera (using RTSP protocol)To be honnest i’m pretty lost. I’ve found the library FFMPEG, wich looks like useful to my project. If i got it right, the library can display a stream from a camera. So i built the library for my project, and then i tried to include it in my program.
I did it the same way i did to include the library curl that i already use.
But when i try to run my program, i got this message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/src/main/cpp/lecteur.cpp:19 : error : undefined reference to ’avcodec_configuration’
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed.Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
And i know that the problem comes from my cmakelist, or from my tree. But i don’t see the mistake, so if you could help me. Here is my cmakelist :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
add_library(ffmpeg SHARED IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg
z
${log-lib}
)If you want to understand how i made my cmake, and what looks like my program you can check here : https://github.com/samylegalloudec/android-ndk-ffmepg
Hope i was clear
Best regards
Edit n°1 :
I think i’ve made a mistake in my cmakelist.txt so i fixed it (i guess) this way :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
add_library(ffmpeg-codec STATIC IMPORTED)
set_target_properties(ffmpeg-codec PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
add_library(ffmpeg-device STATIC IMPORTED)
set_target_properties(ffmpeg-device PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
add_library(ffmpeg-filter STATIC IMPORTED)
set_target_properties(ffmpeg-filter PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
add_library(ffmpeg-format STATIC IMPORTED)
set_target_properties(ffmpeg-format PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
add_library(ffmpeg-util STATIC IMPORTED)
set_target_properties(ffmpeg-util PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
add_library(ffmpeg-postproc STATIC IMPORTED)
set_target_properties(ffmpeg-postproc PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
add_library(ffmpeg-sample STATIC IMPORTED)
set_target_properties(ffmpeg-sample PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
add_library(ffmpeg-scale STATIC IMPORTED)
set_target_properties(ffmpeg-scale PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg-codec
ffmpeg-device
ffmpeg-filter
ffmpeg-format
ffmpeg-util
ffmpeg-postproc
ffmpeg-sample
ffmpeg-scale
z
${log-lib}
)Now i have another message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libavcodec.a ../../../../../distribution/ffmpeg/x86/lib/libavdevice.a ../../../../../distribution/ffmpeg/x86/lib/libavfilter.a ../../../../../distribution/ffmpeg/x86/lib/libavformat.a ../../../../../distribution/ffmpeg/x86/lib/libavutil.a ../../../../../distribution/ffmpeg/x86/lib/libpostproc.a ../../../../../distribution/ffmpeg/x86/lib/libswresample.a ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : warning : shared library text segment is not shareable
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : error : treating warnings as errors
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed. -
Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
-