Recherche avancée

Médias (91)

Autres articles (15)

  • 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.

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6251)

  • How to join AAC files with AVCONV CONCAT using an input txt file ?

    26 mars 2015, par user27284

    I have a number of AAC files and want to concatenate them into one AAC file. When I do this with AVCONV at the command line and I am specific with the file names, it works. When I try to do this with a text file that holds a list of files, it fails. What led me here is the FFMPEG tutorial page at Concatenating media files. I get a variety of results depending on what I try and I cannot find any info on what I am doing wrong with the syntax.

    My file list (list.txt in the same directory)...

    file 'sr_program_2015_03_23_05_44_01.aac'
    file 'sr_program_2015_03_23_07_44_58.aac'

    When I follow the example at the page I mentioned above, I get an error. I included both the use of ffmpeg AND avconv but the results are the same.

    ffmpeg...

    ffmpeg -f concat -i list.txt -c copy output
    ffmpeg version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    The ffmpeg program is only provided for script compatibility and will be removed
    in a future release. It has been deprecated in the Libav project to allow for
    incompatible command line syntax improvements in its replacement called avconv
    (see Changelog for details). Please use avconv instead.
    Unknown input format: 'concat'

    avconv...

    avconv -f concat -i list.txt -c copy output
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    Unknown input format: 'concat'

    When I remove the "-f" and use the filenames directly, it works. I have no idea why. The resulting file also plays as expected.

    avconv -i concat:sr_program_2015_03_23_05_44_01.aac\|sr_program_2015_03_23_07_44_58.aac -c copy output.aac
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    [aac @ 0xcb6cc0] channel element 3.5 is not allocated
    [aac @ 0xcb4b20] max_analyze_duration reached
    [aac @ 0xcb4b20] Estimating duration from bitrate, this may be inaccurate
    Input #0, aac, from 'concat:sr_program_2015_03_23_05_44_01.aac|sr_program_2015_03_23_07_44_58.aac':
     Duration: 01:58:34.29, bitrate: 65 kb/s
       Stream #0.0: Audio: aac, 44100 Hz, stereo, s16, 65 kb/s
    Output #0, adts, to 'output.aac':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Audio: aac, 44100 Hz, stereo, 65 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press ctrl-c to stop encoding
    size=   57148kB time=7315.03 bitrate=  64.0kbits/s
    video:0kB audio:57148kB global headers:0kB muxing overhead 0.000000%

    Noticing that the working approach does not use the ’-f’ option, I tried that again with my first attempt and got a completely different error.

    avconv concat -i list.txt -c copy output.aac
    avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
     built on Mar 15 2015 17:00:31 with gcc 4.7.2
    Unable to find a suitable output format for 'concat'

    The reason I want to process these ’broken stream’ aac files from a file list in a file is because I want to create the list from a script/code and then process it as part of a daily automated process. When the streams have broken, there are numerous files with the same date. When all goes well, there is only one file. It happens every other week or so. I want to automate the fix that I usually do manually. I have already accomplished creating the target file list, ironically, from examples on the same page mentioned above when I became stuck with this odd behavior.

    I also want to know what it is I am doing wrong. I see the example I used first everywhere. I have tried this on two different machines running debian but different architectures (arm and x86) and received the same results.

    Also, to make sure I had the latest ffmeg, I compiled it on each system using this page... Compile FFmpeg on Ubuntu, Debian, or Mint

    Thank you for your time.

  • avfilter/delogo : remove deprecated options

    10 avril 2020, par Gyan Doshi
    avfilter/delogo : remove deprecated options
    

    Deprecated in 2015 in 8bc708fcee1

    • [DH] libavfilter/vf_delogo.c
  • ffmpeg determine correct codec to use

    8 avril 2020, par nha

    I am trying to use .y4m files that I feed into Chrome for playing.
This is the only format that I can use.

    



    I have a set of .y4m files that are working for my use case, taken from here.
For example let's say that I use the file mobile_qcif_7.5fps.y4m.

    



    I also have a .mp4 file (specifically the sample small.mp4 file from techslides ). I know how to convert small.mp4 to small.y4m with the following command :

    



    ffmpeg -y -i small.mp4 small.y4m

    



    I would like the resulting file to be accepted by Chrome, just like the other file.
What options should I use (and how to find them) ?

    



    Additional information

    



    ffprobe gives :

    



    $ ffprobe small.y4m 
avprobe version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2007-2014 the Libav developers
  built on Jul 15 2014 13:48:35 with gcc 4.8.1
[yuv4mpegpipe @ 0x23160c0] Estimating duration from bitrate, this may be inaccurate
Input #0, yuv4mpegpipe, from 'small.y4m':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: rawvideo, yuv420p, 560x320, 30 fps, 30 tbr, 30 tbn, 30 tbc


$ ffprobe mobile_qcif_7.5fps.y4m
avprobe version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2007-2014 the Libav developers
  built on Jul 15 2014 13:48:35 with gcc 4.8.1
