Recherche avancée

Médias (91)

Autres articles (49)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (9840)

  • add subtitle to video created from mp3 file and an image using ffmpeg

    1er février 2018, par no name

    I have a simple image and an mp3 file all I want to do is to add a lyrics to this mp3 file in a video as an output with fade out style.
    so i used this command to do so from this this blog

    ffmpeg -loop 1 -y -i test.jpg -i test.mp3 -vf subtitles=”f=test.srt:force_style=’FontName=Arial,FontSize=14″ -shortest test1.mp4

    when i used this command i got this eror

       ffmpeg -loop 1 -y -i test.jpg -i test.mp3 -vf subtitles="f=test.srt:force_style=’FontName=Arial,FontSize=14″ -shortest test1.mp4
    ffmpeg version N-89940-gb1af0e23a3 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --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-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
     libavutil      56.  7.100 / 56.  7.100
     libavcodec     58.  9.100 / 58.  9.100
     libavformat    58.  7.100 / 58.  7.100
     libavdevice    58.  0.101 / 58.  0.101
     libavfilter     7. 11.101 /  7. 11.101
     libswscale      5.  0.101 /  5.  0.101
     libswresample   3.  0.101 /  3.  0.101
     libpostproc    55.  0.100 / 55.  0.100
    Trailing options were found on the commandline.
    Input #0, image2, from 'test.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 17290 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x959 [SAR 1:1 DAR 960:959], 25 fps, 25 tbr, 25 tbn, 25 tbc
    Input #1, mp3, from 'test.mp3':
     Metadata:
       comment         : converted by convert2mp3.net
       title           : Celestial Empire [ Worlds 2017 ] [ Pick and b
       artist          : Raffael Gruber Matthias Ullrich
     Duration: 00:02:33.13, start: 0.025057, bitrate: 193 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
       Metadata:
         encoder         : Lavc57.28
    At least one output file must be specified

    iam using windows 10, last version of ffmpeg, so what makes this problem. also how to make the style of the lyrics to be something like fade in/out and so on. if it’s possible
    Thanks in advance.
    update
    when i use this command

    ffmpeg -loop 1 -y -i test.jpg -i test.mp3 -vf "subtitles=test.srt:force_style='FontName=Arial,FontSize=14'" -shortest test1.mp4

    it give me this error

    Press [q] to stop, [?] for help
    [Parsed_subtitles_0 @ 049af980] Shaper: FriBidi 0.19.7 (SIMPLE)
    [Parsed_subtitles_0 @ 049af980] Using font provider directwrite
    [libx264 @ 049d2440] height not divisible by 2 (960x959)
    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!

    i searched this error and i found a solution by add this part before output file so the final command is

    ffmpeg -loop 1 -y -i test.jpg -i test.mp3 -vf "subtitles=test.srt:force_style='FontName=Arial,FontSize=14'" -shortest -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" test1.mp4

    i got no error and it worked but the output video not contains any lyrics which i added

    Update

    last thing i tried and it works first i use this command to convert the image and mp3 file to a mp4 video

    ffmpeg -loop 1 -i test.jpg -i test.mp3 -shortest -acodec copy -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

    but this command take a long time to process to convert mp3 of 2:55 minute it with image.
    then i start to add lyrics or subtitle using this command

    ffmpeg -i video.mp4 -vf "subtitles=test.srt:force_style='FontName=Arial,FontSize=14,PrimaryColour=&H0000ff&'" -c:a copy output.mp4

    this worked perfect and give the output but it take a long time to process i don’t know if this normal.
    now last thing how can i set the style of the subtitle so it be fade out or something

  • FFmpeg, MPEG4 video rotate and Windows

    25 décembre 2017, par user3768884

    I have this kind of video recorded in some Samsung Galaxy phone (info from : "ffprobe -v error -show_format -show_streams filename.mp4")

    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=High
    codec_type=video
    codec_time_base=7048499/423000000
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=1920
    height=1080
    coded_width=1920
    coded_height=1080
    has_b_frames=0
    sample_aspect_ratio=0:1
    display_aspect_ratio=0:1
    pix_fmt=yuv420p
    level=40
    color_range=unknown
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    is_avc=true
    nal_length_size=4
    id=N/A
    r_frame_rate=30/1
    avg_frame_rate=211500000/7048499
    time_base=1/90000
    start_pts=0
    start_time=0.000000
    duration_ts=7048499
    duration=78.316656
    bit_rate=17010472
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=2350
    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:rotate=90
    TAG:creation_time=2017-12-17T13:42:14.000000Z
    TAG:language=eng
    TAG:handler_name=VideoHandle
    [SIDE_DATA]
    side_data_type=Display Matrix
    displaymatrix=
    00000000:            0       65536           0
    00000001:       -65536           0           0
    00000002:            0           0  1073741824

    rotation=-90
    [/SIDE_DATA]
    [/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=3772416
    duration=78.592000
    bit_rate=126154
    max_bit_rate=128000
    bits_per_raw_sample=N/A
    nb_frames=3684
    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=2017-12-17T13:42:14.000000Z
    TAG:language=eng
    TAG:handler_name=SoundHandle
    [/STREAM]
    [FORMAT]
    filename=original_galaxy.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=78.592000
    size=167808936
    bit_rate=17081528
    probe_score=100
    TAG:major_brand=isom
    TAG:minor_version=0
    TAG:compatible_brands=isom3gp4
    TAG:creation_time=2017-12-17T13:42:14.000000Z
    [/FORMAT]

    Since all my media players does not support rotate-knowledge, I have turned the video over again, and at the same time slightly decreased the resolution of command "ffmpeg -i "input.mp4" -vf "scale=720:1280,transpose=0,transpose=0" -c:a copy "output.mp4""

    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=High
    codec_type=video
    codec_time_base=1/60
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=720
    height=1280
    coded_width=720
    coded_height=1280
    has_b_frames=2
    sample_aspect_ratio=0:1
    display_aspect_ratio=0:1
    pix_fmt=yuv420p
    level=31
    color_range=unknown
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=unknown
    timecode=N/A
    refs=1
    is_avc=true
    nal_length_size=4
    id=N/A
    r_frame_rate=30/1
    avg_frame_rate=30/1
    time_base=1/15360
    start_pts=0
    start_time=0.000000
    duration_ts=1203717
    duration=78.366992
    bit_rate=2570692
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=2351
    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:language=eng
    TAG:handler_name=VideoHandler
    [/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=3772416
    duration=78.592000
    bit_rate=126154
    max_bit_rate=126154
    bits_per_raw_sample=N/A
    nb_frames=3684
    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:language=eng
    TAG:handler_name=SoundHandler
    [/STREAM]
    [FORMAT]
    filename=from_ffmpeg.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=78.592000
    size=26503544
    bit_rate=2697836
    probe_score=100
    TAG:major_brand=isom
    TAG:minor_version=512
    TAG:compatible_brands=isomiso2avc1mp41
    TAG:encoder=Lavf57.41.100
    [/FORMAT]

    This works very well in VLC, for example. However, Windows Media Player or Samsung TV does not play it. Windows Explorer does not even show a video thumbnail, so the video file is broken by Windows.

    Is not FFmpeg able to produce a standard MPEG4 file, or what the hell is this about ? I’ve tried all the alternatives presented, such as "-fflags +genpts", "-fflags genpts", "-movflags faststart", "-movflags +faststart", "pix_fmt=yuv420p" etc. but nothing worked.

    The sound I copied directly.

  • Ffmpeg : alternating audio languages in resulting movie for language learning

    20 novembre 2020, par almachuar
      

    1. Need to convert multiple-(audio)-language-video to single-audio-stream-video where 2 languages alternate repeatedly.
(10sec Lang2) + (15sec Lang3) + (10sec Lang2) + (15sec Lang3) + ... and so on till the end.
I assume it should be done with piping in and changing audio streams. (I've read ffmpeg piping documentation but didn't quite understand it).
    2. 


    


    I've done audio switching task (with scripting on Windows) by lively changing audio languages in video player but need better and crossplatform solution for little kid - preprepared video.

    


      

    1. If possible, to adjust loudness of one of the input audio streams to the other.
    2. 


    


    P.S. Think it would be useful for many married (programmers) to show little kids bilingual cartoons. (To prepare for language learning). By balancing 10/15 sec you may retain kid's attention — the older they grow the more native language they demand.

    


    Irrelevant, just for what's my experience :
    
%ffmpeg% -y -f concat -safe 0 -i %playlist% -i %picture% -map:v 0 -map:v 1 -c:v copy -disposition:v:0 attached_pic -ac 1 -af aresample=resampler=soxr -ar 16000 -%title% -%album% -%artist% %lyrics% -c:a aac -q:a 1 %output%