
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (109)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (13705)
-
Error issuing complex shell command in python via subprocess
4 juillet 2018, par user16171I’ve converted about 100 video tapes and now have 100 folders full of .dv files (each folder’s name is a date). In each folder, I want to combine all of the .dv files into one x265 mp4. I have figured out the ffmpeg command to do this, and I’ve written a simple Python script to traverse the folder hierarchy and print out the ffmpeg command to do each folder’s conversion. I’d like to set it up to just run each folder in series - it will take about a week to do the entire conversion, leaving me with about 5GB of video to use/post, etc. vs the 1.5TB of raw .dv files.
The shell command looks like this :
ffmpeg -f concat -i <(for f in FULL_PATH_TO_FILES/*.dv; do echo "file '$f'"; done) \
-c:v libx265 -crf 28 -c:a aac -b:a 128k \
-strict -2 FULL_PATH_TO_FILES/FOLDERNAME.mp4I can run that as a shell command, and it works fine. I could use the python script to generate the 100 commands and just copy and paste them into my shell one at a time. But I’d rather just have them run in series.
I’ve tried various incarnations of os.system and subprocess.call or subprocess.Popen, and they all error.
I build up the command and issue subprocess.call(command), which gives this error :
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError : [Errno 2] No such file or directoryI’ve also tried building up the command, as described in many of the other threads I’ve read, but it does not work, and I assume it’s because of the for-loop I have in the shell command.
So, what’s the best way to do this ? Obviously, a shell-jockey could just tell me how to do this via the shell, but I’m more comfortable using Python to traverse the directories and build up the ffmpeg command.
For what it’s worth, here is the whole script :
import os
import subprocess
t1 = "ffmpeg -f concat -i <(for f in "
t2 = "/*.dv; do echo \"file '$f'\"; done) -c:v libx265 -crf 28 -c:a aac -b:a 128k -strict -2 "
t3 = ".mp4"
rootDir = ROOTDIR
for dirName, subdirList, fileList in os.walk(rootDir):
S = dirName.split('/')
if S[-1] == "Media":
moviename = S[-2].split(".")[0] # e.g. "19991128_Thanksgiving"
command = t1 + dirName + t2 + dirName + "/" + moviename + t3
if sum([".mp4" in fname for fname in fileList]) == 0: # don't bother if there is already a mp4 file in the folder
cmd_list = [t1,dirName,t2,dirName,"/",moviename,t3]
print command
print
print
subprocess.call(command) -
Adding a image resource over video file from sd card using ffmpeg or MediaMuxer for android
18 septembre 2014, par AlinI am stuck in this area which I am not comfortable at all to work in.
Here is what I did so far :
- Made an Ubuntu VirtualBox machine
- Downloaded latest ffmpeg version which is 2.3.3
- Compiled ffmpeg to be compatible with armv7-a so in the end I get two folders : include and lib. In include I have the headers and in libs the *.so files (just as in http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/)
I have created a new android project and made a jni folder and this is how far I went... Even this, with all the struggle being new to linux and compiling took me almost a week to reach.
Adding a watermark in ffmpeg I believe it is done on libavfilter ? I have to dig on this matter, however the original ffmpeg I need to translate into my project is :
ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi
As far as I am studying now I need to do inside jni :
- create a add_watermark.c file in which I need to somehow call the function that does the filter overlay call
-
create Android.mk to load this and the ffmpeg needed libraries
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := add-watermark
LOCAL_SRC_FILES := add-watermark.c
LOCAL_LDLIBS := -llog -ljnigraphics -lz
LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil
include $(BUILD_SHARED_LIBRARY)
$(call import-module,ffmpeg-2.3.3/android/armv7-a)
-
create Application.mk
APP_ABI := armeabi-v7a
APP_PLATFORM := android-8
-
run ndk-build and use the generated libraries in my android project.
I really need help on continuing, so every answer is received with great attention and pleasure.
Later Edit :
Would it be possible to somehow build ffmpeg.exe as a library and call its main with the exact same parameters as the original exe ? I do not want to run ffmpeg as a standalone executable, but have it integrated within the project. Something like http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/ What downsides would this approach have ?Later edit 2 : if this is possible by using MediaMuxer or other APIs added in android 4.3 I am open to it you sample codes are provided. I did look over the MediaCodec and MediaMuxer samples also Grafik and haven’t found a proper way to do what I wanted. I prefer ffmpeg approach better if it works
-
Adding a bitmap over video using ffmpeg or MediaMuxer for android
12 septembre 2014, par AlinI am stuck in this area which I am not comfortable at all to work in.
Here is what I did so far :
- Made an Ubuntu VirtualBox machine
- Downloaded latest ffmpeg version which is 2.3.3
- Compiled ffmpeg to be compatible with armv7-a so in the end I get two folders : include and lib. In include I have the headers and in libs the *.so files (just as in http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/)
I have created a new android project and made a jni folder and this is how far I went... Even this, with all the struggle being new to linux and compiling took me almost a week to reach.
Adding a watermark in ffmpeg I believe it is done on libavfilter ? I have to dig on this matter, however the original ffmpeg I need to translate into my project is :
ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi
As far as I am studying now I need to do inside jni :
- create a add_watermark.c file in which I need to somehow call the function that does the filter overlay call
-
create Android.mk to load this and the ffmpeg needed libraries
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := add-watermark
LOCAL_SRC_FILES := add-watermark.c
LOCAL_LDLIBS := -llog -ljnigraphics -lz
LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil
include $(BUILD_SHARED_LIBRARY)
$(call import-module,ffmpeg-2.3.3/android/armv7-a)
-
create Application.mk
APP_ABI := armeabi-v7a
APP_PLATFORM := android-8
-
run ndk-build and use the generated libraries in my android project.
I really need help on continuing, so every answer is received with great attention and pleasure.
Later Edit :
Would it be possible to somehow build ffmpeg.exe as a library and call its main with the exact same parameters as the original exe ? I do not want to run ffmpeg as a standalone executable, but have it integrated within the project. Something like http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/ What downsides would this approach have ?Later edit 2 : if this is possible by using MediaMuxer or other APIs added in android 4.3 I am open to it you sample codes are provided. I did look over the MediaCodec and MediaMuxer samples also Grafik and haven’t found a proper way to do what I wanted. I prefer ffmpeg approach better if it works