Recherche avancée

Médias (91)

Autres articles (39)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (6194)

  • How can I capture simple video input with audio from a capture device

    17 décembre 2020, par Geoff Sweet

    I'm using ffmpeg on Arch linux and trying to convert some old video to digital. The setup is pretty straightforward and if I connect to the capture device with VLC I get the video and audio just fine. So now I want to capture that with ffmpeg and write it to a file so I can edit it and clean it up. I'm only so-so familiar with ffmpeg and I've been digging through the man pages and here is where I am at.

    


    This command captures perfect audio, but no video :

    


    ffmpeg -f alsa -ac 2 -i front:CARD=Capture,DEV=0 out.mpeg


    


    This command captures perfect video ;

    


    ffmpeg -f video4linux2 -i /dev/video0 out.mpeg


    


    captures the video signal great, but with no audio. So combining them together should give me :

    


    ffmpeg -y -f alsa -ac 2 -i front:CARD=Capture,DEV=0 -f video4linux2 -i /dev/video0 out.mpeg


    


    But that command kinda falls on it's face. I get the audio, but no video :

    


    ffmpeg -y -f alsa -ac 2 -i front:CARD=Capture,DEV=0 -f video4linux2 -i /dev/video0 out.mpeg
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'front:CARD=Capture,DEV=0':
  Duration: N/A, start: 1608093176.894565, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x56248fe0ab80] Dequeued v4l2 buffer contains corrupted data (0 bytes).
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 0.000000, bitrate: 995328 kb/s
    Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x56248fe0ab80] Dequeued v4l2 buffer contains corrupted data (0 bytes).
    Last message repeated 30 times
[alsa @ 0x56248fdb3840] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpeg @ 0x56248fe0dfc0] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out.mpeg':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: mpeg1video, yuv420p(progressive), 1920x1080, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.91.100 mpeg1video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
    Metadata:
      encoder         : Lavc58.91.100 mp2
