
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 (63)
-
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 (...) -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (4544)
-
Android FFmpegPlayer Streaming Service onClick notification
8 octobre 2013, par agonyI have a MainActivity class that displays the list of streams available for my project and the StreamingActivity class where the streaming is done.
If the user selected an item from the list it will start the StreamingActivity and start playing the stream.
I'm having trouble to continue streaming music when the user pressed the notification and returning it to the StreamingActivity class if the user pressed or clicked the home menu or when the app goes to onDestroy().I'm using FFmpegPlayer for my project 'coz it requires to play mms :// live streams for local FM station.
Here's my code :
public class StreamingActivity extends BaseActivity implements ActionBar.TabListener,
PlayerControlListener, IMediaPlayerServiceClient {
private StatefulMediaPlayer mMediaPlayer;
private FFmpegService mService;
private boolean mBound;
public static final String TAG = "StationActivity";
private static Bundle mSavedInstanceState;
private static PlayerFragment mPlayerFragment;
private static DJListFragment mDjListFragment;
private SectionsPagerAdapter mSectionsPagerAdapter;
private ViewPager mViewPager;
private String stream = "";
private String fhz = "";
private String page = "0";
private Dialog shareDialog;
private ProgressDialog dialog;
private boolean isStreaming;
/*************************************************************************************************************/
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_station);
Bundle bundle = getIntent().getExtras();
if(bundle !=null){
fhz = bundle.getString("fhz");
stream = bundle.getString("stream");
}
Log.d(TAG, "page: " + page + " fhz: " + fhz + " stream: " + stream + " isStreaming: " + isStreaming);
getSupportActionBar().setTitle("Radio \n" + fhz);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
mPlayerFragment = (PlayerFragment) Fragment.instantiate(this, PlayerFragment.class.getName(), null);
mDjListFragment = (DJListFragment) Fragment.instantiate(this, DJListFragment.class.getName(), null);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
mViewPager.setCurrentItem(Integer.parseInt(page));
mSavedInstanceState = savedInstanceState;
Tab playingTab = getSupportActionBar().newTab();
playingTab.setText(getString(R.string.playing_label));
playingTab.setTabListener(this);
Tab djTab = getSupportActionBar().newTab();
djTab.setText(getString(R.string.dj_label));
djTab.setTabListener(this);
getSupportActionBar().addTab(playingTab);
getSupportActionBar().addTab(djTab);
// When swiping between different sections, select the corresponding
// tab. We can also use ActionBar.Tab#select() to do this if we have
// a reference to the Tab.
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
StationActivity.this.getSupportActionBar().setSelectedNavigationItem(position);
}
});
if (mSavedInstanceState != null) {
getSupportActionBar().setSelectedNavigationItem(mSavedInstanceState.getInt("tab", 0));
}
dialog = new ProgressDialog(this);
bindToService();
UriBean.getInstance().setStream(stream);
Log.d(TAG ,"stream: " + UriBean.getInstance().getStream());
}
/********************************************************************************************************/
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
if (position == 0) {
return mPlayerFragment;
} else {
return mDjListFragment;
}
}
@Override
public int getCount() {
return 2;
}
}
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
// When the given tab is selected, switch to the corresponding page in the ViewPager.
mViewPager.setCurrentItem(tab.getPosition());
}
@Override
public void onTabUnselected(Tab tab, FragmentTransaction ft) { }
@Override
public void onTabReselected(Tab tab, FragmentTransaction ft) { }
/********************************************************************************************************/
public void showLoadingDialog() {
dialog.setMessage("Buffering...");
dialog.show();
}
public void dismissLoadingDialog() {
dialog.dismiss();
}
/********************************************************************************************************/
/**
* Binds to the instance of MediaPlayerService. If no instance of MediaPlayerService exists, it first starts
* a new instance of the service.
*/
public void bindToService() {
Intent intent = new Intent(this, FFmpegService.class);
if (Util.isFFmpegServiceRunning(getApplicationContext())){
// Bind to Service
Log.i(TAG, "bindService");
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
} else {
//start service and bind to it
Log.i(TAG, "startService & bindService");
startService(intent);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
}
/**
* Defines callbacks for service binding, passed to bindService()
*/
private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName className, IBinder serviceBinder) {
Log.d(TAG,"service connected");
//bound with Service. get Service instance
MediaPlayerBinder binder = (FFmpegService.MediaPlayerBinder) serviceBinder;
mService = binder.getService();
//send this instance to the service, so it can make callbacks on this instance as a client
mService.setClient(StationActivity.this);
mBound = true;
Log.d(TAG, "isPlaying === SERVICE: " + mService.isPlaying());
//if
startStreaming();
}
@Override
public void onServiceDisconnected(ComponentName arg0) {
mBound = false;
mService = null;
}
};
/********************************************************************************************************/
@Override
public void onPlayerPlayStop() {
Log.d(TAG, "onPlayerPlayStop");
Log.v(TAG, "isStreaming: " + isStreaming);
Log.v(TAG, "mBound: " + mBound);
if (mBound) {
Log.d(TAG, "bound.............");
mMediaPlayer = mService.getMediaPlayer();
//pressed pause ->pause
if (!PlayerFragment.play.isChecked()) {
if (mMediaPlayer.isStarted()) {
Log.d(TAG, "pause");
mService.pauseMediaPlayer();
}
} else { //pressed play
// STOPPED, CREATED, EMPTY, -> initialize
if (mMediaPlayer.isStopped() || mMediaPlayer.isCreated() || mMediaPlayer.isEmpty()) {
startStreaming();
} else if (mMediaPlayer.isPrepared() || mMediaPlayer.isPaused()) { //prepared, paused -> resume play
Log.d(TAG, "start");
mService.startMediaPlayer();
}
}
Log.d(TAG, "isPlaying === SERVICE: " + mService.isPlaying());
}
}
/********************************************************************************************************/
@Override
public void onDownload() {
Toast.makeText(this, "Not yet available...", Toast.LENGTH_SHORT).show();
}
@Override
public void onComment() {
FragmentManager fm = getSupportFragmentManager();
DialogFragment newFragment = MyAlertDialogFragment.newInstance();
newFragment.show(fm, "comment_dialog");
}
@Override
public void onShare() {
showShareDialog();
}
/********************************************************************************************************/
private void startStreaming() {
Log.d(TAG, "@startLoading");
boolean isNetworkFound = Util.checkConnectivity(getApplicationContext());
if(isNetworkFound) {
Log.d(TAG, "network found");
mService.initializePlayer(stream);
isStreaming = true;
} else {
Toast.makeText(getApplicationContext(), "No internet connection found...", Toast.LENGTH_SHORT).show();
}
Log.d(TAG, "isStreaming: " + isStreaming);
Log.d(TAG, "isPlaying === SERVICE: " + mService.isPlaying());
}
@Override
public void onInitializePlayerStart() {
showLoadingDialog();
}
@Override
public void onInitializePlayerSuccess() {
dismissLoadingDialog();
PlayerFragment.play.setChecked(true);
Log.d(TAG, "isPlaying === SERVICE: " + mService.isPlaying());
}
@Override
public void onError() {
Toast.makeText(getApplicationContext(), "Not connected to the server...", Toast.LENGTH_SHORT).show();
}
@Override
public void onDestroy() {
Log.d(TAG, "onDestroy");
super.onDestroy();
uiHelper.onDestroy();
Log.d(TAG, "isPlaying === SERVICE: " + mService.isPlaying());
if (mBound) {
mService.unRegister();
unbindService(mConnection);
mBound = false;
}
Log.d(TAG, "service: " + Util.isFFmpegServiceRunning(getApplicationContext()));
}
@Override
public void onStop(){
Log.d(TAG, "onStop");
super.onStop();
}
/*******************************************************************************************************/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
switch (itemId){
case android.R.id.home:
onBackPressed();
break;
default:
break;
}
return true;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
Log.d(TAG, "@onKeyDown");
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0){
//this.moveTaskToBack(true);
onBackPressed();
return true;
}
return super.onKeyDown(keyCode, event);
}
}
public class FFmpegService extends Service implements IMediaPlayerThreadClient {
private FFmpegPlayerThread mMediaPlayerThread = new FFmpegPlayerThread(this);
private final Binder mBinder = new MediaPlayerBinder();
private IMediaPlayerServiceClient mClient;
//private StreamStation mCurrentStation;
private boolean mIsSupposedToBePlaying = false;
private boolean isPausedInCall = false;
private PhoneStateListener phoneStateListener;
private TelephonyManager telephonyManager;
@Override
public void onCreate(){
mMediaPlayerThread.start();
}
/**
* A class for clients binding to this service. The client will be passed an object of this class
* via its onServiceConnected(ComponentName, IBinder) callback.
*/
public class MediaPlayerBinder extends Binder {
/**
* Returns the instance of this service for a client to make method calls on it.
* @return the instance of this service.
*/
public FFmpegService getService() {
return FFmpegService.this;
}
}
/**
* Returns the contained StatefulMediaPlayer
* @return
*/
public StatefulMediaPlayer getMediaPlayer() {
return mMediaPlayerThread.getMediaPlayer();
}
public boolean isPlaying() {
return mIsSupposedToBePlaying;
}
@Override
public IBinder onBind(Intent arg0) {
return mBinder;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
phoneStateListener = new PhoneStateListener() {
@Override
public void onCallStateChanged(int state, String incomingNumber) {
// String stateString = "N/A";
Log.v("FFmpegService", "Starting CallStateChange");
switch (state) {
case TelephonyManager.CALL_STATE_OFFHOOK:
case TelephonyManager.CALL_STATE_RINGING:
if (mMediaPlayerThread != null) {
pauseMediaPlayer();
isPausedInCall = true;
}
break;
case TelephonyManager.CALL_STATE_IDLE:
// Phone idle. Start playing.
if (mMediaPlayerThread != null) {
if (isPausedInCall) {
isPausedInCall = false;
startMediaPlayer();
}
}
break;
}
}
};
// Register the listener with the telephony manager
telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
return START_STICKY;
}
/**
* Sets the client using this service.
* @param client The client of this service, which implements the IMediaPlayerServiceClient interface
*/
public void setClient(IMediaPlayerServiceClient client) {
this.mClient = client;
}
public void initializePlayer(final String station) {
//mCurrentStation = station;
mMediaPlayerThread.initializePlayer(station);
}
public void startMediaPlayer() {
Intent notificationIntent = new Intent(getApplicationContext(), StreamingActivity.class);
//notificationIntent.putExtra("page", "0");
//notificationIntent.putExtra("isPlaying", isPlaying());
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 0 , notificationIntent , PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("You are listening to Radio...")
.setContentText("test!!!")
.setContentIntent(contentIntent);
startForeground(1, mBuilder.build());
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1, mBuilder.build());
mIsSupposedToBePlaying = true;
mMediaPlayerThread.startMediaPlayer();
}
public void dismissNotification(Context context) {
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
mNotificationManager.cancel(1);
}
/**
* Pauses playback
*/
public void pauseMediaPlayer() {
Log.d("MediaPlayerService","pauseMediaPlayer() called");
mMediaPlayerThread.pauseMediaPlayer();
stopForeground(true);
mIsSupposedToBePlaying = false;
dismissNotification(this);
}
/**
* Stops playback
*/
public void stopMediaPlayer() {
stopForeground(true);
mMediaPlayerThread.stopMediaPlayer();
mIsSupposedToBePlaying = false;
dismissNotification(this);
}
public void resetMediaPlayer() {
mIsSupposedToBePlaying = false;
stopForeground(true);
mMediaPlayerThread.resetMediaPlayer();
dismissNotification(this);
}
@Override
public void onError() {
mIsSupposedToBePlaying = false;
mClient.onError();
dismissNotification(this);
}
@Override
public void onInitializePlayerStart() {
mClient.onInitializePlayerStart();
}
@Override
public void onInitializePlayerSuccess() {
startMediaPlayer();
mClient.onInitializePlayerSuccess();
mIsSupposedToBePlaying = true;
}
public void unRegister() {
this.mClient = null;
mIsSupposedToBePlaying = false;
dismissNotification(this);
}
}Hoping someone can help me here...
-
x264 Building error - Android
21 avril 2016, par Jay ParikhI am using this repository to build ffmpeg static library which includes x264,libpng and others, please
visit this link https://github.com/writingminds/ffmpeg-androidi am using windows 7 as host and ubuntu 15.10 (_64) as guest os using VMware Workstation 12
and
Android-ndk-r11b-linux-x86_64i do have Prebuilt libraries , but now i want it without PIE support
i am getting this error in config.log in x264 folder while building
through./android_build.sh
here is the log :
x264 configure script
Command line options: "--cross-prefix=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
checking whether /mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot works... no
Failed commandline was:
--sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot conftest.c -Wall -I. -I$(SRCPATH) --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot --sysroot=/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/sysroot -lm -o conftest
/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error:
conftest: Input/output error
Failed program was:
int main (void) { return 0; }
DIED: No working C compiler found.ushare is my shared folder between windows and ubuntu
I have spend almost a week ,trying to solve every error i get.
these errors are like never ending , 1 solution give 10 more errors
i have researched a LOT for this librarythanks a lot in advance.
Also i thought that x264 library might have poroblem ,so i tried to disable it
but next library "libpng" also had Same log Errori think problem is in Input/output error (obviously)
this line in log kind of confuses me (those /../../)/mnt/hgfs/uShare/ffmpeg-android/toolchain-android/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld : fatal error :
its like two folder overlaping address...
thanks a lot in advance.
please don’t go harsh on me ,its my first time,all thanks to this thing... -
FFMPEG multi livestream - recorded stream send to different services like YT and Twitch at different time (on different button clicks )
4 octobre 2022, par GaneshTrying for the last 10 days and still no success, I am creating a python application that will accept the URL and visit that URL using chromium, capture that screen and send that real-time screen recording to different live stream acceptors as youtube live, twitch Twitter, Facebook live or some other sources and many of these could be multiple.


