Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (48)

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (11831)

  • capture DV video and audio with ffmpeg and dshow

    18 novembre 2016, par andrixnet

    Trying to capture video and audio from a DV camera, using ffmpeg, I got into a problem.
    Before anything, I first tried to see (and hear) with ffplay.

    ffmpeg version :

    ffplay version 3.0 Copyright (c) 2003-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100

    Getting list of DirectShow devices :
    ffplay -hide_banner -f dshow -list_devices true -i dummy

    [dshow @ 035c4240] DirectShow video devices (some may be both video and audio devices)
    [dshow @ 035c4240]  "Microsoft DV Camera and VCR" sq=    0B f=0/0
    [dshow @ 035c4240]     Alternative name "@device_pnp_\\?\avc#canon&mvx3i&camcorder&dv#5126800000850000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
    [dshow @ 035c4240] DirectShow audio devices
    [dshow @ 035c4240]  "1-ESI MAYA44 Ch12"
    [dshow @ 035c4240]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\1-ESI MAYA44 Ch12"
    [dshow @ 035c4240]  "2-ESI MAYA44 Ch34"
    [dshow @ 035c4240]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\2-ESI MAYA44 Ch34"
    [dshow @ 035c4240]  "3-ESI MAYA44 Ch1234"
    [dshow @ 035c4240]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\3-ESI MAYA44 Ch1234"
    [dshow @ 035c4240]  "Realtek HD Audio Input"
    [dshow @ 035c4240]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Realtek HD Audio Input"
    [dshow @ 035c4240]  "Realtek HD Digital input"
    [dshow @ 035c4240]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Realtek HD Digital input"
    dummy: Immediate exit requested

    I can use VLC with "Capture device" as input, selecting "Microsoft DV Camera and VCR" as video device and leaving "Default" as audio device and I get both video and audio.

    With ffmpeg I get only video stream, no audio.

    C:\>ffplay -hide_banner -f dshow -i video="Microsoft DV Camera and VCR"
    Input #0, dshow, from 'video=Microsoft DV Camera and VCR':B f=0/0
     Duration: N/A, start: 0.010035, bitrate: N/A
       Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR 16:15
    DAR 4:3], 25 tbr, 10000k tbn, 25 tbc
      0.48 M-V:  0.013 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

    I don’t know how to tell ffmpeg the equivalent of "Default" audio device as VLC recognizes it.

    Device options show there are 2 pins for video device (DV device has both video and audio) but how can I tell ffmpeg such that it captures both video and audio ?

    C:\>ffplay -hide_banner -f dshow -list_options true -i video="Microsoft DV Camera and VCR"
    [dshow @ 035c3260] DirectShow video device options (from video devices)
    [dshow @ 035c3260]  Pin "DV Vid Out" (alternative pin name "0")
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=2
    9.97
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x576 fps=25 max s=720x576 fps=25
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=2
    9.97
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x576 fps=25 max s=720x576 fps=25
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=2
    9.97
    [dshow @ 035c3260]   vcodec=dvvideo  min s=720x576 fps=25 max s=720x576 fps=25
    [dshow @ 035c3260]  Pin "DV A/V Out" (alternative pin name "1")
    video=Microsoft DV Camera and VCR: Immediate exit requested f=0/0

    Thank you.

  • ffmpeg/ffplay stream error using Windows 10

    23 juin 2018, par Alan

    I’m using Android’s screenrecord to stream the device screen via adb and pipe the
    output to ffplay 3.4. It works great using OS X via the command :

    adb shell screenecord --bit-rate=16m --output-format=h264 --size 800x600 -   | c:\bin\ffplay.exe -framerate 30 -framedrop -bufsize 60M -

    Windows 10 is a different story. I get a blurred out screen and the following stream of errors :

           ffplay version 3.4 Copyright (c) 2003-2017 the FFmpeg developers
           built with gcc 7.2.0 (GCC)
           configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
           libavutil      55. 78.100 / 55. 78.100
           libavcodec     57.107.100 / 57.107.100
           libavformat    57. 83.100 / 57. 83.100
           libavdevice    57. 10.100 / 57. 10.100
           libavfilter     6.107.100 /  6.107.100
           libswscale      4.  8.100 /  4.  8.100
           libswresample   2.  9.100 /  2.  9.100
           libpostproc    54.  7.100 / 54.  7.100
           [h264 @ 000002a5f08320c0] negative number of zero coeffs at 9 6/0
          [h264 @ 000002a5f08320c0] error while decoding MB 9 6
          [h264 @ 000002a5f08320c0] concealing 1640 DC, 1640 AC, 1640 MV errors in I frame
          [h264 @ 000002a5f08320c0] negative number of zero coeffs at 44 7
          [h264 @ 000002a5f08320c0] error while decoding MB 44 7
          [h264 @ 000002a5f08320c0] concealing 1555 DC, 1555 AC, 1555 MV errors in P frame
          [h264 @ 000002a5f08320c0] out of range intra chroma pred mode
          [h264 @ 000002a5f08320c0] error while decoding MB 12 7
          [h264 @ 000002a5f08320c0] concealing 1587 DC, 1587 AC, 1587 MV errors in P frame
          [h264 @ 000002a5f08320c0] out of range intra chroma pred mode
          [h264 @ 000002a5f08320c0] error while decoding MB 49 6
          [h264 @ 000002a5f08320c0] concealing 1600 DC, 1600 AC, 1600 MV errors in P frame
          [h264 @ 000002a5f08320c0] mb_type 260 in P slice too large at 11 11
          [h264 @ 000002a5f08320c0] error while decoding MB 11 11
          [h264 @ 000002a5f08320c0] concealing 1388 DC, 1388 AC, 1388 MV errors in P frame
          [h264 @ 000002a5f08320c0] out of range intra chroma pred mode
          [h264 @ 000002a5f08320c0] error while decoding MB 24 16
          [h264 @ 000002a5f08320c0] concealing 1125 DC, 1125 AC, 1125 MV errors in P frame
          Input #0, h264, from 'pipe:':q=    0KB vq=    0KB sq=    0B f=0/0
            Duration: N/A, bitrate: N/A    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
             Stream #0:0: Video: h264 (Baseline), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 800x600, 30 fps, 30 tbr, 1200k tbn, 60 tbc
          [h264 @ 000002a5f144e4c0] negative number of zero coeffs at 9 6
          [h264 @ 000002a5f144e4c0] error while decoding MB 9 6
          [h264 @ 000002a5f144e4c0] concealing 1640 DC, 1640 AC, 1640 MV errors in I frame
          [h264 @ 000002a5f10500a0] negative number of zero coeffs at 44 7
          [h264 @ 000002a5f10500a0] error while decoding MB 44 7
          [h264 @ 000002a5f10500a0] concealing 1555 DC, 1555 AC, 1555 MV errors in P frame
          [h264 @ 000002a5f1050840] out of range intra chroma pred mode
          [h264 @ 000002a5f1050840] error while decoding MB 12 7
          [h264 @ 000002a5f1050840] concealing 1587 DC, 1587 AC, 1587 MV errors in P frame
          [h264 @ 000002a5f0e500a0] out of range intra chroma pred mode
          [h264 @ 000001f5df14e5e0] cbp too large (51) at 43 7=    0B f=0/0
          [h264 @ 000001f5df14e5e0] error while decoding MB 43 7
          [h264 @ 000001f5df14e5e0] concealing 1556 DC, 1556 AC, 1556 MV errors in P frame
          [h264 @ 000001f5de6c9980] cbp too large (51) at 43 7=    0B f=0/0
          [h264 @ 000001f5de6c9980] error while decoding MB 43 7
          [h264 @ 000001f5de6c9980] concealing 1556 DC, 1556 AC, 1556 MV errors in P frame
          [ h264 @ 000001f5df338b20] cbp too large (51) at 18 7=    0B f=0/0
          [h264 @ 000001f5df338b20] error while decoding MB 18 7
          [h264 @ 000001f5df338b20] concealing 1581 DC, 1581 AC, 1581 MV errors in P frame
          [h264 @ 000001f5de618f20] cbp too large (60) at 30 8=    0B f=0/0
          [h264 @ 000001f5de618f20] error while decoding MB 30 8
          [h264 @ 000001f5de618f20] concealing 1519 DC, 1519 AC, 1519 MV errors in P frame
          [h264 @ 000001f5de5f9120] cbp too large (151) at 15 11   0B f=0/0
          [h264 @ 000001f5de5f9120] error while decoding MB 15 11
          [h264 @ 000001f5de5f9120] concealing 1384 DC, 1384 AC, 1384 MV errors in P frame
          [h264 @ 000001f5df14e5e0] cbp too large (51) at 17 8=    0B f=0/0
          [h264 @ 000001f5df14e5e0] error while decoding MB 17 8
          [h264 @ 000001f5df14e5e0] concealing 1532 DC, 1532 AC, 1532 MV errors in P frame

    How can I fix this ?

  • V4l2 to RTSP stream using FFmpeg library ver 5.1

    10 août 2022, par wolverin

    Trying to transcode MJPEG in /dev/video0 to H264 RTSP server

    


    The MJPEG packet is read correctly, transcoded by the procedure below without errors

    


    BUT the image is corrupted after the middle of the picture and freezes

    


    1

    


    int WriteStream()
{
    int rt = 0;
    int64_t time_start = av_gettime_relative();

    if ((rt = avcodec_send_packet(pInpCdcCtx, pInpPkt)) < 0)
        goto ERROR;

    do {
        rt = avcodec_receive_frame(pInpCdcCtx, pInpFrm);
        if (rt == AVERROR_EOF || rt == AVERROR(EAGAIN))
            break;
        else if (rt < 0)
            goto ERROR_FRM;

int64_t time_dec = av_gettime_relative();

        if (pSwsCtx) /* it is NOT USED now because it is very slow, WHY???  and pOutFrm = pInpFrm */
        {
            pOutFrm->pts = pInpFrm->pts;

            sws_scale(pSwsCtx,
                    (const uint8_t * const *) pInpFrm->data, pInpFrm->linesize, 0, pInpCdcCtx->height,
                    pOutFrm->data, pOutFrm->linesize);
        }
        else
        {
            pInpFrm->key_frame = 0;
            pInpFrm->pict_type = AV_PICTURE_TYPE_NONE;
        }

int64_t time_sws = av_gettime_relative();


        if ((rt = avcodec_send_frame(pOutCdcCtx, pOutFrm)) < 0)
            goto ERROR_FRM;

        do {
            rt = avcodec_receive_packet(pOutCdcCtx, pOutPkt);
            if (rt == AVERROR_EOF || rt == AVERROR(EAGAIN))
                break;
            else if (rt < 0)
                goto ERROR_PKT;

int64_t time_enc = av_gettime_relative();

            fprintf(stdout, "Packet size inp: %d out: %d bytes Time decode: %.2f scale: %.2f encode: %.2f transcode: %.2f ms ...\r",
                            pInpPkt->size, pOutPkt->size, (time_dec - time_start)/1000.0, (time_sws - time_dec)/1000.0, (time_enc - time_sws)/1000.0, (av_gettime_relative() - time_start)/1000.0);

            rt = av_interleaved_write_frame(pOutFmtCtx, pOutPkt);

            av_packet_unref(pOutPkt);
        } while (rt >= 0);

        av_frame_unref(pInpFrm);
    } while (rt >= 0);
    return 0;

ERROR_PKT:
    av_packet_unref(pOutPkt);
ERROR_FRM:
    av_frame_unref(pInpFrm);
ERROR:
    PrintError("Error transcoding", rt);
    return rt;
}


    


    The dump looks like this

    


    Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 20815.488118, bitrate: N/A
  Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 1000k tbn
[libx264 @ 0x14e12c0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x14e12c0] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[libx264 @ 0x14e12c0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=500 vbv_bufsize=1000 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, rtsp, to 'rtsp://127.0.0.1:554/cam':
  Stream #0:0: Video: h264, yuv422p(tv, bt470bg/unknown/unknown), 640x480, q=2-31, 500 kb/s, 30 tbr, 90k tbn


    


    The app itself is working fine

    


    ./ffmpeg -f v4l2 -input_format mjpeg -video_size 640x480 -i /dev/video0 -c:v libx264 -pix_fmt yuv422p -preset ultrafast -r 30 -b:v 500k -minrate:v 300k -maxrate:v 500k -bufsize 1000k -f rtsp -rtsp_transport udp rtsp ://192.168.36.212:554/cam

    


    maybe somehow it is necessary to set pts, dts and pkt_pos ?