Recherche avancée

Médias (1)

Mot : - Tags -/karaoke

Autres articles (73)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

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

Sur d’autres sites (9628)

  • XABE : One or more errors occurred (FFmpeg)

    22 mars 2021, par A Farmanbar

    I am trying to build video from images by below piece of code :

    


    FFmpeg.SetExecutablesPath(dir);
FFmpeg.Conversions.New()
   .BuildVideoFromImages(files)
   .SetInputFrameRate(_video.Fps)
   .SetFrameRate(_video.Fps)
   .SetPixelFormat(PixelFormat.bgr24)
   .SetOutput(dir + "\\output.mp4").Start().Wait();


    


    but I get below error

    


    System.AggregateException: One or more errors occurred. (ffmpeg version n4.3.2-160-gfbb9368226 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 9.3-win32 (GCC) 20200320&#xA;  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 --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libtwolame --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;[mjpeg @ 0000018b7067a780] bits 217 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 253 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 159 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 234 is invalid&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 2 times&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 1 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] bits 95 is invalid&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 133 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 31 is invalid&#xA;[mjpeg @ 0000018b7067a780] dqt: invalid precision&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 8 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 105 is invalid&#xA;[image2 @ 0000018b72294f80] decoding for stream 0 failed&#xA;[image2 @ 0000018b72294f80] Could not find codec parameters for stream 0 (Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2, from &#x27;C:\Users\a\AppData\Local\Temp\79b5fa99-f5a5-4788-b126-ef1549eb2086\img_%03d.jpg&#x27;:&#xA;  Duration: 00:00:00.38, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless, 29 fps, 29 tbr, 29 tbn, 29 tbc&#xA;File &#x27;C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\net5.0\output.mp4&#x27; already exists. Exiting.)&#xA; ---> Xabe.FFmpeg.Exceptions.ConversionException: ffmpeg version n4.3.2-160-gfbb9368226 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 9.3-win32 (GCC) 20200320&#xA;  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 --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libtwolame --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;[mjpeg @ 0000018b7067a780] bits 217 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 253 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 159 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 234 is invalid&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 2 times&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 1 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] bits 95 is invalid&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 133 is invalid&#xA;[mjpeg @ 0000018b7067a780] bits 31 is invalid&#xA;[mjpeg @ 0000018b7067a780] dqt: invalid precision&#xA;[mjpeg @ 0000018b7067a780] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 8 times&#xA;[mjpeg @ 0000018b7067a780] No JPEG data found in image&#xA;[mjpeg @ 0000018b7067a780] Found EOI before any SOF, ignoring&#xA;[mjpeg @ 0000018b7067a780] bits 105 is invalid&#xA;[image2 @ 0000018b72294f80] decoding for stream 0 failed&#xA;[image2 @ 0000018b72294f80] Could not find codec parameters for stream 0 (Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2, from &#x27;C:\Users\a\AppData\Local\Temp\79b5fa99-f5a5-4788-b126-ef1549eb2086\img_%03d.jpg&#x27;:&#xA;  Duration: 00:00:00.38, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: mjpeg (Progressive), none(bt470bg/unknown/unknown), lossless, 29 fps, 29 tbr, 29 tbn, 29 tbc&#xA;File &#x27;C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\net5.0\output.mp4&#x27; already exists. Exiting.&#xA;   at Xabe.FFmpeg.FFmpegWrapper.&lt;>c__DisplayClass11_0.<runprocess>b__0()&#xA;   at System.Threading.Tasks.Task`1.InnerInvoke()&#xA;   at System.Threading.Tasks.Task.&lt;>c.&lt;.cctor>b__277_0(Object obj)&#xA;   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;--- End of stack trace from previous location ---&#xA;   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&amp; currentTaskSlot, Thread threadPoolThread)&#xA;--- End of stack trace from previous location ---&#xA;   at Xabe.FFmpeg.Conversion.Start(String parameters, CancellationToken cancellationToken)&#xA;   --- End of inner exception stack trace ---&#xA;   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)&#xA;   at System.Threading.Tasks.Task.Wait()&#xA;   at ConsoleApp1.Program.Main(String[] args) in C:\Users\a\source\repos\ConsoleApp1\ConsoleApp1\Program.cs:line 79&#xA;</runprocess>

    &#xA;

  • Google Speech API returns empty result for some FLAC files, and not for the others although they have same codec and sample rate

    15 mars 2021, par Chad

    Below code is what I used to make request for transcription.

    &#xA;

    import io&#xA;from google.cloud import speech_v1p1beta1 as speech&#xA;def transcribe_file(speech_file):&#xA;    """Transcribe the given audio file."""&#xA;&#xA;    client = speech.SpeechClient()&#xA;&#xA;    encoding = speech.RecognitionConfig.AudioEncoding.FLAC&#xA;    if os.path.splitext(speech_file)[1] == ".wav":&#xA;        encoding = speech.RecognitionConfig.AudioEncoding.LINEAR16&#xA;    with io.open(speech_file, "rb") as audio_file:&#xA;        content = audio_file.read()&#xA;&#xA;    audio = speech.RecognitionAudio(content=content)&#xA;    config = speech.RecognitionConfig(&#xA;        encoding=speech.RecognitionConfig.AudioEncoding.FLAC,&#xA;        sample_rate_hertz=32000,&#xA;        language_code="ja-JP",&#xA;        max_alternatives=3,&#xA;        enable_word_time_offsets=True,&#xA;        enable_automatic_punctuation=True,&#xA;        enable_word_confidence=True,&#xA;    )&#xA;&#xA;    response = client.recognize(config=config, audio=audio)&#xA;    #print(speech_file, "Recognition Done")&#xA;    return response&#xA;

    &#xA;

    As I wrote in title, the results of response has empty list for some files, and not for some files.&#xA;They have same sample rate and codec(32000, FLAC)

    &#xA;

    Below is the result of ffprobe -i "AUDIOFILE" -show_streams for one of each cases.

    &#xA;

    Left one is empty one. The only difference is duration of file.

    &#xA;

    How can I get non empty results ?

    &#xA;

    Result of ffprobe

    &#xA;

    Edit :

    &#xA;

    Result of ffprobe show stream show format

    &#xA;

    Something not captured in one screen

    &#xA;

    Sadly, re-mux didn't work.

    &#xA;

    I used ffmpeg-git-20210225

    &#xA;

    ffbrobe result of broken one

    &#xA;

    ./ffprobe -show_streams -show_format broken.flac &#xA;ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 66.100 / 56. 66.100&#xA;  libavcodec     58.125.101 / 58.125.101&#xA;  libavformat    58. 68.100 / 58. 68.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, flac, from &#x27;broken.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:00:00.90, start: 0.000000, bitrate: 342 kb/s&#xA;  Stream #0:0: Audio: flac, 32000 Hz, mono, s16&#xA;[STREAM]&#xA;index=0&#xA;codec_name=flac&#xA;codec_long_name=FLAC (Free Lossless Audio Codec)&#xA;profile=unknown&#xA;codec_type=audio&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;sample_fmt=s16&#xA;sample_rate=32000&#xA;channels=1&#xA;channel_layout=mono&#xA;bits_per_sample=0&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/32000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=28672&#xA;duration=0.896000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=16&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;[/STREAM]&#xA;[FORMAT]&#xA;filename=broken.flac&#xA;nb_streams=1&#xA;nb_programs=0&#xA;format_name=flac&#xA;format_long_name=raw FLAC&#xA;start_time=0.000000&#xA;duration=0.896000&#xA;size=38362&#xA;bit_rate=342517&#xA;probe_score=100&#xA;TAG:encoder=Lavf58.45.100&#xA;[/FORMAT]&#xA;

    &#xA;

    ffprobe result of non_broken one

    &#xA;

    ./ffprobe -show_streams -show_format non_broken.flac &#xA;ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 66.100 / 56. 66.100&#xA;  libavcodec     58.125.101 / 58.125.101&#xA;  libavformat    58. 68.100 / 58. 68.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, flac, from &#x27;non_broken.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:00:00.86, start: 0.000000, bitrate: 358 kb/s&#xA;  Stream #0:0: Audio: flac, 32000 Hz, mono, s16&#xA;[STREAM]&#xA;index=0&#xA;codec_name=flac&#xA;codec_long_name=FLAC (Free Lossless Audio Codec)&#xA;profile=unknown&#xA;codec_type=audio&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;sample_fmt=s16&#xA;sample_rate=32000&#xA;channels=1&#xA;channel_layout=mono&#xA;bits_per_sample=0&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/32000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=27648&#xA;duration=0.864000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=16&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;[/STREAM]&#xA;[FORMAT]&#xA;filename=non_broken.flac&#xA;nb_streams=1&#xA;nb_programs=0&#xA;format_name=flac&#xA;format_long_name=raw FLAC&#xA;start_time=0.000000&#xA;duration=0.864000&#xA;size=38701&#xA;bit_rate=358342&#xA;probe_score=100&#xA;TAG:encoder=Lavf58.45.100&#xA;[/FORMAT]&#xA;

    &#xA;

    And the result of ffmpeg -f lavfi -i sine=d=0.864:r=32000 output.flac

    &#xA;

    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  WARNING: library configuration mismatch&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, lavfi, from &#x27;sine=d=0.864:r=32000&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 512 kb/s&#xA;    Stream #0:0: Audio: pcm_s16le, 32000 Hz, mono, s16, 512 kb/s&#xA;File &#x27;output.flac&#x27; already exists. Overwrite ? [y/N] y&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, flac, to &#x27;output.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Audio: flac, 32000 Hz, mono, s16, 128 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 flac&#xA;[Parsed_sine_0 @ 0x55c317ddda00] EOF timestamp not reliable&#xA;size=      16kB time=00:00:00.86 bitrate= 154.0kbits/s speed= 205x    &#xA;video:0kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 99.364586%&#xA;

    &#xA;

  • Safari on Mac and IOS 14 Won't Play HTML 5 MP4 Video

    10 mars 2021, par Glen Elkins

    So i have developed a chat application that uses node for the back-end. When a user selects a video on their iphone it usually is .mov format so when it's sent to the node server it's then converted to mp4 with ffmpeg. All that works fine, then if i load up my chat again in Chrome on my mac the video plays just fine as the mp4.

    &#xA;

    enter image description here

    &#xA;

    This screenshot shows the video embed is there, set to mp4 yet it won't play in Safari on my mac or my phone, in fact it just shows the video as 0 seconds long yet i can play it in chrome and also download the mp4 file by accessing the embed url directly.

    &#xA;

    Any ideas ? I had it convert to mp4 to prevent things like this, but safari doesn't seem to even like mp4 files.

    &#xA;

    The back-end part that serves the private file is in Symfony 4 (PHP) :

    &#xA;

    /**&#xA;     * @Route("/private/files/download/{base64Path}", name="downloadFile")&#xA;     * @param string $base64Path&#xA;     * @param Request $request&#xA;     * @return Response&#xA;     */&#xA;    public function downloadFile(string $base64Path, Request $request) : Response&#xA;    {&#xA;&#xA;&#xA;        // get token&#xA;        if(!$token = $request->query->get(&#x27;token&#x27;)){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        /** @var UserRepository $userRepo */&#xA;        $userRepo = $this->getDoctrine()->getRepository(User::class);&#xA;&#xA;        /** @var User $user */&#xA;        if(!$user = $userRepo->findOneBy([&#x27;deleted&#x27;=>false,&#x27;active&#x27;=>true,&#x27;systemUser&#x27;=>false,&#x27;apiKey&#x27;=>$token])){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        // get path&#xA;        if($path = base64_decode($base64Path)){&#xA;&#xA;            // make sure the folder we need exists&#xA;            $fullPath = $this->getParameter(&#x27;private_upload_folder&#x27;) . &#x27;/&#x27; . $path;&#xA;&#xA;&#xA;&#xA;            if(!file_exists($fullPath)){&#xA;                return new Response(&#x27;File Not Found&#x27;,404);&#xA;            }&#xA;&#xA;        &#xA;&#xA;            $response = new Response();&#xA;            $response->headers->set(&#x27;Content-Type&#x27;, mime_content_type($fullPath));&#xA;            $response->headers->set(&#x27;Content-Disposition&#x27;, &#x27;inline; filename="&#x27; . basename($fullPath) . &#x27;"&#x27;);&#xA;            $response->headers->set(&#x27;Content-Length&#x27;, filesize($fullPath));&#xA;            $response->headers->set(&#x27;Pragma&#x27;, "no-cache");&#xA;            $response->headers->set(&#x27;Expires&#x27;, "0");&#xA;            $response->headers->set(&#x27;Content-Transfer-Encoding&#x27;, "binary");&#xA;&#xA;            $response->sendHeaders();&#xA;&#xA;            $response->setContent(readfile($fullPath));&#xA;&#xA;            return $response;&#xA;        }&#xA;&#xA;        return new Response(&#x27;Invalid Path&#x27;,404);&#xA;    }&#xA;

    &#xA;

    This works fine everywhere except safari when trying to embed the video. It's done like this because the videos are not public and need an access token.

    &#xA;

    UPDATE : Here is a test link of an mp4, you'll have to allow the insecure certificate as it's on a quick test sub domain. If you open it in chrome, you'll see a 3 second video of my 3d printer curing station, if you load the same link in safari, you'll see it doesn't work

    &#xA;

    https://tester.nibbrstaging.com/private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032

    &#xA;

    The server runs on cPanel with Apache and i think it might be something to do with the video needs streaming ?

    &#xA;

    UPDATED CODE THAT WORKS IN SAFARI BUT NOW BROKEN IN CHROME :

    &#xA;

    Chrome is now giving Content-Length : 0 but it's working fine in safari.

    &#xA;

    public function downloadFile(string $base64Path, Request $request) : ?Response&#xA;    {&#xA;&#xA;        ob_clean();&#xA;&#xA;        // get token&#xA;        if(!$token = $request->query->get(&#x27;token&#x27;)){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;        &#xA;&#xA;        /** @var UserRepository $userRepo */&#xA;        $userRepo = $this->getDoctrine()->getRepository(User::class);&#xA;&#xA;        /** @var User $user */&#xA;        if(!$user = $userRepo->findOneBy([&#x27;deleted&#x27;=>false,&#x27;active&#x27;=>true,&#x27;systemUser&#x27;=>false,&#x27;apiKey&#x27;=>$token])){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        // get path&#xA;        if($path = base64_decode($base64Path)){&#xA;&#xA;            // make sure the folder we need exists&#xA;            $fullPath = $this->getParameter(&#x27;private_upload_folder&#x27;) . &#x27;/&#x27; . $path;&#xA;&#xA;&#xA;&#xA;            if(!file_exists($fullPath)){&#xA;                return new Response(&#x27;File Not Found&#x27;,404);&#xA;            }&#xA;&#xA;&#xA;            $filesize = filesize($fullPath);&#xA;            $mime = mime_content_type($fullPath);&#xA;&#xA;            header(&#x27;Content-Type: &#x27; . $mime);&#xA;&#xA;            if(isset($_SERVER[&#x27;HTTP_RANGE&#x27;])){&#xA;&#xA;                // Parse the range header to get the byte offset&#xA;                $ranges = array_map(&#xA;                    &#x27;intval&#x27;, // Parse the parts into integer&#xA;                    explode(&#xA;                        &#x27;-&#x27;, // The range separator&#xA;                        substr($_SERVER[&#x27;HTTP_RANGE&#x27;], 6) // Skip the `bytes=` part of the header&#xA;                    )&#xA;                );&#xA;&#xA;&#xA;&#xA;                // If the last range param is empty, it means the EOF (End of File)&#xA;                if(!$ranges[1]){&#xA;                    $ranges[1] = $filesize - 1;&#xA;                }&#xA;&#xA;                header(&#x27;HTTP/1.1 206 Partial Content&#x27;);&#xA;                header(&#x27;Accept-Ranges: bytes&#x27;);&#xA;                header(&#x27;Content-Length: &#x27; . ($ranges[1] - $ranges[0])); // The size of the range&#xA;&#xA;                // Send the ranges we offered&#xA;                header(&#xA;                    sprintf(&#xA;                        &#x27;Content-Range: bytes %d-%d/%d&#x27;, // The header format&#xA;                        $ranges[0], // The start range&#xA;                        $ranges[1], // The end range&#xA;                        $filesize // Total size of the file&#xA;                    )&#xA;                );&#xA;&#xA;                // It&#x27;s time to output the file&#xA;                $f = fopen($fullPath, &#x27;rb&#x27;); // Open the file in binary mode&#xA;                $chunkSize = 8192; // The size of each chunk to output&#xA;&#xA;                // Seek to the requested start range&#xA;                fseek($f, $ranges[0]);&#xA;&#xA;                // Start outputting the data&#xA;                while(true){&#xA;                    // Check if we have outputted all the data requested&#xA;                    if(ftell($f) >= $ranges[1]){&#xA;                        break;&#xA;                    }&#xA;&#xA;                    // Output the data&#xA;                    echo fread($f, $chunkSize);&#xA;&#xA;                    // Flush the buffer immediately&#xA;                    @ob_flush();&#xA;                    flush();&#xA;                }&#xA;            }else{&#xA;&#xA;                // It&#x27;s not a range request, output the file anyway&#xA;                header(&#x27;Content-Length: &#x27; . $filesize);&#xA;&#xA;                // Read the file&#xA;                @readfile($filesize);&#xA;&#xA;                // and flush the buffer&#xA;                @ob_flush();&#xA;                flush();&#xA;&#xA;&#xA;&#xA;            }&#xA;&#xA;        }else {&#xA;&#xA;            return new Response(&#x27;Invalid Path&#x27;, 404);&#xA;        }&#xA;    }&#xA;

    &#xA;

    I have notice in chrome that it's sending the range header like this :

    &#xA;

    Range : bytes=611609-

    &#xA;

    Where safari sends

    &#xA;

    Range : bytes=611609-61160

    &#xA;

    So for some reason chrome is missing the second range amount, that obviously means my code can't find a range number for the second one.

    &#xA;

    Doesn’t matter what I do I can’t get it working in both chrome and safari. Safari wants the byte range part , chrome seems to request it then sends a new request for the full file but even the full file part of the code gives a 500 error. If I take out the byte range bit then it works fine in chrome but not safari.

    &#xA;

    UPDATE :

    &#xA;

    Here is some strange things going on in chrome :

    &#xA;

    For the video i am testing with it makes 3 range requests :

    &#xA;

    REQUEST 1 HEADERS - asking for bytes 0- (to the end of the file)

    &#xA;

    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1&#xA;&#xA;Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=0-&#xA;

    &#xA;

    RESPONSE GIVES IT BACK ALL THE BYTES IN THE FILE AS THAT'S WHAT WAS ASKED FOR BY CHROME :

    &#xA;

    HTTP/1.1 206 Partial Content&#xA;Date: Wed, 10 Mar 2021 12:35:54 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Content-Length: 611609&#xA;Content-Range: bytes 0-611609/611610&#xA;Vary: User-Agent&#xA;Keep-Alive: timeout=5, max=100&#xA;Connection: Keep-Alive&#xA;Content-Type: video/mp4&#xA;

    &#xA;

    SECOND REQUEST HEADERS : NOW IT'S ASKING FOR 589824 to the end of the file :

    &#xA;

    Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=589824-&#xA;

    &#xA;

    RESPONSE OBLIGES :

    &#xA;

    HTTP/1.1 206 Partial Content&#xA;Date: Wed, 10 Mar 2021 12:35:55 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Content-Length: 21785&#xA;Content-Range: bytes 589824-611609/611610&#xA;Vary: User-Agent&#xA;Keep-Alive: timeout=5, max=99&#xA;Connection: Keep-Alive&#xA;Content-Type: video/mp4&#xA;

    &#xA;

    THEN IT'S MAKING THIS 3rd REQUEST THAT GIVES AN INTERNAL SERVER ERORR, THIS TIME IT'S LITERALLY ASKING FOR THE LAST BYTE :

    &#xA;

    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1&#xA;&#xA;Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=611609-&#xA;

    &#xA;

    RESPONSE - THE CONTENT LENGTH IS 0 BECAUSE THERE IS NO DIFFERENCE BETWEEN THE REQUESTED BYTES AND THE BYTES RETURNED :

    &#xA;

    HTTP/1.1 500 Internal Server Error&#xA;Date: Wed, 10 Mar 2021 12:35:56 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Cache-Control: max-age=0, must-revalidate, private&#xA;X-Frame-Options: DENY&#xA;X-XSS-Protection: 1&#xA;X-Content-Type-Options: nosniff&#xA;Referrer-Policy: origin&#xA;Strict-Transport-Security: max-age=31536000; includeSubDomains&#xA;Expires: Wed, 10 Mar 2021 12:35:56 GMT&#xA;Content-Length: 0&#xA;Content-Range: bytes 611609-611609/611610&#xA;Vary: User-Agent&#xA;Connection: close&#xA;Content-Type: text/html; charset=UTF-8&#xA;

    &#xA;