frame=    2 fps=0.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=2.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=1.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=1.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.8 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.7 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.6 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.5 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/s[video4linux2,v4l2 @ 0x56248fe0ab80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=0 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=2020 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=4061 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=6102 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=8143 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=10184 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=12225 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=14266 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=16307 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=18348 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=20389 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=22430 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=24471 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=26512 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=28553 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=30594 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=32635 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=34676 size=36451
frame=    2 fps=0.1 q=2.0 Lsize=    1470kB time=01:48:49.30 bitrate=   1.8kbits/s speed= 221x    
video:63kB audio:1388kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.314351%
Exiting normally, received signal 2.


    


    what I would ideally like is just a fairly raw 2ch stereo "dump" of what comes through the capture card.

    


    As always, I super appreciate any advice

    


  • How to use qt-faststart in ffmpeg arguments while merging 2 flv files into 1 mp4 format

    21 novembre 2014, par Mohsin Sharpen

    I want to do Pseudo Streaming of an mp4 file generated from 2 different flvs. For that I am using qt-faststart tool in ffmpeg. My generated file is according to my requirement but still Pseudo Streaming is not working.

    Here is my code which is written in Ruby on Rail which merge 2 different flv files and then move them to the final location after generating final mp4 format.

    class VideoProcess < BaseJob
    @queue = :video_process
    @config_file = 'video_process'

    def self.perform(session_name)
       new(session_name).video_merge
    end

    def initialize(session_name)
       @session_name = session_name
       @candidate_file = "#{@session_name}candidate.flv"
       @expert_file = "#{@session_name}expert.flv"

       load_config
    end

    def video_merge()
       left_video = @config[:src_path]+@candidate_file
       right_video = @config[:src_path]+@expert_file

       unless File.exists?(left_video)
           raise "The file '#{left_video}' does not exist!"
       end

       unless File.exists?(right_video)
           raise "The file '#{right_video}' does not exist!"
       end

       prepare_output_dir @config[:dest_path]

       output_video = "#{@config[:dest_path]}#{@session_name}.#{@config[:output_ext]}"

       filter = generate_filter

       args = strip_spaces %Q|
           -i "#{left_video}"
           -i "#{right_video}"
           -filter_complex "#{filter}"
           -map “[left+right]”
           -y
           -movflags faststart
           #{@config[:output_format]}
           #{output_video}
       |

       command = "#{@config[:command]} #{args} 2>&1" #2>&1 - move error to output

       output = `#{command}`

       puts output

       unless $?.success?
           raise output
       end

       Resque.enqueue(FileMove, output_video)

       #File.delete left_video, right_video

    end

    def generate_filter
       strip_spaces %Q!
           nullsrc=size=1040x400 [background];[0:v] setpts=PTS-STARTPTS,
           scale=520x400[left];[1:v]setpts=PTS-STARTPTS,scale=520x400[right];
           [background][left]overlay=shortest=1[background+left];
           [background+left][right]overlay=shortest=1:x=520 [left+right];
           [0:1] [1:1] amerge
       !
    end

    def load_config
       super
       @config.merge!({
           command: @config[:ffmpeg],
           padding: @config[:video_w] + @config[:video_space],
           overlay: @config[:video_w] * 2 + @config[:video_space]
       })
    end
    # Strip multi spaces to one and remove new line symbol
    def strip_spaces(string)
       string.gsub("\n",'').gsub(/\s+/, ' ').strip!
    end

    end

    Can some one see my code and check if I have set the flag -movflags faststart properly or I need to do something else.

    I am stuck badly as I am not good at ruby on rail/ffmpeg thing.
    Your help will be really appreciated for me in this regard.

  • Android IP Camera

    23 décembre 2014, par CptCattivo

    I’m looking for a good working solution to integrate an IP-Cameras video stream in my Android App. At the moment i am using the "Axis P1214-E" which has a good image quality, but i couldn’t get a "LIVE" stream from it. Either the stream is very laggy or it’s a few seconds delayed (sometimes even more) or the stream is shutting down after awhile. What i tried so far :

    • Using a SurfaceView to get the MJPEG Stream as described in this post : Android and MJPEG
      Problem : Lagging

    • Using a WebView to get the RTSP stream :

    public class MainActivity extends Activity {

            private static final String TAG = "VideoViewExample.MainActivity";
            private static final String RTSP_URL = "rtsp://ip/axis-media/media.amp";
           
           
            private VideoView videoView;
            private MediaController mediaController;

            private OnPreparedListener opl;

            private int position = 0;

           
       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);
           
           if(savedInstanceState != null)
               position = savedInstanceState.getInt("POSITION");
           
           
           videoView = (VideoView) findViewById(R.id.videoView);        
         
           
           opl = new OnPreparedListener() {
                           
                            @Override
                            public void onPrepared(MediaPlayer mp) {
                                                                   
                                    videoView.seekTo(position);
                                   
                                    if (position == 0) {
                                            videoView.start();
                                    }
                                    else {
                                           
                                            videoView.pause();
                                    }                               
                            }
                    };
           
           if (mediaController == null){
                   mediaController = new MediaController(this);
           }
           
           mediaController.setAnchorView(videoView);
           
           AsyncTask at = new AsyncTask() {

                            @Override
                            protected Void doInBackground(Void... params) {
                                    try{
                                    videoView.setMediaController(mediaController);                           
                                videoView.setVideoURI(Uri.parse(RTSP_URL));
                            } catch (Exception e) {
                                    Log.d(TAG, e.getMessage());
                            }
                                   
                            videoView.requestFocus();
                            videoView.setOnPreparedListener(opl);                       
                           
                                    return null;
                            }
                  
                    };
           at.execute();
           
       }
       
       @Override
       protected void onPause() {
           position = videoView.getCurrentPosition();
           super.onPause();
       }
       
       @Override
       public void onSaveInstanceState(Bundle outState) {
              
               super.onSaveInstanceState(outState);
               outState.putInt("POSITION", position);      
           
       }

    }

    Problem : Good video Quality, but delayed.

    • Using external frameworks like FFMPEG and GSTREAMER (Only some examples so far)
      Problem : Also very laggy and/or delayed.

    Now i’m running out of ideas to get this working. It’s very important for my Application that the stream is live and not lagging.
    I’m developing on a "Banana Pi" board with Android 4.2.2 (4.4 is possible as well).

    Does anybody know how to get this working ? Or maybe should i use an other camera ? Do you have any suggestions that would work well with android ?

    Thanks in advance

    Christian