
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (61)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...)
Sur d’autres sites (8697)
-
Receiving RTP stream - AudioStream, AudioGroup
21 février 2020, par tottenI would like to listen an RTP audio stream, however the voice has little gaps in it - not continues. What may be the solution ? Am I missing something on Receiver(android) side or Streamer(ffmpeg) side ?
I’m using ffmpeg to stream RTP audio,
ffmpeg -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -vcodec pcm_u8 -f rtp rtp://192.168.0.15:41954 (port changes.)
And here is my related android code :
AudioStream audioStream;
AudioGroup audioGroup;
@Override
public void onStart() {
super.onStart();
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitNetwork().build();
StrictMode.setThreadPolicy(policy);
AudioManager audio = (AudioManager)getSystemService(AUDIO_SERVICE);
audio.setMode(AudioManager.MODE_IN_COMMUNICATION);
audioGroup = new AudioGroup();
audioGroup.setMode(AudioGroup.MODE_ECHO_SUPPRESSION);
InetAddress inetAddress;
try {
inetAddress = InetAddress.getByName("192.168.0.15");
audioStream = new AudioStream(inetAddress);
audioStream.setCodec(AudioCodec.PCMU);
audioStream.setMode(RtpStream.MODE_NORMAL);
InetAddress inetAddressRemote = InetAddress.getByName("192.168.0.14");
audioStream.associate(inetAddressRemote, 6000);
((TextView)findViewById(R.id.tv_port)).setText("Port : " + String.valueOf(audioStream.getLocalPort()));
audioStream.join(audioGroup);
}
catch ( UnknownHostException e ) {
e.printStackTrace();
}
catch ( SocketException e ) {
e.printStackTrace();
}
} -
Python read byte array of avi header
25 février 2020, par CDYI am trying to get rtsp data from server using ffmpeg and convert it to avi format then temporary saving in the memory.
I wish that I can query 2 minutes data then drop first minute only remain and save second minute. As a result, I need to get the avi header firstly.
However, I don’t know so much about the avi format, so not 100% for sure about my code which get right avi header.
The header I got is like that :
b'RIFF\xff\xff\xff\xffAVI LIST&\x01\x00\x00hdrlavih8\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
and the code I used as following :
class CCTVReader():
def __init__(self, q, in_stream, name):
super().__init__()
self.isHeader = True
self.q = q
self.name = name
self.startTime = datetime.datetime.timestamp(datetime.datetime.now())
self.in_stream = in_stream
self.chunk_size = 1024
self.command = ["ffmpeg",
"-c:v", "h264",
"-rtsp_transport", "tcp",
"-i", in_stream,
"-c:v", "copy",
"-an", "-sn",
"-f", "avi",
"-"]
def run(self):
pipe = sp.Popen(self.command, stdout=sp.PIPE, bufsize=1024**3)
while True:
if self.isHeader:
data = pipe.stdout.read(56)
if len(data) < 56:
break
self.isHeader = False
else:
if datetime.datetime.timestamp(datetime.datetime.now()) - self.startTime >= 60 * 2:
break
data = pipe.stdout.read(self.chunk_size)
self.q.put((data, datetime.datetime.timestamp(datetime.datetime.now())))
print("finish", self.in_stream, time.time())Could I just put this header with second minute data together and write a avi format video stream ?
-
Android : how to film a video before extracting its audio
20 février 2017, par MrOrgonDespite many searches, I haven’t been able to develop a Android prototype able to film a video before extracting its audio as .wav in a separate activity.
I have developed so far a simple filming activity which relies on Android’s Camera application. My strategty was to put the video’s Uri as Extra to the next activity, before using FFMPEG, but I can’t make the transition between Uri and FFMPEG. Indeed, I’m a fresh Android Studio beginner, so I still am not sure about what concept to use.
Here’s my code for the video recording activity.
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.widget.Toast;
import android.widget.VideoView;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import static java.security.AccessController.getContext;
public class RecordActivity extends Activity{
static final int REQUEST_VIDEO_CAPTURE = 0;
VideoView mVideoView = null;
Uri videoUri = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mVideoView = (VideoView) findViewById(R.id.videoVieww);
setContentView(R.layout.activity_record);
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
Toast.makeText(RecordActivity.this, String.valueOf(Build.VERSION.SDK_INT) , Toast.LENGTH_SHORT).show();
takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, videoUri);
if (takeVideoIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takeVideoIntent, REQUEST_VIDEO_CAPTURE);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == REQUEST_VIDEO_CAPTURE && resultCode == RESULT_OK) {
videoUri = intent.getData();
Intent intentForFilterActivity = new Intent(RecordActivity.this, FilterActivity.class);
intentForFilterActivity.putExtra("VideoToFilter", videoUri.getPath());
startActivity(intentForFilterActivity);
}
}
}Here’s the the code for the audio extraction activity. It is called "FilterActivity", as its final aim is to filter outdoor noise using additional functions. I’m using WritingMinds’ implementation of FFMPEG.
https://github.com/WritingMinds/ffmpeg-android-javaimport android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.test.ActivityUnitTestCase;
import android.widget.Toast;
import com.github.hiteshsondhi88.libffmpeg.ExecuteBinaryResponseHandler;
import com.github.hiteshsondhi88.libffmpeg.FFmpeg;
import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegCommandAlreadyRunningException;
public class FilterActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_filter);
Intent intentVideo = getIntent();
String pathIn = intentVideo.getStringExtra("VideoToFilter");
FFmpeg ffmpeg = FFmpeg.getInstance(FilterActivity.this);
try {
String[] cmdExtract = {"-i " + pathIn + " extracted.wav"};
ffmpeg.execute(cmdExtract, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {}
@Override
public void onProgress(String message) {}
@Override
public void onFailure(String message) {
Toast.makeText(FilterActivity.this, "Failure !", Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(String message) {}
@Override
public void onFinish() {}
});
} catch (FFmpegCommandAlreadyRunningException e) {
}
}
}and I always get the "Failure !" message.
Some parts of the code may look extremely bad. As as written previously, I’m a real Android Studio beginner.
Do you have any correction that could work ? Or even just a strategy ?
Thank you in advance !