Recherche avancée

Médias (91)

Autres articles (46)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (5244)

  • Get Timecode from MP4 generated in Adobe Premiere / Encoder in Python and FFMPEG

    3 novembre 2019, par russellaugust

    I’m writing a script that needs to either convert or re-container an MP4 as an MOV with timecode.

    I have an MP4 generated from Adobe Premiere. If I bring that file back into Premiere, I have timecode. I can see it so I know it is there.

    I can’t seem to extract the timecode track from the MP4. I’ve looked everywhere online and found some discussions around it, but no actual success in extracting the timecode.

    I’ve been using ffprobe to see if there’s any mention of the timecode in the MP4, but having no luck. I’ve tried PyMediaInfo with no success.

    Here’s what ffprobe shows :

    ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
     built with Apple clang version 11.0.0 (clang-1100.0.33.8)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'demo_SequenceV3.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42mp41
       creation_time   : 2019-11-01T23:34:45.000000Z
     Duration: 00:00:27.69, start: 0.000000, bitrate: 10463 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 2304x1152 [SAR 1:1 DAR 2:1], 10142 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 48k tbc (default)
       Metadata:
         creation_time   : 2019-11-01T23:34:45.000000Z
         handler_name    : ?Mainconcept Video Media Handler
         encoder         : AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
       Metadata:
         creation_time   : 2019-11-01T23:34:46.000000Z
         handler_name    : #Mainconcept MP4 Sound Media Handler
    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=Main
    codec_type=video
    codec_time_base=1001/48000
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=2304
    height=1152
    coded_width=2304
    coded_height=1152
    has_b_frames=0
    sample_aspect_ratio=1:1
    display_aspect_ratio=2:1
    pix_fmt=yuv420p
    level=50
    color_range=tv
    color_space=bt709
    color_transfer=bt709
    color_primaries=bt709
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    is_avc=true
    nal_length_size=4
    id=N/A
    r_frame_rate=24000/1001
    avg_frame_rate=24000/1001
    time_base=1/24000
    start_pts=0
    start_time=0.000000
    duration_ts=663663
    duration=27.652625
    bit_rate=10142082
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=663
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2019-11-01T23:34:45.000000Z
    TAG:language=eng
    TAG:handler_name=Mainconcept Video Media Handler
    TAG:encoder=AVC Coding
    [/STREAM]
    [STREAM]
    index=1
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=48000
    channels=2
    channel_layout=stereo
    bits_per_sample=0
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/48000
    start_pts=0
    start_time=0.000000
    duration_ts=1327326
    duration=27.652625
    bit_rate=317375
    max_bit_rate=335623
    bits_per_raw_sample=N/A
    nb_frames=1298
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:creation_time=2019-11-01T23:34:46.000000Z
    TAG:language=eng
    TAG:handler_name=#Mainconcept MP4 Sound Media Handler
    [/STREAM]
    [FORMAT]
    filename=demo_SequenceV3.mp4
    nb_streams=2
    nb_programs=0
    format_name=mov,mp4,m4a,3gp,3g2,mj2
    format_long_name=QuickTime / MOV
    start_time=0.000000
    duration=27.690667
    size=36216937
    bit_rate=10463290
    probe_score=100
    TAG:major_brand=mp42
    TAG:minor_version=0
    TAG:compatible_brands=mp42mp41
    TAG:creation_time=2019-11-01T23:34:45.000000Z
    [/FORMAT]

    And here was what I started experimenting with in Python.

    from pymediainfo import MediaInfo

    media_info = MediaInfo.parse('demo_SequenceV3.mp4')
    for track in media_info.tracks:
       if track.bit_rate is not None:
           print ("%s: %s" % (track.track_type, track.bit_rate))
       else:
           print ("""%s tracks do not have bit rate associated with them.""" % track.track_type)

    I know I’m not using MediaInfo correctly, but I couldn’t find any documentation on timecode, and to be honest I’m pretty confident it’ll just use FFMPEG’s system of searching for a data track that doesn’t appear to exist.

    Anyone here know enough about this to either get it working or to point me in the right direction ?

    The goal is to re-wrap an MP4 as an MOV and translate the timecode so it is back where it normally is on the MOV.

    EDIT : here is an example MP4 that I need to extract the timecode from :

    https://www.dropbox.com/s/a1euiumiapkpzhn/timecode_demo.mp4?dl=0

    And as you can see in this image, the MP4 does have timecode that is being read by Premiere on the bottom left of frame. TC starts at 10:11:12:13.

    https://www.dropbox.com/s/pafqicnnsqu93rl/timecode_window_in_premiere.png

  • FFMPEG merge audio tracks into one and encode using NVENC

    5 novembre 2019, par L0Lock

    I often shoot films with several audio inputs, resulting in video files with multiple audio tracks supposed to be played all together at the same time.
    I usually go through editing those files and there I do whatever I want with those files, but sometimes I would also like to just send the files right away online without editing, in which case I would enjoy FFMPEG’s fast & simple & quality encoding.

    But here’s the catch : most online video streaming services don’t support multiple audio tracks, so I have to merge them into one so we can hear everything.

    I also want to upscale the video (it’s a little trick for the streaming service to trigger its higher quality encoding).
    And finally, since it’s just an encoding meant to just be shared on a streaming service, I prefer a fast & light encoding over quality, which HEVC NVENC is good for.

    So far I’ve tried to use the amix advanced filter and I try to use the Lanczos filter for upscaling which seems to give a better result in my case.

    The input file is quite simple :

    Stream 0:0 : video track
    Stream 0:1 : main audio recording
    Stream 0:2 : secondary audio recording

    The audio tracks are at the correct volume and duration and position in time, so the only thing I need is really just to turn them into one track

    ffmpeg -i "ow_raw.mp4" -filter_complex "[0:1][0:2]amix=inputs=2[a]" -map "0:0" -map "[a]" -c:v hevc_nvenc -preset fast -level 4.1 -pix_fmt yuv420p -vf scale=2560:1:flags=lanczos "ow_share.mkv" -y

    But it doesn’t work :

    ffmpeg version N-94905-g8efc9fcc56 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.1.1 (GCC) 20190807
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 35.100 / 56. 35.100
     libavcodec     58. 56.101 / 58. 56.101
     libavformat    58. 32.104 / 58. 32.104
     libavdevice    58.  9.100 / 58.  9.100
     libavfilter     7. 58.102 /  7. 58.102
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ow_raw.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2019-11-02T16:43:32.000000Z
       date            : 2019
     Duration: 00:15:49.79, start: 0.000000, bitrate: 30194 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt470m), 1920x1080 [SAR 1:1 DAR 16:9], 29805 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
       Metadata:
         creation_time   : 2019-11-02T16:43:32.000000Z
         handler_name    : VideoHandle
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 196 kb/s (default)
       Metadata:
         creation_time   : 2019-11-02T16:43:32.000000Z
         handler_name    : SoundHandle
       Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 184 kb/s (default)
       Metadata:
         creation_time   : 2019-11-02T16:43:32.000000Z
         handler_name    : SoundHandle
    Stream mapping:
     Stream #0:1 (aac) -> amix:input0 (graph 0)
     Stream #0:2 (aac) -> amix:input1 (graph 0)
     Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
     amix (graph 0) -> Stream #0:1 (libvorbis)
    Press [q] to stop, [?] for help
    [hevc_nvenc @ 000002287e34a040] InitializeEncoder failed: invalid param (8)
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Conversion failed!
  • How to solve Fatal error : Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException : ffmpeg failed to execute command

    7 novembre 2019, par Ahmed Rashid

    I am trying to encode video using the PHP-FFMpeg library, but there are some errors that are shown to me. The errors :

    Fatal error : Uncaught
    Alchemy\BinaryDriver\Exception\ExecutionFailureException : ffmpeg
    failed to execute command "C :/FFmpeg/bin/ffmpeg.exe" -y -i video1.mp4
    -async 1 -metadata:s:v:0 start_time=0 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]scale=320:240 [out]" -pass 1 -passlogfile "C :\Users\DELL\AppData\Local\Temp\ffmpeg-passes5d9e35f516ce1e66b8/pass-5d9e35f517030"
    export-x264.mp4 : Error Output : ffmpeg version N-95216-ge6625ca41f
    Copyright (c) 2000-2019 the FFmpeg developers built with gcc 9.2.1
    (GCC) 20190918 configuration : —enable-gpl —enable-version3
    —enable-sdl2 —enable-fontconfig —enable-gnutls —enable-iconv —enable-libass —enable-libdav1d —enable-libbluray —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libtheor in C :\xampp\htdocs\AnimeX\s2\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php
    on line 106`

    The library is PHP-FFMpeg library.