Advanced search

Medias (91)

Other articles (104)

  • Encoding and processing into web-friendly formats

    13 April 2011, by

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Gestion de la ferme

    2 March 2010, by

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 March 2010, by

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3); le plugin champs extras v2 nécessité par (...)

On other websites (10861)

  • ffmpeg encoding .mp4 fails in safari when hosted from s3. handbrake encoded video works first time

    11 June 2018, by Simon Rogers

    The mp4 videos I’ve encoded with ffmpeg work perfectly in Safari if stored locally, but break if hosted from s3. I have tried countless encoding settings to no avail.

    However having just run a mov quickly through Handbrake and ticking ’optimise for web’ and encoding baseline @ 4.0, this has worked perfectly first time.

    I don’t understand what could be going wrong with my ffmpeg encoding.

    Things I have noticed about files from two separate encoders which work:

    They both have yuv420p(tv, bt709) whereas ffmpeg is just saying yuv420p – this is the only thing I can identify from ffprobe that is consistently different.

    I have done a fresh install of ffmpeg to no avail:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass  --with-libvorbis --with-libvpx --with-opus --with-x265

    This error appears in all the files I have encoded with ffmpeg:

    Unsupported codec with id 0 for input stream 1

    ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

    mp4box gives the following for the ffmpeg video, which doesn’t work:

    Tempuras-iMac:tests tempura$ mp4box -info /Users/tempura/tests/mov-output-10-1400.mp4
    * Movie Info *
    Timescale 1000 - 1 track
    Computed Duration 00:00:10.967 - Indicated Duration 00:00:10.967
    Fragmented File: no
    File suitable for progressive download (moov before mdat)
    File Brand isom - version 512
       Compatible brands: isom iso2 avc1 mp41
    Created: UNKNOWN DATE   Modified: UNKNOWN DATE
    File has no MPEG4 IOD/OD

    iTunes Info:
    Encoder Software: Lavf58.12.100
    1 UDTA types: meta (1)

    Track # 1 Info - TrackID 1 - TimeScale 15360
    Media Duration 00:00:10.966 - Indicated Duration 00:00:10.966
    Track has 1 edit lists: track duration is 00:00:10.967
    Media Info: Language "English (eng)" - Type "vide:avc1" - 329 samples
    Visual Track layout: x=0 y=0 width=1800 height=1200
    MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 1800 x 1200
    AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 4
    NAL Unit length bits: 32
    Pixel Aspect Ratio 1:1 - Indicated track size 1800 x 1200
    Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
    SPS#1 hash: 2BD106A8DFD73B92825D87D4D312B22F9CEC1986
    PPS#1 hash: 656AE5F3BE854F3C8B889E72310662390F18EDBD
    Self-synchronized
    RFC6381 Codec Parameters: avc1.42C028
    Average GOP length: 329 samples

    And gives the following for two videos that do work.

    First:

    Tempuras-iMac:tests tempura$ mp4box -info /Users/tempura/tests/mov-output-05-1400.mp4
    [iso file] Unknown box type tmcd
    [iso file] Read Box type  (0x00000000) has size 0 but is not at root/file level, skipping
    * Movie Info *
    Timescale 1000 - 2 tracks
    Computed Duration 00:00:10.967 - Indicated Duration 00:00:10.967
    Fragmented File: no
    File suitable for progressive download (moov before mdat)
    File Brand isom - version 512
       Compatible brands: isom iso2 avc1 mp41
    Created: UNKNOWN DATE   Modified: UNKNOWN DATE
    File has no MPEG4 IOD/OD

    iTunes Info:
    Encoder Software: Lavf58.12.100
    1 UDTA types: meta (1)

    Track # 1 Info - TrackID 1 - TimeScale 15360
    Media Duration 00:00:10.966 - Indicated Duration 00:00:10.966
    Track has 1 edit lists: track duration is 00:00:10.967
    Media Info: Language "English (eng)" - Type "vide:avc1" - 329 samples
    Visual Track layout: x=0 y=0 width=1800 height=1200
    MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 1800 x 1200
    AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 4
    NAL Unit length bits: 32
    Pixel Aspect Ratio 1:1 - Indicated track size 1800 x 1200
    Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
    SPS#1 hash: 39D86732FD5F78B18F2E83C651FAE38EA0E30A6D
    PPS#1 hash: 656AE5F3BE854F3C8B889E72310662390F18EDBD
    Self-synchronized
    RFC6381 Codec Parameters: avc1.42C028
    Average GOP length: 329 samples

    Track # 2 Info - TrackID 2 - TimeScale 15360
    Media Duration 00:00:10.966 - Indicated Duration 00:00:10.966
    Track has 1 edit lists: track duration is 00:00:10.967
    Track is disabled
    Media Info: Language "Undetermined (und)" - Type "tmcd:tmcd" - 1 samples
    Unknown media type
    RFC6381 Codec Parameters: tmcd
    All samples are sync

    Second:

    Tempuras-iMac:tests tempura$ mp4box -info /Users/tempura/Documents/yes_2106.mp4
    * Movie Info *
    Timescale 30000 - 1 track
    Computed Duration 00:00:10.966 - Indicated Duration 00:00:10.966
    Fragmented File: no
    File suitable for progressive download (moov before mdat)
    File Brand isom - version 1
       Compatible brands: isom avc1 mp42
    Created: GMT Fri Jun  1 11:24:54 2018
    Modified: GMT Fri Jun  1 11:24:54 2018

    File has root IOD (9 bytes)
    Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
    Visual PL: ISO Reserved Profile (0x15)
    Audio PL: No audio capability required (0xff)
    No streams included in root OD

    Track # 1 Info - TrackID 1 - TimeScale 30
    Media Duration 00:00:10.966 - Indicated Duration 00:00:10.966
    Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 329 samples
    Visual Track layout: x=0 y=0 width=1800 height=1200
    MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 1800 x 1200
    AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 4.2
    NAL Unit length bits: 32
    Pixel Aspect Ratio 1:1 - Indicated track size 1800 x 1200
    Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
    SPS#1 hash: ED5CFE0A3F65F36ADCFA347C1273A29784E8AEAC
    PPS#1 hash: 7ECF7597FDDAC5F8C82B54BFB40A1F9A8D8807FA
    Self-synchronized
    RFC6381 Codec Parameters: avc1.42C02A
    Average GOP length: 329 samples
  • ffmpeg combining mp4 videos incorrectly

    9 June 2018, by wdsfds

    i have a list of 20 mp4 files that I need to combine into one video. They are all 60 FPS, but range in size. In between each mp4 file I need to show its ’intro’, a 1.5 second clip about the file.

    Reference:

    • pics/i.png - intro for the nth mp4 file
    • clips/i_intro.mp4 - mp4 intro generated from i.png
    • clips/i.mp4 - original mp4
    • clips/i_resize.mp4 - 720p mp4

    Here is what I’ve done:

    Convert image to mp4 using this command (taken from this post):

    ffmpeg -y -i pics/{i}.png -f lavfi -i anullsrc -r 60 -pix_fmt yuv420p -ac 2 -ar 44100 -video_track_timescale 90k -t 1.5 clips/{i}_intro.mp4

    Convert i.mp4 to 720p using this command (taken from this post):

    ffmpeg -i clips/{i}.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -vf scale=-2:720,format=yuv420p {i}_resize.mp4

    Created a file like this:

    file 1_intro.mp4
    file 1_resize.mp4
    file 2_intro.mp4
    file 2_resize.mp4
    ...

    Combine all clips:

    ffmpeg -f concat -i {video_list} -c copy out.mp4

    This generates a file, but it is definitely messed up. When I combined the files I got a ton of warning messages like this:

    [mp4 @ 0x7f88fe01de00] Non-monotonous DTS in output stream 0:0;
    previous: 48966232, current: 8826932; changing to 48966233. This may
    result in incorrect timestamps in the output file.

    FFprobe for out.mp4

    ffprobe version 4.0 Copyright (c) 2007-2018 the FFmpeg developers
     built with Apple LLVM version 9.1.0 (clang-902.0.39.1)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.12.100
     Duration: 00:09:35.56, start: 0.000000, bitrate: 4119 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4221 kb/s, 59.98 fps, 351.56 tbr, 90k tbn, 120 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 122 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    FFprobe for 1.mp4

    ffprobe version 4.0 Copyright (c) 2007-2018 the FFmpeg developers
     built with Apple LLVM version 9.1.0 (clang-902.0.39.1)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
     Duration: 00:00:40.94, start: 0.000000, bitrate: 7613 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 7451 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 160 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    FFprobe for 1_resized.mp4

    ffprobe version 4.0 Copyright (c) 2007-2018 the FFmpeg developers
     built with Apple LLVM version 9.1.0 (clang-902.0.39.1)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1_resize.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.12.100
     Duration: 00:00:32.37, start: 0.000000, bitrate: 3266 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3127 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    FFprobe for 1_intro.mp4

    ffprobe version 4.0 Copyright (c) 2007-2018 the FFmpeg developers
     built with Apple LLVM version 9.1.0 (clang-902.0.39.1)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1_intro.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.12.100
     Duration: 00:00:01.52, start: 0.000000, bitrate: 113 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4667 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    I noticed that the length of the files are different, and the tbn in different, but idk what that means. Thanks for helping!

  • FFMPEG MKV Causing Errors in DASH JS

    24 June 2018, by Mike

    I’m getting the following browser errors (on all browsers) using Dash JS when transcoding and MKV file:

    ERROR DOMException: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source.

    and...

    dash.all.min.js:26 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

    What’s weird is I have no issues when I transcode a MP4 file. I’m using FFMPEG in conjunction with Bento4 to build MPEG DASH and HLS files for my video player.

    What I did to single out FFMPEG was to transcode a video that gave me errors on my test server on my local machine (which works) and start the Bento4 process on that file. Doing that, I had no issues and everything played just fine.

    I have removed FFMPEG and reinstalled it multiple times and I always get the same result. I’m sure I screwed something up on my server, but for the life of me I can’t seem to figure out where to start with fixing the issue.

    FFMPEG Version

    ffmpeg version N-91321-ge85c608 Copyright (c) 2000-2018 the FFmpeg developers

    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)

    configuration:
    --prefix=/root/ffmpeg_build
    --pkg-config-flags=--static
    --extra-cflags=-I/root/ffmpeg_build/include
    --extra-ldflags=-L/root/ffmpeg_build/lib
    --extra-libs=-lpthread
    --extra-libs=-lm
    --bindir=/root/bin
    --enable-gpl
    --enable-libfdk_aac
    --enable-libfreetype
    --enable-libmp3lame
    --enable-libopus
    --enable-libvorbis
    --enable-libtheora
    --enable-libx264
    --enable-nonfree
    libavutil      56. 18.102 / 56. 18.102
    libavcodec     58. 20.102 / 58. 20.102
    libavformat    58. 17.100 / 58. 17.100
    libavdevice    58.  4.101 / 58.  4.101
    libavfilter     7. 25.100 /  7. 25.100
    libswscale      5.  2.100 /  5.  2.100
    libswresample   3.  2.100 /  3.  2.100
    libpostproc    55.  2.100 / 55.  2.100

    FFMPEG Command

    ffmpeg
    -i ${DIRECTORY}/${INPUT_FILE}
    -progress ${DIRECTORY}/transcode.log
    -s 1920x1080
    -c:v libx264
    -b:v 3000k
    -c:a aac
    -b:a 32k
    -minrate 3000k
    -maxrate 3000k
    -bufsize 6000k
    -g 96
    -keyint_min 96
    -sc_threshold 0
    -profile:v high
    -flags +cgop
    -movflags faststart
    -preset ultrafast
    -pix_fmt yuv420p
    ${DIRECTORY}/ffmpeg_1920_1080_3000.mp4 &> ${DIRECTORY}/ffmpeg.log

    Also, I get no errors and and if I access the output files directly, they play just fine.

    I’m sure I’m not including all the information needed to troubleshoot this, so let me know if there is better information I can provide.

    What would cause FFMPEG to transcode MP4 and not MKV?

    EDIT
    One last thing, I converted the MKV to an MP4 then used the above command and it worked. It’s like MP4 to MP4 is fine, but MKV to MP4 is broke.