There are two challenges (both challenges depend on a user action like different button clicks) -


- 

- The time of starting the Livestream we know only one Livestream acceptor and other acceptors could be sent via another API at any time or may not be sent on the whole live stream.
- Any of the streams could be stopped at any moment including the first one which started the original live streaming service






To Solve these challenges I am trying the following process (i took mp4 as a source for simplifying)


- 

- create a stream and store it into PIPE.stdout




ffmpeg_Command_get_stream = 'ffmpeg -re -i test.mp4 -f flv pipe:1'
ffmpeg_Command_get_stream=ffmpeg_Command_get_stream.split()
pipe = sp.Popen(ffmpeg_Command_get_stream,
 stdout=sp.PIPE,
 stderr=sp.PIPE,
 bufsize=8000000,
 shell=True,
 universal_newlines=True
 )
out,err = pipe.communicate()



- 

-
and send that stream with the help of FFMPEG to the Livestream acceptor with the click of the youtube Livestream button


ffmpeg_Command_send_stream = ['ffmpeg','-i',pipe.stdout,'-f','flv',RTMPURL_YOUTUBE]






Update Trying to Explain it a little more :


step 1 - I need a real-time stream from the first command, so I used -re in FFMPEG


step 2 - Use above stream as an input for other command and send that as an output as a Livestream to youtube (or twitch/Facebook), But the second step would happen only when the user click on the button "YT LiveStream", Here the tricky thing is there are multiple buttons (YT LiveStream, Twitch LiveStream, Facebook LiveStream) and user can click any time on any of button, also can click on all button one by one.




sorry for bad explaination


what I am doing wrong ? , Is this Possible ? or need to go with another process,


any help would be greatly appreciated