Recherche avancée

Médias (91)

Autres articles (50)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4560)

  • Gstreamer AAC encoding no more supported ?

    22 juillet 2016, par Gianks

    i’d like to include AAC as one of the compatible formats in my app but i’m having troubles with its encoding.
    FAAC seems to be missing in GStreamer-1.0 Debian-derived packages (see Ubuntu) and the main reason for that (if i got it correctly) is the presence of avenc_aac (Lunchpad bugreport) as a replacement.

    I’ve tried the following :

    gst-launch-1.0 filesrc location="src.avi" ! tee name=t  t.! queue ! decodebin ! progressreport ! x264enc ! mux. t.! queue ! decodebin ! audioconvert ! audioresample ! avenc_aac compliance=-2 ! mux. avmux_mpegts name=mux ! filesink location=/tmp/test.avi

    It hangs prerolling with :

    ERROR libav :0:: AAC bitstream not in ADTS format and extradata missing

    Using mpegtsmux instead of avmux_mpegts seems to work since the file is created but it results with no working audio (with some players it’s completely unplayable).

    This is the trace of mplayer :

    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    [aac @ 0x7f2860d6c3c0]channel element 3.15 is not allocated
    [aac @ 0x7f2860d6c3c0]Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 0x7f2860d6c3c0]Inconsistent channel configuration.
    [aac @ 0x7f2860d6c3c0]get_buffer() failed
    [aac @ 0x7f2860d6c3c0]Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.
    [aac @ 0x7f2860d6c3c0]Reserved bit set.
    [aac @ 0x7f2860d6c3c0]Number of bands (20) exceeds limit (14).
    [aac @ 0x7f2860d6c3c0]invalid band type
    [aac @ 0x7f2860d6c3c0]More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x7f2860d6c3c0]Reserved bit set.
    [aac @ 0x7f2860d6c3c0]Number of bands (45) exceeds limit (28).
    Unknown/missing audio format -> no sound
    ADecoder init failed :(
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    FAAD: compressed input bitrate missing, assuming 128kbit/s!
    AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/9.07% (ratio: 16000->176400)
    Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
    ==========================================================================
    AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
    Starting playback...
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Channel coupling not yet implemented, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: Failed to decode frame: Bitstream value not allowed by specification
    Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
    VO: [vdpau] 640x480 => 640x480 Planar YV12
    A:3602.2 V:3600.0 A-V:  2.143 ct:  0.000   3/  3 ??% ??% ??,?% 0 0
    FAAD: error: Array index out of range, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Unexpected fill element with SBR data, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Bitstream value not allowed by specification, trying to resync!
    FAAD: error: Channel coupling not yet implemented, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: error: PCE shall be the first element in a frame, trying to resync!
    FAAD: error: Invalid number of channels, trying to resync!
    FAAD: Failed to decode frame: Invalid number of channels
    A:3602.2 V:3600.1 A-V:  2.063 ct:  0.000   4/  4 ??% ??% ??,?% 0 0

    These the messages produced by VLC (10 seconds of playback) :

    ts info: MPEG-4 descriptor not found for pid 0x42 type 0xf
    core error: option sub-original-fps does not exist
    subtitle warning: failed to recognize subtitle type
    core error: no suitable demux module for `file/subtitle:///tmp//test.avi.idx'
    avcodec info: Using NVIDIA VDPAU Driver Shared Library 361.42 Tue Mar 22 17:29:16 PDT 2016 for hardware decoding.
    core warning: VoutDisplayEvent 'pictures invalid'
    core warning: VoutDisplayEvent 'pictures invalid'
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio warning: ADTS CRC not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: ADTS CRC not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio warning: Invalid ADTS header
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported
    packetizer_mpeg4audio error: Multiple blocks per frame in ADTS not supported

    Using the error of the hanging pipeline I’ve finally discovered that avenc_aac should be told in such way to output the data NOT in RAW AAC but in ADTS AAC, the point is that i’ve no idea how to do that with Gstreamer. See here, bottom of the page : FFMPEG Ticket

    At this point since i’ve found no documentation seems right to say we have no support for AAC encoding in GStreamer... which isn’t true, i guess ! (IMHO anyway seems strange the missing of FAAC if AVENC_AAC requires all the time to be set in experimental mode)

    Can someone propose a working pipeline for this ?

    UPDATE

    After some more research i’ve found (via gst-inspect on avenc_aac) what i’m probably looking for but i don’t know how to setup it as needed.
    Have a look at stream-format :

    Pad Templates:
     SRC template: 'src'
       Availability: Always
       Capabilities:
         audio/mpeg
                  channels: [ 1, 6 ]
                      rate: [ 4000, 96000 ]
               mpegversion: 4
             stream-format: raw
           base-profile: lc

    Thanks

  • ffmpeg scale, how to crop correctly

    23 mars 2015, par sathia

    I’m using this command to encode videos

    $transcode = FFMPEG_BINARY.' -loglevel panic -y -i "'.$files['original'].'" -vf scale='.VIDEO_SIZE_X.':'.VIDEO_SIZE_Y.' -vcodec libx264 -profile main -preset slow -r 25 -b '.VIDEO_BITRATE.' -maxrate '.VIDEO_BITRATE.' -bufsize 1000k -threads '.VIDEO_THREADS.' -acodec aac -ar 44100 -f mp4 -strict -2 '.$files['mp4'];

    where: VIDEO_SIZE_X = 640 and VIDEO_SIZE_Y = 480, VIDEO_BITRATE = 900k

    it all seems to work fine, but the problem I’m having is that the video is not resized to the desired size which is 640x480

    output from vlc

    ^ This is the output from vlc

    It looks like there’s some reference to the desired size, but the video is not scaled/cropped,
    what’s the correct way of scaling videos in order to have the desired size ? I don’t mind having black stripes above and below or bands at the sides.

    so, here’s a bit of debugging as requested :

    /usr/bin/ffmpeg -loglevel panic -y -i "in.wmv" -vf scale=640:480 -vcodec libx264 -profile main -preset slow -r 25 -b 900k -maxrate 900k -bufsize 1000k -threads 8 -acodec aac -ar 44100 -f mp4 -strict -2 out.mp4

    original video :

    [wmv3 @ 0x13245c0] Extra data: 8 bits left, value: 20
    Input #0, asf, from 'in.wmv':
     Metadata:
       WMFSDKVersion   : 12.0.9600.16384
       WMFSDKNeeded    : 0.0.0.0000
       IsVBR           : 1
       VBR Peak        : 313
       Buffer Average  : 397
     Duration: 00:06:09.13, start: 0.000000, bitrate: 2111 kb/s
       Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, 2 channels, s16, 96 kb/s
       Stream #0:1: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 860x484, 2000 kb/s, SAR 1:1 DAR 215:121, 29.97 tbr, 1k tbn, 1k tbc
    [wmv3 @ 0x13245c0] Extra data: 8 bits left, value: 20

    while the result is :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf54.29.104
     Duration: 00:06:08.76, start: 0.000000, bitrate: 975 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 645:484 DAR 215:121], 842 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 125 kb/s
       Metadata:
         handler_name    : SoundHandler

    cheers

  • Revision c8ed36432e : Non-uniform quantization experiment This framework allows lower quantization bi

    4 mars 2015, par Deb Mukherjee

    Changed Paths :
     Modify /configure


     Modify /vp9/common/vp9_blockd.h


     Modify /vp9/common/vp9_onyxc_int.h


     Modify /vp9/common/vp9_quant_common.c


     Modify /vp9/common/vp9_quant_common.h


     Modify /vp9/common/vp9_rtcd_defs.pl


     Modify /vp9/decoder/vp9_decodeframe.c


     Modify /vp9/decoder/vp9_detokenize.c


     Modify /vp9/encoder/vp9_block.h


     Modify /vp9/encoder/vp9_encodemb.c


     Modify /vp9/encoder/vp9_encodemb.h


     Modify /vp9/encoder/vp9_quantize.c


     Modify /vp9/encoder/vp9_quantize.h


     Modify /vp9/encoder/vp9_rdopt.c



    Non-uniform quantization experiment

    This framework allows lower quantization bins to be shrunk down or
    expanded to match closer the source distribution (assuming a generalized
    gaussian-like central peaky model for the coefficients) in an
    entropy-constrained sense. Specifically, the width of the bins 0-4 are
    modified as a factor of the nominal quantization step size and from 5
    onwards all bins become the same as the nominal quantization step size.
    Further, different bin width profiles as well as reconstruction values
    can be used based on the coefficient band as well as the quantization step
    size divided into 5 ranges.

    A small gain currently on derflr of about 0.16% is observed with the
    same paraemters for all q values.
    Optimizing the parameters based on qstep value is left as a TODO for now.

    Results on derflr with all expts on is +6.08% (up from 5.88%).

    Experiments are in progress to tune the parameters for different
    coefficient bands and quantization step ranges.

    Change-Id : I88429d8cb0777021bfbb689ef69b764eafb3a1de