Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (56)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (6238)

  • Surfaceview for subtitles alpha does not work

    27 mai 2018, par user654628

    Goal : trying to build video player with subtitles for android. Video can be low resolution but the subtitles should be resolution of phone (such that if video is 720p, the subtitles should render to screen size say 1080p).

    Issue : I am using FFMPEG to render a frame at say 720p but phone device is 1080p. I need to display subtitles that are different resolution than the subtitles resolution so pixel blending is difficult.

    I first tried to scale the frame (AVFrame) with sws_convert but each frame took 80ms so that is not an option (since it is running software).

    Then I tried two surface views, one for the video and one for subtitles where video would be 720p and subtitles SurfaceView is 1080p, then the video scales up to the phone size. The issue here is that the subtitles are not translucent. Black opacity 0 would be transparent but white with alpha 0 is still white. Why is this ?

    //Code from Java, the view that extends FrameLayout
    public VideoView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
       super(context, attrs, defStyleAttr);
       mVideoSurface = new SurfaceView(context);
       mSubtitlesSurface = new SurfaceView(context);
       addView(mVideoSurface);
       addView(mSubtitlesSurface);
       mVideoSurface.getHolder().addCallback(mSurfaceCallback);
       mSubtitlesSurface.getHolder().addCallback(mSurfaceCallback);
       mSubtitlesSurface.setZOrderMediaOverlay(true);
       mSubtitlesSurface.getHolder().setFormat(PixelFormat.TRANSLUCENT);
       //etc
    }

    Eventually I tried as a test to render a square to the subtitle surface view (C++)

    // Render the video frame, now render the subtitle frame
    ANativeWindow_Buffer buffer;
    ANativeWindow_setBuffersGeometry(subWindow, width, height, WINDOW_FORMAT_RGBA_8888);
    if ((ret = ANativeWindow_lock(subWindow, &buffer, NULL)) < 0) {
       return ret;
    }
    for (int j = height/2; j < height/2 + 100; j++) {
       for (int i = width/2; i < width/2 + 100; i++) {
           uint8_t * d =  (uint8_t*)buffer.bits + j * (buffer.stride * 4) + i * 4;
           d[0] = 0xff;
           d[1] = 0xff;
           d[2] = 0xFF;
           d[3] = 0;           /* alpha */

       }
    }
    ANativeWindow_unlockAndPost(subWindow);

    So above code should render a white square in the image with 0 alpha (so should be invisible), but it is shown. If I change it to yellow with alpha 0 it will be visible but not the correct color. If I change to white with 1 alpha, it is white and opaque. If I use black with alpha 0xCC, it is invisible, only if alpha is 0xFF then it is visible as black. Seems to have no translucency even though I added it to the SurfaceHolder. Why is it like this ? I can add more code if needed.

    Is my only option to do what I want to render frame as a texture in OpenGL and (GLSurfaceView), resize the image to phone resolution and blend the alpha subtitles onto the frame as a texture ?

    Thanks in advance.

  • NVENC_HEVC Encoding making my files larger

    9 novembre 2016, par Alan

    I got a new Nvidia GPU to speed up my video encoding. I am working with x264 files to x265 and wanted to go faster. Using the library libx265 I am getting about 85fps when working on a file that is 720p, but if I use the nvenc_hevc I get around 600-700fps

    My input file is 269M and when I use the nvenc_hevc it grows to 394M. Doing the exact same command with libx265 gives me a file size of only 68M. Obviously I would like to keep the low file size, but take advantage of the GPU to process it 15X faster.

    Anyone else have any experience with this video codec ?

    My command is : ffmpeg -i infile.avi -c:v nvenc_hevc -rc vbr_2pass -rc-lookahead 20 -gpu any out7.mp4

    vs

    ffmpeg -i infile.avi -c:v libx265 -rc vbr_2pass -rc-lookahead 20 -gpu any out7.mp4

  • ffmpeg conversion results in different number of frames. How to fix corrupted frames ?

    19 mai 2022, par Mike Azatov

    I have used ffmpeg -i original_video.mp4 -vcodec libx265 -crf 28 -vsync 0 -vf scale=800:-1 -preset faster small_video.mp4 for awhile without problem to make a smaller sized video that is completely in sync with the original one.

    


    However, I came across one that after conversion has 44 frames less. My guess is this happens because there are 44 corrupted frames in the original one that gets discarded. If that is the case I would like to either "correct" the original one and then proceed with the conversion the same old way OR/AND convert so the corrupted frames are not skipped but are replaced with the good ones so the videos are still in full sync.

    


    Below is the log from conversion :

    


    ffmpeg -i original_video.ts -vcodec libx265 -crf 28 -vsync 0 -vf scale=800:-1 -preset faster small_video.mp4
