Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (63)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (7327)

  • FFmpeg : h264 output broken

    22 juin 2023, par 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


    


  • ffmpeg mp3 chunk to wav chunk adds gap in the start of the audio

    13 décembre 2023, par 1Mayur

    I have an mp3 streaming from a URL, I save the chunks in 1024 byes buffer size.
After I get all the chunks, I'm using ffmpeg to convert the incoming mp3 chunk (22050 mono) to a wav chunk.

    


    When I open/play the wav chunk I see that there is an empty gap at the start of every chunk.

    


    here is the code I'm running in Python subprocess in a loop for all the saved chunks

    


    subprocess.run(["ffmpeg", "-i",
    f"{Path.cwd()}/input/{path}",
    f"{Path.cwd()}/temp_output/{path.replace('.mp3', '')}.wav"
])


    


    here is the output in the terminal

    


    processing: test-016.mp3
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.0.40.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  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
[mp3 @ 0x7fd48e104480] Format mp3 detected only with low score of 25, misdetection possible!
[mp3 @ 0x7fd48e104480] Skipping 463 bytes of junk at 0.
[mp3 @ 0x7fd48e104480] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/Users/mayur/Projects/input/test-016.mp3':
  Duration: 00:00:00.39, start: 0.000000, bitrate: 169 kb/s
  Stream #0:0: Audio: mp3, 22050 Hz, mono, fltp, 160 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/Users/mayur/Projects/temp_output/test-016.wav':
  Metadata:
    ISFT            : Lavf60.3.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
    Metadata:
      encoder         : Lavc60.3.100 pcm_s16le
size=      17kB time=00:00:00.36 bitrate= 379.7kbits/s speed= 253x    
video:0kB audio:17kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.451389%


    


    I tried the pydub as well and faced similar issue.

    


  • ffmpeg ignores set bitrate

    13 mars 2023, par col__panic

    I have a folder of h264 files I am trying to convert to hevc with a lower bitrate set with -b:v flag. For context I am using python running in a Docker container. The issue is that when ffmpeg completes, the output bitrate is extremely low.

    


    As you can see from the ffmpeg command below, I am expecting around 900k bitrate. But as the command runs, it shows around 18k bitrate.

    


    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i /tmp/input.ts -an -c:v hevc_nvenc -b:v 914k -b_ref_mode 0 -tag:v hvc1 /tmp/output.mp4 
ffmpeg version N-109685-gac37b2c2b1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
  libavutil      57. 44.100 / 57. 44.100
  libavcodec     59. 58.100 / 59. 58.100
  libavformat    59. 36.100 / 59. 36.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 54.100 /  8. 54.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
-vsync is deprecated. Use -fps_mode
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
Input #0, mpegts, from '/tmp/input.ts':
  Duration: 01:04:53.85, start: 85937.219044, bitrate: 2613 kb/s
  Program 1 
  Stream #0:0[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720, 90k tbr, 90k tbn
  Stream #0:1[0x202]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Press [q] to stop, [?] for help
Output #0, mp4, to '/tmp/output.mp4':
  Metadata:
    encoder         : Lavf59.36.100
  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), cuda(progressive), 1280x720, q=2-31, 914 kb/s, 90k fps, 90k tbn
    Metadata:
      encoder         : Lavc59.58.100 hevc_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/914000 buffer size: 1828000 vbv_delay: N/A
frame=113118 fps=412 q=49.0 Lsize=    8925kB time=01:04:53.82 bitrate=  18.8kbits/s speed=14.2x    
video:8215kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.636624%


    


    And then checking the output shows that it is around 18kb/s.

    


    ffmpeg -i /tmp/output.mp4 
...
  Duration: 01:04:53.82, start: 0.000000, bitrate: 18 kb/s


    


    For reference the input file is 2600kb/s.

    


    ffmpeg -i /tmp/input.ts 
...
  Duration: 01:04:53.85, start: 85937.219044, bitrate: 2613 kb/s



    


    This seems like an issue with the file itself, given that I have run the same command and had it work. Also note that even when I leave out the -b:v flag, the output is about the same.

    


    I have tried setting -minrate:v -maxrate:v -bufsize:v and -ss 00:00:00 flags as well and they did not help.

    


    Also there was another post that mentioned the audio track being an issue and to rule that out, I tried using -an and that didn't help either.

    


    I saw another post that mentioned the order of the parameters being an issue but I don't think that's the issue because this same command has run successfully on other input files.

    


    Any ideas ?

    


    EDIT :
nvm fixed it