[yuv4mpegpipe @ 0x1e080c0] max_analyze_duration reached
[yuv4mpegpipe @ 0x1e080c0] Estimating duration from bitrate, this may be inaccurate
Input #0, yuv4mpegpipe, from 'mobile_qcif_7.5fps.y4m':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: rawvideo, yuv420p, 176x144, PAR 128:117 DAR 1408:1053, 7.50 fps, 7.50 tbr, 7.50 tbn, 7.50 tbc


    



    OS : I am using ffmpeg in Ubuntu 13.10 from the default repository : I ran sudo apt-get install ffmpeg libavcodec-extra-53

    



    Complete console output

    



    $ ffmpeg -y -i small.mp4 small.y4m
ffmpeg version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
  built on Jul 15 2014 13:48:35 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'small.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20 21:29:11
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.56, start: 0.000000, bitrate: 551 kb/s
    Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      creation_time   : 2010-03-20 21:29:11
    Stream #0.1(eng): Audio: aac, 48000 Hz, mono, s16, 83 kb/s
    Metadata:
      creation_time   : 2010-03-20 21:29:11
[buffer @ 0x7274e0] w:560 h:320 pixfmt:yuv420p
Output #0, yuv4mpegpipe, to 'small.y4m':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20 21:29:11
    encoder         : Lavf53.21.1
    Stream #0.0(und): Video: rawvideo, yuv420p, 560x320, q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Metadata:
      creation_time   : 2010-03-20 21:29:11
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame=  166 fps=  0 q=0.0 Lsize=   43576kB time=5.53 bitrate=64513.5kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead inf%


    



    Head of the files

    



    Not sure if this is relevant, but the text content of both files begin like that :

    



    mobile_qcif_7.5fps.y4m
YUV4MPEG2 W176 H144 F15:2 Ip A128:117
FRAME

small.y4m (invalid)
YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420mpeg2 XYSCSS=420MPEG2
FRAME


    



    Additional experiment

    



    Taking the sample mobile_qcif_7.5fps.y4m, turning it into a .mp4 file and then back into a .y4m produces an invalid file (at least for Chrome).

    



    Answer to comments in the answer of @SirDarius

    



    Following the suggestion of @SirDarius ; I tried the following commands.
They failed to produce a valid file.

    



    # [COMMAND]   # [RESULT] [HEADER]
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv444p -y small_yuv444p.y4m   # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C444 XYSCSS=444
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv422p -y small_yuv422p.y4m   # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C422 XYSCSS=422
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv420p -y small_yuv420p.y4m   # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420mpeg2 XYSCSS=420MPEG2
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv411p -y small_yuv411p.y4m   # KO   YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C411 XYSCSS=411

ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p9 -y small_yuv420p9.y4m   # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420p9 XYSCSS=420P9
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p12 -y small_yuv420p12.y4m # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420p12 XYSCSS=420P12
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p14 -y small_yuv420p14.y4m # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420p14 XYSCSS=420P14
ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p16 -y small_yuv420p16.y4m # KO YUV4MPEG2 W560 H320 F15:2 Ip A0:0 C420p16 XYSCSS=420P16


    



    When trying other formats (like yuv420p12be, which was in the output of -pix_fmts), I had the following output (hence my previous trials) :

    



    $  ffmpeg -i small.mp4 -vf fps=7.5 -an -c:v rawvideo -f yuv4mpegpipe -pix_fmt yuv420p12be -y small_yuv420p12be.y4m 
ffmpeg version N-68884-g3ebd76a Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan  6 2015 11:03:21 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
  configuration: 
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 19.100 / 56. 19.100
  libavformat    56. 18.100 / 56. 18.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  6.100 /  5.  6.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x21d0220] overread end of atom 'colr' by 1 bytes
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'small.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20 21:29:11
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20 21:29:11
      encoder         : JVT/AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20 21:29:11
[yuv4mpegpipe @ 0x21d8180] ERROR: yuv4mpeg can only handle yuv444p, yuv422p, yuv420p, yuv411p and gray8 pixel formats. And using 'strict -1' also yuv444p9, yuv422p9, yuv420p9, yuv444p10, yuv422p10, yuv420p10, yuv444p12, yuv422p12, yuv420p12, yuv444p14, yuv422p14, yuv420p14, yuv444p16, yuv422p16, yuv420p16 and gray16 pixel formats. Use -pix_fmt to select one.
Output #0, yuv4mpegpipe, to 'small_yuv420p12be.y4m':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    encoder         : Lavf56.18.100
    Stream #0:0(und): Video: rawvideo ([12][11]3Y / 0x59330B0C), yuv420p12be, 560x320, q=2-31, 200 kb/s, 7.50 fps, 7.50 tbn, 7.50 tbc (default)
    Metadata:
      creation_time   : 2010-03-20 21:29:11
      encoder         : Lavc56.19.100 rawvideo
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error


    



    After that, I also tried to edit with an hexadecimal editor (bless) the small_yuv420p.y4m file. I replace C420mpeg2 by C420, and the file was accepted by Chrome.
What does the number in 420p[number] correspond to ? It is not explained there.
Is there any way to make ffmpeg output this kind of header files ?

    



    @SirDarius, thank you again for your help.

    



    The question

    



    (in case you forgot after this text blob)

    



    How can I convert the small.mp4 into a small.y4m file that has the same properties as the mobile_qcif_7.5fps.y4m file ?