Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 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 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

Sur d’autres sites (12879)

  • Getting either incorrect output resolution or FPS from ffmpeg

    5 novembre 2011, par Adam

    I am capturing an RTSP stream from a security camera, and transcoding it for (live streaming) to iphone, using OSX as the encoding platform.
    I have it working correctly, and Im tuning it.
    However, it seems that it is not outputting the requested resolution. This is my script

    /Applications/SecurityCamera/openRTSP -v -c -t rtsp://10.0.1.118/ch1-s1 | \
       /Applications/SecurityCamera/ffmpeg \
       -r 10 -i - \
       -y -an -ab 64000 -f mpegts -vcodec copy -s 960x640 \
       -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 \
       -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16  -keyint_min 25 \
       -sc_threshold 40 -i_qfactor 0.71 -bt 400k -maxrate 524288 -bufsize 524288 \
       -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 \
       -aspect 960:640 -r 10 -g 10 -async 2 -\
       |/Applications/SecurityCamera/mediastreamsegmenter -b http://localhost:8080/\
         -f /Library/WebServer/Documents/ -i stream.m3u8 -t 10 -s 4 -D

    This is the status report :

    Input #0, h264, from 'pipe:':

     Duration: N/A, bitrate: N/A
     Stream #0.0: Video: h264, yuv420p, 1600x1200, 10 fps, 10 tbr, 1200k tbn, 20 tbc
     [mpegts @ 0x10100c200] muxrate VBR, pcr every 1 pkts, sdt every 200, pat/pmt every 40 pkts
     Output #0, mpegts, to 'pipe:':
     Metadata:
       encoder         : Lavf52.93.0
       Stream #0.0: Video: libx264, yuv420p, 1600x1200 [PAR 1:1 DAR 4:3], q=2-31, 90k tbn, 10 tbc
    Stream mapping:
     Stream #0.0 -> #0.0

    You can see that its working, but it is outputting 1600x1200 for some reason. (possibly -vcodec copy copies all codec parameters, not just the codec type ?)

    If I change the -vcodec copy to -vcodec libx264 then I get the correct status report (stating 960x640, correct), but the streaming switches to 2 FPS (why ? Im forcing both input and output !) and it halts after 54 frames (see output below)

    Seems stream 0 codec frame rate differs from container frame rate: 20.00 (20/1) -> 10.00 (20/2)
    Input #0, h264, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0.0: Video: h264, yuv420p, 1600x1200, 10 fps, 10 tbr, 1200k tbn, 20 tbc
    [buffer @ 0x100d02420] w:1600 h:1200 pixfmt:yuv420p
    [scale @ 0x100d026f0] w:1600 h:1200 fmt:yuv420p -> w:960 h:640 fmt:yuv420p flags:0x4
    [libx264 @ 0x10100d400] using SAR=1/1
    [libx264 @ 0x10100d400] frame MB size (60x40) > level limit (1620)
    [libx264 @ 0x10100d400] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowCTZ SlowAtom
    [libx264 @ 0x10100d400] profile Constrained Baseline, level 3.0
    [mpegts @ 0x10100c200] muxrate VBR, pcr every 1 pkts, sdt every 200, pat/pmt every 40 pkts
    Output #0, mpegts, to 'pipe:':
     Metadata:
       encoder         : Lavf52.93.0
       Stream #0.0: Video: libx264, yuv420p, 960x640 [PAR 1:1 DAR 3:2], q=10-51, 200 kb/s, 90k tbn, 10 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    read pmap fffps=  3 q=37.0 size=      37kB time=0.10 bitrate=3008.0kbits/s    bits/s    
    video pid set at 100
    found sequence start
     next segment value 1026000
    written bytes 376 skipped 0
    frame=   54 fps=  2 q=-1.0 Lsize=     160kB time=5.40 bitrate= 242.0kbits/s    
    video:141kB audio:0kB global headers:0kB muxing overhead 12.872737%
    frame I:6     Avg QP:34.68  size: 23524
    [libx264 @ 0x10100d400] frame P:48    Avg QP:41.53  size:    75
    [libx264 @ 0x10100d400] mb I  I16..4: 63.9%  0.0% 36.1%
    [libx264 @ 0x10100d400] mb P  I16..4:  0.1%  0.0%  0.0%  P16..4:  0.8%  0.1%  0.0%  0.0%  0.0%    skip:99.0%
    [libx264 @ 0x10100d400] final ratefactor: 38.54
    [libx264 @ 0x10100d400] coded y,uvDC,uvAC intra: 57.7% 22.3% 2.0% inter: 0.0% 0.1% 0.0%
    [libx264 @ 0x10100d400] i16 v,h,dc,p: 23% 35% 27% 15%
    [libx264 @ 0x10100d400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 32% 16%  4%  3%  3%  7%  4%  8%
    [libx264 @ 0x10100d400] i8c dc,h,v,p: 83% 11%  5%  0%
    [libx264 @ 0x10100d400] kb/s:214.43
  • Revision 3febf9707d : Default superblock skip flag to 32x32 for skip-blocks. This is identical to the

    30 janvier 2013, par Ronald S. Bultje

    Changed Paths : Modify /vp9/encoder/vp9_rdopt.c Default superblock skip flag to 32x32 for skip-blocks. This is identical to the later decisions made in encode_superblock(). This commit doesn't actually change anything, but makes the mbmi state more consistent between the RD loop and the final (...)

  • java.lang.ExceptionInInitializerError in FFmpeg Test Demo

    16 mars 2016, par Mehul Ranpara

    I have a demo called FFMpegTest of Android which i downloaded from here..https://github.com/appunite/AndroidFFmpeg..and i also have Library file of FFMpeg which is in this demo and i am using this Library in FFmpegTest..Now when i running..it gives java.lang.ExceptionInInitializerError.. Anyone have an idea about this..please share with me..Thanx in Advance..

    which is in...VideoActivity.java

    public class VideoActivity extends Activity implements OnClickListener,FFmpegListener, OnSeekBarChangeListener, OnItemSelectedListener
    {
       private FFmpegPlayer mpegPlayer;
       private static boolean isSurfaceView = true;
       protected boolean mPlay = false;
       private View controlsView;
       private View loadingView;
       private SeekBar seekBar;
       public View videoView;
       private Button playPauseButton;
       private boolean mTracking = false;
       private View streamsView;
       private Spinner languageSpinner;
       private int languageSpinnerSelectedPosition = 0;
       private Spinner subtitleSpinner;
       private int subtitleSpinnerSelectedPosition = 0;
       private StreamAdapter languageAdapter;
       private StreamAdapter subtitleAdapter;

       private FFmpegStreamInfo audioStream = null;
       private FFmpegStreamInfo subtitleStream = null;

       @Override
       public void onCreate(Bundle savedInstanceState)
       {
           this.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
           getWindow().setFormat(PixelFormat.RGB_565);
           getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DITHER);

           super.onCreate(savedInstanceState);

           this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
           this.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
           this.getWindow().setBackgroundDrawable(null);

           this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

           if (isSurfaceView)
               VideoActivity.this.setContentView(R.layout.video_surfaceview);
           else
               VideoActivity.this.setContentView(R.layout.video_view);

           seekBar = (SeekBar) this.findViewById(R.id.seek_bar);
           seekBar.setOnSeekBarChangeListener(this);

           playPauseButton = (Button) this.findViewById(R.id.play_pause);
           playPauseButton.setOnClickListener(this);

           controlsView = this.findViewById(R.id.controls);
           streamsView = this.findViewById(R.id.streams);
           loadingView = this.findViewById(R.id.loading_view);
           languageSpinner = (Spinner) this.findViewById(R.id.language_spinner);
           subtitleSpinner = (Spinner) this.findViewById(R.id.subtitle_spinner);

           languageAdapter = new StreamAdapter(this,android.R.layout.simple_spinner_item,new ArrayList<ffmpegstreaminfo>(), StreamAdapterType.AUDIO);
           languageAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
           languageSpinner.setAdapter(languageAdapter);
           languageSpinner.setOnItemSelectedListener(this);

           subtitleAdapter = new StreamAdapter(this,android.R.layout.simple_spinner_item,new ArrayList<ffmpegstreaminfo>(), StreamAdapterType.SUBTITLE);
           subtitleAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
           subtitleSpinner.setAdapter(subtitleAdapter);
           subtitleSpinner.setOnItemSelectedListener(this);

           try
           {
               videoView = this.findViewById(R.id.video_view);
               //VideoActivity.this.mpegPlayer = new FFmpegPlayer((FFmpegDisplay)videoView, VideoActivity.this);
               this.mpegPlayer = new FFmpegPlayer((FFmpegDisplay)videoView, this);
               this.mpegPlayer.setMpegListener(this);
               setDataSource();

               //Too
           }
           catch (Exception e)
           {
               e.printStackTrace();
           }
       }

       private static enum StreamAdapterType
       {
           AUDIO, SUBTITLE
       };

       private static class StreamAdapter extends ArrayAdapter<ffmpegstreaminfo>
       {

           private final StreamAdapterType adapterType;

           public StreamAdapter(Context context, int textViewResourceId,List<ffmpegstreaminfo> objects, StreamAdapterType adapterType)
           {
               super(context, textViewResourceId, objects);
               this.adapterType = adapterType;
           }

           @Override
           public View getView(int position, View convertView, ViewGroup parent)
           {
               TextView view = (TextView) super.getView(position, convertView, parent);

               FFmpegStreamInfo item = getItem(position);
               Locale locale = item.getLanguage();

               String formatter;
               if (StreamAdapterType.AUDIO.equals(adapterType))
               {
                   formatter = getContext().getString(R.string.language_spinner_drop_down);
               }
               else
               {
                   formatter = getContext().getString(R.string.subtitle_spinner_drop_down);
               }
               String languageName = locale == null ? getContext().getString(R.string.unknown) : locale.getDisplayLanguage();
               String text = String.format(formatter, languageName);
               view.setText(text);
               return view;
           }

           @Override
           public View getDropDownView(int position, View convertView, ViewGroup parent)
           {
               CheckedTextView view = (CheckedTextView) super.getDropDownView(position, convertView, parent);
               FFmpegStreamInfo item = getItem(position);
               Locale locale = item.getLanguage();
               String languageName = locale == null ? getContext().getString(R.string.unknown) : locale.getDisplayLanguage();
               view.setText(languageName);
               return view;
           }

       }

       @Override
       protected void onPause() {
           super.onPause();
       };

       @Override
       protected void onResume() {
           super.onResume();
       }

       @Override
       protected void onDestroy()
       {
           super.onDestroy();
           this.mpegPlayer.setMpegListener(null);
           this.mpegPlayer.stop();
           stop();
       }

       private void setDataSource()
       {
           Log.d("url", "checin");
           HashMap params = new HashMap();

           // set font for ass
           File assFont = new File(Environment.getExternalStorageDirectory(),"Roboto.ttf");
           params.put("ass_default_font_path", assFont.getAbsolutePath());

           Intent intent = getIntent();
           String url = intent.getStringExtra(AppConstants.VIDEO_PLAY_ACTION_EXTRA_URL);
           Log.d("url", url);
           if (url == null)
           {
               throw new IllegalArgumentException(String.format("\"%s\" did not provided", AppConstants.VIDEO_PLAY_ACTION_EXTRA_URL));
           }
           if (intent.hasExtra(AppConstants.VIDEO_PLAY_ACTION_EXTRA_ENCRYPTION_KEY))
           {
               params.put("aeskey", intent.getStringExtra(AppConstants.VIDEO_PLAY_ACTION_EXTRA_ENCRYPTION_KEY));
           }

           this.playPauseButton.setBackgroundResource(android.R.drawable.ic_media_play);
           this.playPauseButton.setEnabled(true);
           mPlay = false;

           mpegPlayer.setDataSource(url, params, null, audioStream,subtitleStream);
       }

       @Override
       public void onClick(View v)
       {
           int viewId = v.getId();
           switch (viewId)
           {
               case R.id.play_pause:
               resumePause();
               return;

               default:
               throw new RuntimeException();
           }
       }

       @Override
       public void onFFUpdateTime(int currentTimeS, int videoDurationS, boolean isFinished)
       {
           if (!mTracking)
           {
               seekBar.setMax(videoDurationS);
               seekBar.setProgress(currentTimeS);
           }

           if (isFinished)
           {
               new AlertDialog.Builder(this)
                       .setTitle(R.string.dialog_end_of_video_title)
                       .setMessage(R.string.dialog_end_of_video_message)
                       .setCancelable(true).show();
           }
       }

       @Override
       public void onFFDataSourceLoaded(FFmpegError err, FFmpegStreamInfo[] streams)
       {
           if (err != null) {
               String format = getResources().getString(
                       R.string.main_could_not_open_stream);
               String message = String.format(format, err.getMessage());

               Builder builder = new AlertDialog.Builder(VideoActivity.this);
               builder.setTitle(R.string.app_name)
                       .setMessage(message)
                       .setOnCancelListener(
                               new DialogInterface.OnCancelListener() {

                                   @Override
                                   public void onCancel(DialogInterface dialog) {
                                       VideoActivity.this.finish();
                                   }
                               }).show();
               return;
           }
           playPauseButton.setBackgroundResource(android.R.drawable.ic_media_play);
           playPauseButton.setEnabled(true);
           this.controlsView.setVisibility(View.VISIBLE);
           this.streamsView.setVisibility(View.VISIBLE);
           this.loadingView.setVisibility(View.GONE);
           this.videoView.setVisibility(View.VISIBLE);
           languageAdapter.clear();
           subtitleAdapter.clear();
           for (FFmpegStreamInfo streamInfo : streams) {
               CodecType mediaType = streamInfo.getMediaType();
               if (FFmpegStreamInfo.CodecType.AUDIO.equals(mediaType)) {
                   languageAdapter.add(streamInfo);
               } else if (FFmpegStreamInfo.CodecType.SUBTITLE.equals(mediaType)) {
                   subtitleAdapter.add(streamInfo);
               }
           }
       }

       private void displaySystemMenu(boolean visible) {
           if (Build.VERSION.SDK_INT >= 14) {
               displaySystemMenu14(visible);
           } else if (Build.VERSION.SDK_INT >= 11) {
               displaySystemMenu11(visible);
           }
       }

       @SuppressWarnings("deprecation")
       @TargetApi(11)
       private void displaySystemMenu11(boolean visible) {
           if (visible) {
               this.videoView.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);
           } else {
               this.videoView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
           }
       }

       @TargetApi(14)
       private void displaySystemMenu14(boolean visible) {
           if (visible) {
               this.videoView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
           } else {
               this.videoView
                       .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
           }
       }

       public void resumePause() {
           this.playPauseButton.setEnabled(false);
           if (mPlay) {
               mpegPlayer.pause();
           } else {
               mpegPlayer.resume();
               displaySystemMenu(true);
           }
           mPlay = !mPlay;
       }

       @Override
       public void onFFResume(NotPlayingException result) {
           this.playPauseButton
                   .setBackgroundResource(android.R.drawable.ic_media_pause);
           this.playPauseButton.setEnabled(true);

           displaySystemMenu(false);
           mPlay = true;
       }

       @Override
       public void onFFPause(NotPlayingException err) {
           this.playPauseButton
                   .setBackgroundResource(android.R.drawable.ic_media_play);
           this.playPauseButton.setEnabled(true);
           mPlay = false;
       }

       private void stop() {
           this.controlsView.setVisibility(View.GONE);
           this.streamsView.setVisibility(View.GONE);
           this.loadingView.setVisibility(View.VISIBLE);
           this.videoView.setVisibility(View.INVISIBLE);
       }

       @Override
       public void onFFStop() {
       }

       @Override
       public void onFFSeeked(NotPlayingException result)
       {
    //      if (result != null)
    //          throw new RuntimeException(result);
       }

       @Override
       public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser)
       {
           if (fromUser)
           {
               mpegPlayer.seek(progress);
           }
       }

       @Override
       public void onStartTrackingTouch(SeekBar seekBar) {
           mTracking = true;
       }

       @Override
       public void onStopTrackingTouch(SeekBar seekBar) {
           mTracking = false;
       }

       private void setDataSourceAndResumeState() {
           int progress = seekBar.getProgress();
           setDataSource();
           mpegPlayer.seek(progress);
           mpegPlayer.resume();
       }

       @Override
       public void onItemSelected(AdapterView&lt;?> parentView,
               View selectedItemView, int position, long id) {
           FFmpegStreamInfo streamInfo = (FFmpegStreamInfo) parentView
                   .getItemAtPosition(position);
           if (parentView == languageSpinner) {
               if (languageSpinnerSelectedPosition != position) {
                   languageSpinnerSelectedPosition = position;
                   audioStream = streamInfo;
                   setDataSourceAndResumeState();
               }
           } else if (parentView == subtitleSpinner) {
               if (subtitleSpinnerSelectedPosition != position) {
                   subtitleSpinnerSelectedPosition = position;
                   subtitleStream = streamInfo;
                   setDataSourceAndResumeState();
               }
           } else {
               throw new RuntimeException();
           }
       }

       @Override
       public void onNothingSelected(AdapterView&lt;?> parentView) {
           // if (parentView == languageSpinner) {
           // audioStream = null;
           // } else if (parentView == subtitleSpinner) {
           // subtitleStream = null;
           // } else {
           // throw new RuntimeException();
           // }
           // play();
       }

    }
    </ffmpegstreaminfo></ffmpegstreaminfo></ffmpegstreaminfo></ffmpegstreaminfo>

    and this is my logcat :

    01-22 15:29:15.302: E/AndroidRuntime(1560): FATAL EXCEPTION: main
    01-22 15:29:15.302: E/AndroidRuntime(1560): java.lang.ExceptionInInitializerError
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.Class.newInstanceImpl(Native Method)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.Class.newInstance(Class.java:1319)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.os.Handler.dispatchMessage(Handler.java:99)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.os.Looper.loop(Looper.java:137)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at android.app.ActivityThread.main(ActivityThread.java:4424)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.reflect.Method.invokeNative(Native Method)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.reflect.Method.invoke(Method.java:511)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at dalvik.system.NativeStart.main(Native Method)
    01-22 15:29:15.302: E/AndroidRuntime(1560): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load ffmpeg: findLibrary returned null
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.Runtime.loadLibrary(Runtime.java:365)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at java.lang.System.loadLibrary(System.java:535)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     at roman10.ffmpegTest.VideoBrowser.<clinit>(VideoBrowser.java:37)
    01-22 15:29:15.302: E/AndroidRuntime(1560):     ... 15 more
    </clinit>