ffmpeg version 2021-08-01-git-1f58503013-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  3.100 / 57.  3.100
  libavcodec     59.  3.102 / 59.  3.102
  libavformat    59.  4.101 / 59.  4.101
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  1.103 /  8.  1.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f14d40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f14d40] Increasing reorder buffer to 2
Input #0, mpegts, from 'original_video.ts':
  Duration: 01:44:24.42, start: 1.560000, bitrate: 10059 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
  Stream #0:1[0x101](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 000001cd28f81bc0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f81bc0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd28f82680] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f82680] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd28dab1c0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28dab1c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
x265 [info]: HEVC encoder version 3.5+11-c8905a745
x265 [info]: build info [Windows][GCC 10.3.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 2 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: fast-intra strong-intra-smoothing deblock sao
Output #0, mp4, to 'small_video.mp4':
  Metadata:
    encoder         : Lavf59.4.101
  Stream #0:0: Video: hevc (hev1 / 0x31766568), yuv420p(tv, bt709, top coded first (swapped)), 800x450 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn
    Metadata:
      encoder         : Lavc59.3.102 libx265
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(rus): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc59.3.102 aac
[h264 @ 000001cd273dd4c0] mmco: unref short failure53:36.81 bitrate= 770.6kbits/s speed=2.46x
    Last message repeated 1 times
[h264 @ 000001cd273dd4c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f52400] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[mp4 @ 000001cd26fce940] Non-monotonous DTS in output stream 0:0; previous: 62929920, current: 62929920; changing to 62929921. This may result in incorrect timestamps in the output file.
[h264 @ 000001cd28dab1c0] mmco: unref short failure:23:07.54 bitrate= 774.1kbits/s speed= 2.5x
    Last message repeated 1 times
[h264 @ 000001cd28dab1c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f0e6c0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd28f82280] mmco: unref short failure:23:10.63 bitrate= 773.6kbits/s speed= 2.5x
    Last message repeated 1 times
[h264 @ 000001cd28f82280] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 000001cd26f52400] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 000001cd26f52000] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
original_video.ts: corrupt decoded frame in stream 0
    Last message repeated 1 times
[mp4 @ 000001cd26fce940] Non-monotonous DTS in output stream 0:0; previous: 64523776, current: 64523776; changing to 64523777. This may result in incorrect timestamps in the output file.
frame=156566 fps= 68 q=35.9 Lsize=  598731kB time=01:44:24.44 bitrate= 783.0kbits/s speed=2.72x
video:492857kB audio:101295kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.770682%
x265 [info]: frame I:    688, Avg QP:27.50  kb/s: 4942.18
x265 [info]: frame P:  30767, Avg QP:28.35  kb/s: 2054.94
x265 [info]: frame B: 125111, Avg QP:34.64  kb/s: 273.26
x265 [info]: Weighted P-Frames: Y:7.7% UV:5.6%
x265 [info]: consecutive B-frames: 0.4% 0.1% 0.1% 0.1% 99.3%

encoded 156566 frames in 2300.41s (68.06 fps), 643.89 kb/s, Avg QP:33.37
[aac @ 000001cd27540480] Qavg: 462.740