Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (112)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (10573)

  • ffmpeg strange errors variables/undefined constants & question fonts

    21 mars 2019, par Rick

    I was trying to achieve get an animated text overlay. I found this thread :
    ffmpeg moving text drawtext

    When I run this code however :

    ffmpeg -i VideoInput.mp4 \
          -vf "drawtext=enable='between(t,12,15)':fontfile=myfont.otf:text='Test test': \
              x='if(lt(t-t2+1\,0)\,x1+(x2-x1)*(t-t1)/(t2-t1-1)\,x)': \
              y='if(lt(t-t2+1\,0)\,y1+(y2-y1)*(t-t1)/(t2-t1-1)\,y)':fontsize=65" \
          -acodec copy outputVideo.mp4

    I get the error :

    [Parsed_drawtext_0 @ 000002d862595c00][Eval @ 000000e1d79fe300] Undefined constant or missing '(' in 't2-t1-1),x)'
    [Parsed_drawtext_0 @ 000002d862595c00] Failed to configure input pad on Parsed_drawtext_0

    A second strange error, which may be the cause for the problem at the top. Is that I can’t run the arguments on multiple lines. So with the code below I have to remove the slashes and put it on 1 line. I use PHP so this does not work (white screen, no output)

    $arguments = "-i out1.mp4 \
          -vf \"drawtext=enable='between(t,12,15)':fontfile=myfont.otf:text='Test test': \
              x='if(lt(t-t2+1\,0)\,x1+(x2-x1)*(t-t1)/(t2-t1-1)\,x)': \
              y='if(lt(t-t2+1\,0)\,y1+(y2-y1)*(t-t1)/(t2-t1-1)\,y)':fontsize=65\" \
          -acodec copy outputVideo.mp4 2>&1";
    $output = shell_exec('D:/wamp64/www/createslideshow/ffmpeg-20190319-f8075b2-win64-static/bin/ffmpeg.exe '.$arguments);

    This works but gives the undefined constant error :

    $arguments = "-i out1.mp4 -vf \"drawtext=enable='between(t,12,15)':fontfile=myfont.otf:text='Test test': x='if(lt(t-t2+1\,0)\,x1+(x2-x1)*(t-t1)/(t2-t1-1)\,x)': y='if(lt(t-t2+1\,0)\,y1+(y2-y1)*(t-t1)/(t2-t1-1)\,y)':fontsize=65\" -acodec copy outputVideo.mp4 2>&1";
    $output = shell_exec('D:/wamp64/www/createslideshow/ffmpeg-20190319-f8075b2-win64-static/bin/ffmpeg.exe '.$arguments);

    Last thing is that I keep getting the font error :
    Fontconfig error : Cannot load default config file
    [Parsed_drawtext_0 @ 000001d6ad86f180] Using "C :/WINDOWS/fonts/mingliub.ttc"

    I have tried :

    arial.ttf
    /windows/fonts/arial.ttf
    \windows\fonts\arial.ttf
    \\\windows\\\fonts\\\arial.ttf
    c\\:\\\windows\\\fonts\\\arial.ttf
  • ffmpeg Output file #0 does not contain any stream when trying to access 1 of 2 audio streams

    7 juillet 2019, par nulltorpedo
    ffmpeg -i input.mkv  -map 0:2 -c copy -strict -2  audio.mkv

    Hi I have the above command. The output shows that there are 2 audio streams. I want to copy just the ac3 audio (actually I want to convert it but even this copy does not work). I have truncated the output print where there is metadata

    NEW updated sample with full log which results in same message

    ffmpeg -i input.mka -map 0:0 -c:a libfdk_aac   aac_out.m4a
    ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
     configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '/volume1/..../input.mka':
     Metadata:
       encoder         : libebml v1.3.9 + libmatroska v1.5.2
       creation_time   : 2019-07-07 06:19:20
     Duration: 02:29:21.98, start: 0.000000, bitrate: 640 kb/s
       Stream #0:0(eng): Audio: ac3, 48000 Hz, 5.1(side), 640 kb/s
       Metadata:
         BPS-eng         : 640000
         DURATION-eng    : 02:29:21.984000480
         NUMBER_OF_FRAMES-eng: 280062
         NUMBER_OF_BYTES-eng: 716958720
         _STATISTICS_WRITING_APP-eng: mkvmerge v35.0.0 ('All The Love In The World') 64-bit
         _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 06:19:20
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Output #0, ipod, to 'aac_out.m4a':
     Metadata:
       encoder         : libebml v1.3.9 + libmatroska v1.5.2
    Output file #0 does not contain any stream
  • How to solve issue with ffmpeg being stuck at 'Opening an input file'

    20 mai 2021, par zv989

    I am using a capture card to capture HDMI audio from another machine.

    



    On my host, output of arecord -l is as follow :

    



    **** List of CAPTURE Hardware Devices ****
Home directory not accessible: Permission denied
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: capture [ezcap U3 capture], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


    



    The command that I use is :

    



    sudo ffmpeg -f alsa -i hw:CARD=capture,DEV=0 -t 30 test.wav -loglevel debug


    



    When I ran the command, the log seems to freeze at 'Opening an input file' as below :

    



    ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --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
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.

Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.

Reading option '-i' ... matched as input url with argument 'hw:CARD=capture,DEV=0'.

Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '30'.

Reading option 'test.wav' ... matched as output url.

Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.

Finished splitting the commandline.

Parsing a group of options: global .

Applying option loglevel (set logging level) with argument debug.

Successfully parsed a group of options.

Parsing a group of options: input url hw:CARD=capture,DEV=0.

Applying option f (force format) with argument alsa.

Successfully parsed a group of options.

Opening an input file: hw:CARD=capture,DEV=0.


    



    It will just stuck there forever, until I press Ctrl+C, then the log continues as follow :

    



    [alsa @ 0x55c9f0eee8c0] interrupted
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:CARD=capture,DEV=0':
  Duration: N/A, bitrate: 1536 kb/s
    Stream #0:0, 0, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output url test.wav.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 30.
Successfully parsed a group of options.
Opening an output file: test.wav.
File 'test.wav' already exists. Overwrite ? [y/N] y
[file @ 0x55c9f0f03280] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Finishing stream 0:0 without any data written to it.
detected 4 logical cores
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'sample_rate' to value '48000'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[format_out_0_0 @ 0x55c9f0f060c0] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x55c9f0f04be0] query_formats: 5 queried, 12 merged, 0 already done, 0 delayed
Output #0, wav, to 'test.wav':
  Metadata:
    ISFT            : Lavf57.83.100
    Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      encoder         : Lavc57.107.100 pcm_s16le
size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (hw:CARD=capture,DEV=0):
  Input stream #0:0 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples);
  Total: 0 packets (0 bytes) demuxed
Output file #0 (test.wav):
  Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes);
  Total: 0 packets (0 bytes) muxed
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x55c9f0f033e0] Statistics: 3 seeks, 3 writeouts
Exiting normally, received signal 2.


    



    What is wrong with the command ?