Recherche avancée

Médias (91)

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

    5 mars 2010, par

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

Sur d’autres sites (7134)

  • ffmpeg : set the language of an audio stream

    22 juillet 2023, par Steven Van Ingelgem

    I have 3 files : video.mp4, audionl.mp4 & audioeng.mp4.
I tried adding them all together in 1 output.mp4 file like this :

    



    ffmpeg -y -i video.mp4 -i audionl.mp4 -i audioeng.mp4  -map 0:v -map 1:a -map 2:a -metadata:s:a:0 language=nl -metadata:s:a:0 title="NL" -metadata:s:a:1 language=eng  -metadata:s:a:1 title="ENG" -acodec copy -bsf:a aac_adtstoasc -vcodec copy  -movflags faststart output.mp4 2>&1


    



    This is the output I see from ffmpeg :

    



    ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomavc1mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.80, start: 0.000000, bitrate: 1172 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : VideoHandler
      encoder         : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audionl.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomM4A mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.80, start: 0.000000, bitrate: 96 kb/s
    Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'audioeng.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomM4A mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.78, start: 0.000000, bitrate: 64 kb/s
    Stream #2:0(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 62 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomavc1mp42dash
    encoder         : Lavf56.25.101
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : VideoHandler
      encoder         : VideoHandler
    Stream #0:1(nl): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 93 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
      title           : NL
    Stream #0:2(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 62 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
      title           : ENG
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
  Stream #2:0 -> #0:2 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0xbb1320] Starting second pass: moving the moov atom to the beginning of the file
frame=31320 fps=20993 q=-1.0 Lsize=  204217kB time=00:20:52.79 bitrate=1335.4kbits/s
video:178734kB audio:23867kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.797284%


    



    As you can see in there : "Stream #0:0(eng)", "Stream #0:1(nl)" & "Stream #0:2(eng)".
So that looks fine.

    



    But when I open it in VLC, I see under Audio tracks :
NL - [English]
ENG - [English]

    



    So I went back to check on ffmpeg with "ffmpeg -i output.mp4" :

    



    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.25.101
  Duration: 00:20:52.80, start: 0.000000, bitrate: 1335 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 62 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


    



    And here they are English again...

    



    Afterwards I tried this :

    



    ffmpeg -y -i audionl.mp4 -c:a copy -metadata:s:a:0 language=nl output.mp4


    



    But also that failed to set the correct language on the output file...
I'm at a loss here and hope someone can help me set these languages correctly.

    



    Thanks a lot !

    


  • FFMPEG : FATAL error, file duration too long for timebase ?

    26 février 2024, par clx

    I want to add a subtitle track on a ProRes files with ffmpeg command on Windows :

    


    ffmpeg.exe  -i "X:\Test\Tokyo01.mov" -i "X:\Test\SubtitleEN.srt" -f mov -c:v copy -c:a copy -c:s mov_text -map 0:v -map 0:a -map "1:0" "-metadata:s:s:0" "language=EN" "-metadata:s:s:0" "handler_name=English"  "-metadata:s:s:0" "title=English" -y "X:\Test\Tokyo01_WithSub.mov" 


    


    I have a fatal error at the end :

    


    ...
FATAL error, file duration too long for timebase, this file will not be1737.7kbits/s speed=0.979x
playable with QuickTime. Choose a different timebase with -video_track_timescale or a different container format
...


    


    Source file looks good with FFProbe :

    


    
[STREAM]
index=0
codec_name=prores
codec_long_name=Apple ProRes (iCodec Pro)
profile=HQ
codec_type=video
codec_time_base=15139/363340
codec_tag_string=apch
codec_tag=0x68637061
width=3996
height=2160
coded_width=3996
coded_height=2160
closed_captions=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuv422p10le
level=-99
color_range=tv
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=24/1
avg_frame_rate=363340/15139
time_base=1/90000
start_pts=0
start_time=0.000000
duration_ts=340627500
duration=3784.750000
bit_rate=656235296
max_bit_rate=N/A
bits_per_raw_sample=10
nb_frames=90835


    


    The complete FFmpeg return console :

    


    ffmpeg version 2023-09-04-git-f8503b4c33-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 19.100 / 58. 19.100
  libavcodec     60. 25.100 / 60. 25.100
  libavformat    60. 11.100 / 60. 11.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'X:\Test\Tokyo01.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf58.76.100
  Duration: 01:03:04.79, start: 0.000000, bitrate: 663143 kb/s
  Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061), yuv422p10le, 3996x2160, 656235 kb/s, 24 fps, 24 tbr, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
  Stream #0:1[0x2]: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 5.1, s32 (24 bit), 6912 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
[srt @ 000001bc0ec608c0] UTF16 is automatically converted to UTF8, do not specify a character encoding
Input #1, srt, from 'X:\Test\SubtitleEN.srt':
  Duration: N/A, bitrate: N/A
  Stream #1:0: Subtitle: subrip
Output #0, mov, to 'X:\Test\Tokyo01_WithSub.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf60.11.100
  Stream #0:0: Video: prores (HQ) (apch / 0x68637061), yuv422p10le, 3996x2160, q=2-31, 656235 kb/s, 24 fps, 24 tbr, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
  Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 5.1, s32 (24 bit), 6912 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:2(EN): Subtitle: mov_text (text / 0x74786574)
    Metadata:
      handler_name    : English
      title           : English
      encoder         : Lavc60.25.100 mov_text
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (subrip (srt) -> mov_text (native))
Press [q] to stop, [?] for help
FATAL error, file duration too long for timebase, this file will not be1737.7kbits/s speed=0.979x
playable with QuickTime. Choose a different timebase with -video_track_timescale or a different container format
[out#0/mov @ 000001bc0e847340] video:303184287kB audio:3193418kB subtitle:9kB other streams:0kB global headers:0kB muxing overhead: 0.000585%
frame=90834 fps= 23 q=-1.0 Lsize=306379507kB time=01:03:04.77 bitrate=663147.3kbits/s speed=0.979x



    


    I don't find documentation for mentionned command "-video_track_timescale" to change timescale (here 1/90000 ).
I don't understand the problem ??

    


  • ffmpeg subtitles to overlay by language

    21 mars 2017, par Milan Čížek

    my stream looks like this :

    Input #0, mpegts, from 'udp://@...':
     Duration: N/A, start: 19316.897278, bitrate: N/A
     Program 504
       Stream #0:0[0x13b1], 125, 1/90000: Video: mpeg2video (Main), 1 reference frame ([2][0][0][0] / 0x0002), yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 0/1, 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x13b2], 208, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
       Stream #0:2[0x1541](srp), 4, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:3[0x1542](slv), 3, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:4[0x1543](hrv), 4, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:5[0x1544](cze), 3, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:6[0x1545](hun), 4, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:7[0x1546](ron), 3, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:8[0x1547](alb), 4, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:9[0x1548](bul), 5, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:10[0x13b9](eng), 127, 1/90000: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)

    I try to add english subtitles into output video, but number of subtitles/languages is variable in time. I need select required subtitles by language. How can I do ? Here is my not working example. Thank you.

    ffmpeg -i "udp://@..." -map s:eng -sn -map v:0 -profile:v baseline
    -c:v libx264 -b:v 1500k -maxrate 2200k -filter_complex [0:v][0:s]overlay -c:a libfdk_aac -b:a 128k /test.ts