Advanced search

Medias (91)

Other articles (83)

  • Configurer la prise en compte des langues

    15 November 2010, by

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Websites made ​​with MediaSPIP

    2 May 2011, by

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 April 2011, by

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things): implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

On other websites (9777)

  • FFmpeg transcoding video H.264 -> AV1 leads to distorted image

    21 June 2023, by user1584149

    I'm reading video from stdin via pipe similar to this one Python gets stuck at pipe.stdin.write(image.tostring())

    


    FFmpeg is using libsvtav1 codec with options according to documentation

    


    ffmpeg -y -f rawvideo -i pipe:0 -s {frame_width}x{frame_height} -r {frame_rate} -c:a copy -c:v libsvtav1 -preset 6 -crf 30 -svtav1-params "color-format=1:film-grain-denoise=0:mbr=2M" {output_file} 


    


    Here's couple of details about used FFmpeg version as well as input video

    


    ffmpeg version n5.1.3-14-ge5b5dd6653-20230621 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-openssl --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --disable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --disable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20230621
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, rawvideo, from 'pipe:0':
  Duration: N/A, start: 0.000000, bitrate: 331776 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 331776 kb/s, 30 tbr, 30 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> av1 (libsvtav1))
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]:   SVT-AV1 Encoder Lib v1.5.0-12-g0f8b3a81
Svt[info]: SVT [build]  :   GCC 13.1.0   64 bit
Svt[info]: LIB Build date: Jun 20 2023 23:48:14
Svt[info]: -------------------------------------------


    


    The output video transcoded by SVT-AV1 codec is blemished as you can see on the images below. Normally I would say it could be caused by wrong pixel format, but input stream has yuv420 format what is the same as encoder's pixel format parameter —color-format.

    


    Please share your experience or ideas how to get it transcoding correctly.

    


    Thanks in advance.

    


    Image 1
Image 2

    


  • FFmpeg: h264 output broken

    22 June 2023, by puaaaal

    When I try to encode anything (no -c copy) using the h264 codec, the output is broken in the sense that it can't be played by any standard player (like Windows Media Player). VLC works mostly fine, but also here I had problems, that the video did not align properly. When I use ffplay though, it works fine. When I try to play my source material, which is also encoded with h264, all those methods to play it work fine. (I use mp4 as a container for all these tests)

    


    Command to reproduce:

    


    ffmpeg -f lavfi -i "testsrc=d=10" -vcodec h264 test_h264.mp4


    


    When I use mpeg4 instead, it works fine:

    


    ffmpeg -f lavfi -i "testsrc=d=10" -vcodec mpeg4 test_mpeg4.mp4


    


    Is there something I am missing here, or might this be a bug?

    


    ffmpeg -version:

    


    ffmpeg version n6.0-22-g549430e14d-20230607 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --disable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230607
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100


    


  • problem in making HLS using ffmpeg problem

    24 June 2023, by AMZ

    I have a function do run in background and create m3u8 for some videos: (I is running in background and updating some fields in django).

    


    def convert_to_hls(episode):
    # Set the output directory for HLS files
output_dir = os.path.join(settings.MEDIA_ROOT, 'hls')
os.makedirs(output_dir, exist_ok=True)

# Set the input video file path
input_file_path = episode.videoFile.path

# Set the output filename and path for the HLS playlist
# filename = os.path.splitext(os.path.basename(input_file_path))[0]
characters = string.ascii_letters + string.digits
filename = ''.join(random.choice(characters) for _ in range(45))
playlist_path = os.path.join(output_dir, f'{filename}.m3u8')

# Set the output path for the HLS segments
segments_path = os.path.join(output_dir, f'{filename}_%05d.ts')

# Construct the ffmpeg command for HLS conversion
command = [
    'ffmpeg',
    '-i', input_file_path,
    '-c:v', 'libx264',
    '-crf', '23',
    '-preset', 'medium',
    '-c:a', 'aac',
    '-b:a', '128k',
    '-f', 'hls',
    '-hls_time', '10',
    '-hls_list_size', '0',
    '-hls_segment_filename', segments_path,
    playlist_path
]
# Execute the ffmpeg command
subprocess.run(command, check=True)

episode.hls_created = True
episode.hls_url = playlist_path.replace("/home/debian/project","")
episode.save()

return True


    


    this code works well for most of my videos but for some .mp4 files gets:

    


    [Fri Jun 23 17:05:47.511095 2023] [wsgi:error] [pid 19975:tid 140289048565504] Exception in thread Thread-1:
[Fri Jun 23 17:05:47.511198 2023] [wsgi:error] [pid 19975:tid 140289048565504] Traceback (most recent call last):
[Fri Jun 23 17:05:47.511244 2023] [wsgi:error] [pid 19975:tid 140289048565504]   File "/opt/bitnami/python/lib/python3.8/threading.py", line 932, in _bootstrap_inner
[Fri Jun 23 17:05:47.512078 2023] [wsgi:error] [pid 19975:tid 140289048565504]     self.run()
[Fri Jun 23 17:05:47.512124 2023] [wsgi:error] [pid 19975:tid 140289048565504]   File "/opt/bitnami/python/lib/python3.8/threading.py", line 870, in run
[Fri Jun 23 17:05:47.512707 2023] [wsgi:error] [pid 19975:tid 140289048565504]     self._target(*self._args, **self._kwargs)
[Fri Jun 23 17:05:47.512748 2023] [wsgi:error] [pid 19975:tid 140289048565504]   File "/home/debian/project/twapp/views/episode_backgrounds.py", line 41, in convert_to_hls
[Fri Jun 23 17:05:47.512950 2023] [wsgi:error] [pid 19975:tid 140289048565504]     subprocess.run(command, check=True)
[Fri Jun 23 17:05:47.512989 2023] [wsgi:error] [pid 19975:tid 140289048565504]   File "/opt/bitnami/python/lib/python3.8/subprocess.py", line 516, in run
[Fri Jun 23 17:05:47.513500 2023] [wsgi:error] [pid 19975:tid 140289048565504]     raise CalledProcessError(retcode, process.args,
[Fri Jun 23 17:05:47.513657 2023] [wsgi:error] [pid 19975:tid 140289048565504] subprocess.CalledProcessError: Command '['ffmpeg', '-i', '/home/debian/project/media/videos/introduction_to_raster_qBhrnAx.mp4', '-c:v', 'libx264', '-crf', '23', '-preset', 'medium', '-c:a', 'aac', '-b:a', '128k', '-f', 'hls', '-hls_time', '10', '-hls_list_size', '0', '-hls_segment_filename', '/home/debian/project/media/hls/ZN3fsJVEfTDEc8MFb5DrP7Y34JFNLj0hfWnGRZAwFdjuG_%05d.ts', '/home/debian/project/media/hls/ZN3fsJVEfTDEc8MFb5DrP7Y34JFNLj0hfWnGRZAwFdjuG.m3u8']' returned non-zero exit status 1.


    


    Also it does not work for .MOV files.