
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (46)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
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 (7377)
-
How to manipulate a Uri as File in android
3 juin 2021, par Omid.NI am trying to use FFmpeg in android. As you know the framework no longer lets you to use absolute paths or open files freely even with WRITE_EXTERNAL_STORAGE permission :|

So, using the SAF, I get the file as an Uri, then I need to put it as an argument to ffmpeg to encode it but it only accepts file paths.

How can i achieve this ?


Note : There are some bad practices in my code but I hope we can ignore them for now because that's not the problem here :)


public class MainActivity extends AppCompatActivity {

 private static final int PICK_VIDEO_FILE = 2;

 private static final String TAG = "MainActivity";
 
 File theFile;
 TextView textView;

 @Override
 protected void onCreate(Bundle savedInstanceState) {


 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);

 textView = (TextView) findViewById(R.id.text_view);

 
 if (theFile == null) {
 openFile(Uri.fromFile(new File("/storage/emulated/0/")));
 }


 }

 @Override
 protected void onResume() {
 super.onResume();
 if (theFile !=null) {

 FFmpegSession fFmpegSession = FFmpegKit.executeAsync("-i " + theFile.getAbsolutePath()
 + " -c:v mpeg4 file:///storage/emulated/0/out.mp4",
 new ExecuteCallback() {
 @Override
 public void apply(Session session) {

 }
 });
 try {
 Thread.sleep(5000);
 } catch (InterruptedException e) {
 e.printStackTrace();
 }
 textView.setText("" + fFmpegSession.getState().name() + " " + fFmpegSession.getOutput());
 }
 }

 private void openFile(Uri pickerInitialUri) {
 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
 intent.addCategory(Intent.CATEGORY_OPENABLE);
 intent.setType("video/mp4");
 
 // Optionally, specify a URI for the file that should appear in the
 // system file picker when it loads.
 intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, pickerInitialUri);

 startActivityForResult(intent, PICK_VIDEO_FILE);
 }
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {

 super.onActivityResult(requestCode, resultCode, data);
 if (requestCode == PICK_VIDEO_FILE) {
 if (resultCode == RESULT_OK) {
 theFile = new File(data.getData().getPath());
 }
 }

 }




-
ffmpeg sequence of multiple filters syntax
5 juillet 2021, par otomarii am trying to use multiple filters in ffpmeg, but it does not allow more than one -af.
so, then i decided to try to do it with a -complex_filter.


sudo ffmpeg -f alsa -i default:CARD=Device \
 -filter_complex \
 "lowpass=5000,highpass=200; \
 volume=+5dB; \
 afftdn=nr=0.01:nt=w;" \
 -c:a libmp3lame -b:a 128k -ar 48000 -ac 1 -t 00:00:05 -y $recdir/audio_$(date '+%Y_%m_%d_%H_%M_%S').mp3



it must work, but for some reason i get an error :


Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'default:CARD=Device':
 Duration: N/A, start: 1625496748.441207, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[AVFilterGraph @ 0xaaab0a8b14e0] No such filter: ''
Error initializing complex filters.
Invalid argument



i have tried quotes and others, nothing helps..


-
How to decode Byte string from continous video frames in python
15 juillet 2021, par fresch mani am trying to get PNG from a video stream. first i connect the server during socket, and i recieve presistent byte string. however when i use Pickel ,i get a Error,that is UnpicklingError : invalid load key, '\x10.


i surpose that ,if i should first do someting to the bytestring before i use pickel.or i should use another methode


i have already search in the internet, but all the answers are , open locally video and so ..but my byte string are acctully presistent RAW video frames(yuv420) during tcp transport.


`import socket,os,struct,numpy,pickle
TCP_IP = '192.168.0.90'
TCP_PORT = 5000
BUFFER_SIZE =1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
while True :
 data = s.recv(BUFFER_SIZE)
 data = pickle.loads(data) `



thank you