Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (8965)

  • Could not find tag for codec h264 in stream #0 (mp4)

    18 août 2019, par TabsNotSpaces

    I’ve been using the sickbeard_mp4_converter for a while to convert video files to mp4 by generating a script for ffmpeg. I’m not sure what I changed, but the ffmpeg script it generates no longer works and I’m having trouble debugging it. Can anyone tell from my log what the issue is ? Yes, its supposed to be an mp4 to an mp4, which is typically fine.

    I’m at the point where I’m using an mp4 that worked with the same autogenerated script yesterday but it no longer is. I remember updating ffmpeg but downgrading did not resolve the issue, though I may have not downgraded enough.

    ffmpeg 4.1.4

    MediaInfo output :

    $ mediainfo --fullscan Downloads/Dallas\ Buyers\ Club\ \(2013\).mp4.original
    General
    Count                                    : 334
    Count of stream of this kind             : 1
    Kind of stream                           : General
    Kind of stream                           : General
    Stream identifier                        : 0
    Count of video streams                   : 1
    Count of audio streams                   : 1
    Video_Format_List                        : AVC
    Video_Format_WithHint_List               : AVC
    Codecs Video                             : AVC
    Audio_Format_List                        : AAC LC
    Audio_Format_WithHint_List               : AAC LC
    Audio codecs                             : AAC LC
    Audio_Language_List                      : English
    Complete name                            : Downloads/Dallas Buyers Club (2013).mp4.original
    Folder name                              : Downloads
    File name extension                      : Dallas Buyers Club (2013).mp4.original
    File name                                : Dallas Buyers Club (2013).mp4
    File extension                           : original
    Format                                   : MPEG-4
    Format                                   : MPEG-4
    Format/Extensions usually used           : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
    Commercial name                          : MPEG-4
    Format profile                           : Base Media
    Internet media type                      : video/mp4
    Codec ID                                 : isom
    Codec ID                                 : isom (isom/avc1)
    Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
    CodecID_Compatible                       : isom/avc1
    File size                                : 1987698473
    File size                                : 1.85 GiB
    File size                                : 2 GiB
    File size                                : 1.9 GiB
    File size                                : 1.85 GiB
    File size                                : 1.851 GiB
    Duration                                 : 7017023
    Duration                                 : 1 h 56 min
    Duration                                 : 1 h 56 min 57 s 23 ms
    Duration                                 : 1 h 56 min
    Duration                                 : 01:56:57.023
    Duration                                 : 01:56:58;17
    Duration                                 : 01:56:57.023 (01:56:58;17)
    Overall bit rate mode                    : VBR
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 2266144
    Overall bit rate                         : 2 266 kb/s
    Frame rate                               : 23.976
    Frame rate                               : 23.976 FPS
    Frame count                              : 168239
    Stream size                              : 3690657
    Stream size                              : 3.52 MiB (0%)
    Stream size                              : 4 MiB
    Stream size                              : 3.5 MiB
    Stream size                              : 3.52 MiB
    Stream size                              : 3.520 MiB
    Stream size                              : 3.52 MiB (0%)
    Proportion of this stream                : 0.00186
    HeaderSize                               : 3690598
    DataSize                                 : 1984007824
    FooterSize                               : 51
    IsStreamable                             : Yes
    Title                                    : Dallas Buyers Club
    Movie name                               : Dallas Buyers Club
    Director                                 : Jean-Marc Valle
    Actor                                    : Matthew McConaughey / Jennifer Garner / Jared Leto / Denis O'Hare / Steve Zahn
    Screenplay by                            : Craig Borten / Melisa Wallack
    Producer                                 : Robbie Brenner / Rachel Winter / Kerry Barden / Rich Delia / Paul Schnee
    Genre                                    : Drama
    ContentType                              : Unknown Type
    Description                              : Sometimes it takes a hustler to change the world
    Recorded date                            : 2013-11-17
    Encoded date                             : UTC 2014-01-24 08:11:15
    Tagged date                              : UTC 2014-01-24 08:11:15
    File last modification date              : UTC 2019-08-16 16:44:14
    File last modification date (local)      : 2019-08-16 11:44:14
    Writing application                      : MDH:Dallas Buyers Club (2013).mp4
    Writing application                      : MDH:Dallas Buyers Club (2013).mp4
    Cover                                    : Yes
    ContentRating                            : mpaa|R|400|
    LongDescription                          : Loosely based on the true-life tale of Ron Woodroof, a drug-taking, women-loving, homophobic man who in 1986 was diagnosed with HIV/AIDS and given thirty days to live.
    FileExtension_Invalid                    : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

    Video
    Count                                    : 378
    Count of stream of this kind             : 1
    Kind of stream                           : Video
    Kind of stream                           : Video
    Stream identifier                        : 0
    StreamOrder                              : 0
    ID                                       : 1
    ID                                       : 1
    Format                                   : AVC
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format/Url                               : http://developers.videolan.org/x264.html
    Commercial name                          : AVC
    Format profile                           : High@L4.1
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4
    Format settings, Reference frames        : 4 frames
    Internet media type                      : video/H264
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 7016967
    Duration                                 : 1 h 56 min
    Duration                                 : 1 h 56 min 56 s 967 ms
    Duration                                 : 1 h 56 min
    Duration                                 : 01:56:56.967
    Duration                                 : 01:56:58;17
    Duration                                 : 01:56:56.967 (01:56:58;17)
    Bit rate                                 : 2169000
    Bit rate                                 : 2 169 kb/s
    Maximum bit rate                         : 12300880
    Maximum bit rate                         : 12.3 Mb/s
    Width                                    : 1920
    Width                                    : 1 920 pixels
    Height                                   : 800
    Height                                   : 800 pixels
    Sampled_Width                            : 1920
    Sampled_Height                           : 800
    Pixel aspect ratio                       : 1.000
    Display aspect ratio                     : 2.400
    Display aspect ratio                     : 2.40:1
    Rotation                                 : 0.000
    Frame rate mode                          : CFR
    Frame rate mode                          : Constant
    Frame rate                               : 23.976
    Frame rate                               : 23.976 (24000/1001) FPS
    FrameRate_Num                            : 24000
    FrameRate_Den                            : 1001
    Original frame rate                      : 23.976
    Original frame rate                      : 23.976 (23976/1000) FPS
    FrameRate_Original_Num                   : 23976
    FrameRate_Original_Den                   : 1000
    Frame count                              : 168239
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.059
    Stream size                              : 1901715488
    Stream size                              : 1.77 GiB (96%)
    Stream size                              : 2 GiB
    Stream size                              : 1.8 GiB
    Stream size                              : 1.77 GiB
    Stream size                              : 1.771 GiB
    Stream size                              : 1.77 GiB (96%)
    Proportion of this stream                : 0.95674
    Writing library                          : x264 - core 135 r2 f0c1c53
    Writing library                          : x264 core 135 r2 f0c1c53
    Encoded_Library_Name                     : x264
    Encoded_Library_Version                  : core 135 r2 f0c1c53
    Encoding settings                        : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=36 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2169 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
    Encoded date                             : UTC 2014-01-24 08:11:15
    Tagged date                              : UTC 2014-01-24 08:11:38
    colour_description_present               : Yes
    colour_description_present_Source        : Stream
    Color range                              : Limited
    colour_range_Source                      : Stream
    Color primaries                          : BT.709
    colour_primaries_Source                  : Stream
    transfer_characteristics_Source          : Stream
    Matrix coefficients                      : BT.709
    matrix_coefficients_Source               : Stream
    Codec configuration box                  : avcC

    Audio
    Count                                    : 280
    Count of stream of this kind             : 1
    Kind of stream                           : Audio
    Kind of stream                           : Audio
    Stream identifier                        : 0
    StreamOrder                              : 1
    ID                                       : 2
    ID                                       : 2
    Format                                   : AAC
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Commercial name                          : AAC
    Format settings, SBR                     : No (Explicit)
    Format settings, SBR                     : No (Explicit)
    Format_AdditionalFeatures                : LC
    Codec ID                                 : mp4a-40-2
    Duration                                 : 7017023
    Duration                                 : 1 h 56 min
    Duration                                 : 1 h 56 min 57 s 23 ms
    Duration                                 : 1 h 56 min
    Duration                                 : 01:56:57.023
    Duration                                 : 01:56:38:17
    Duration                                 : 01:56:57.023 (01:56:38:17)
    Bit rate mode                            : VBR
    Bit rate mode                            : Variable
    Bit rate                                 : 93816
    Bit rate                                 : 93.8 kb/s
    Maximum bit rate                         : 107376
    Maximum bit rate                         : 107 kb/s
    Channel(s)                               : 2
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Channel positions                        : 2/0/0
    Channel layout                           : L R
    Samples per frame                        : 1024
    Sampling rate                            : 48000
    Sampling rate                            : 48.0 kHz
    Samples count                            : 336817104
    Frame rate                               : 46.875
    Frame rate                               : 46.875 FPS (1024 SPF)
    Frame count                              : 328923
    Compression mode                         : Lossy
    Compression mode                         : Lossy
    Stream size                              : 82292328
    Stream size                              : 78.5 MiB (4%)
    Stream size                              : 78 MiB
    Stream size                              : 78 MiB
    Stream size                              : 78.5 MiB
    Stream size                              : 78.48 MiB
    Stream size                              : 78.5 MiB (4%)
    Proportion of this stream                : 0.04140
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Encoded date                             : UTC 2014-01-24 08:11:37
    Tagged date                              : UTC 2014-01-24 08:11:38

    Log :

    $ /usr/local/bin/ffmpeg -i "/Users/Me/Downloads/Dallas Buyers Club (2013).mp4.original" -vcodec libx264 -map 0:0 -vb 2063k -c:a:0 copy -map 0:2 -metadata:s:a:0 language=eng -disposition:a:0 default -f mp4 -threads 0 -y "/Users/Me/Downloads/Dallas Buyers Club (2013).mp4"
    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --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-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-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc38e801400] stream 0, timescale not set
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Me/Downloads/Dallas Buyers Club (2013).mp4.original':
     Metadata:
       major_brand     : isom
       minor_version   : 1
       compatible_brands: isomavc1
       title           : Dallas Buyers Club
       genre           : Drama
       date            : 2013-11-17
       encoder         : MDH:Dallas Buyers Club (2013).mp4
       media_type      : 9
       hd_video        : 2
       description     : Sometimes it takes a hustler to change the world
       synopsis        : Loosely based on the true-life tale of Ron Woodroof, a drug-taking, women-loving, homophobic man who in 1986 was diagnosed with HIV/AIDS and given thirty days to live.
       creation_time   : 2014-01-24T08:11:15.000000Z
     Duration: 01:56:57.02, start: 0.000000, bitrate: 2266 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 500x750 [SAR 1:1 DAR 2:3], 90k tbr, 90k tbn, 90k tbc
       Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown), 1920x800, 2168 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2014-01-24T08:11:15.000000Z
         handler_name    : video.264#trackID=1:fps=23.976 - Imported with GPAC 0.5.0-rev
       Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
       Metadata:
         creation_time   : 2014-01-24T08:11:37.000000Z
         handler_name    : GPAC ISO Audio Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
     Stream #0:2 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 0x7fc38e811000] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [libx264 @ 0x7fc38e823e00] using SAR=1/1
    [libx264 @ 0x7fc38e823e00] MB rate (135360000) > level limit (16711680)
    [libx264 @ 0x7fc38e823e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x7fc38e823e00] profile High, level 6.2
    [libx264 @ 0x7fc38e823e00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2063 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [mp4 @ 0x7fc38e811000] Could not find tag for codec h264 in stream #0, codec not currently supported in container
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Error initializing output stream 0:0 --
    [libx264 @ 0x7fc38e823e00] final ratefactor: 89.20
    Conversion failed!
  • Video concatenation puts sound out of sync

    9 août 2019, par mmorin

    (Cross-posted from Video Production, where the question received no answers and may be more technical than usual video production.)

    I have several MOV files from a DSLR camera. I concatenate them with directions from this thread :

    ffmpeg -safe 0 -f concat -i files_to_combine -vcodec copy -acodec copy temp.MOV

    where files_to_combine is :

    file ./DSC_0013.MOV
    ...
    file ./DSC_0019.MOV

    The result has image and sound in sync for the first clip and is out of sync by fractions of a second in the second clip, and out of sync by around a second for the last clip. It is probably related to this error from the log :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filter

    How can I trim the frames to the available sound stream, then concatenate the two videos ?

    The full log from the ffmpeg command is :

    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --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-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-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dc00e000] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'files_to_combine':
     Duration: N/A, start: -0.592000, bitrate: 36888 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, mov, to 'temp.MOV':
     Metadata:
       encoder         : Lavf58.20.100
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, q=2-31, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 50k tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filter
    frame=41886 fps=547 q=-1.0 Lsize= 3789826kB time=00:13:58.75 bitrate=37014.8kbits/s speed=10.9x    
    video:3631879kB audio:157123kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.021759%

    Update (1 July 2019)

    I thought that the files had a problem at the beginning or at the end, so I
    trimmed one second from each end, but it still had the sound out of sync :

    FILES=files_to_combine
    OUTPUT=show2.MOV
    rm $FILES
    for i in 3 4 5 6 7 8 9; do
       rm ${i}.MOV
       duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1  DSC_001${i}.MOV)
       trimmed=$(echo $duration - 1 | bc)
       ffmpeg -ss 1 -t $trimmed -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
       echo file ./${i}.MOV >> $FILES
    done

    rm $OUTPUT
    ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUT

    When I trim a single file near the end, the sound and video do not seem out of sync :

    ffmpeg -ss 00:09:20 -t 20 -i DSC_0014.MOV -vcodec copy -acodec copy end.MOV

    When I concatenate only 30 seconds from each video, the result seems OK :

    FILES=files_to_combine
    OUTPUT=show2.MOV
    rm $FILES
    for i in 3 4 5 6 7 8 9; do
       rm ${i}.MOV
       duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1  DSC_001${i}.MOV)
       start=$(echo $duration - 30 | bc)
       end=$(echo $duration - 1 | bc)
       ffmpeg -ss $start -t $end -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
       echo file ./${i}.MOV >> $FILES
    done

    rm $OUTPUT
    ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUT

    This last concatenation gives this error multiple times :

    [mov @ 0x7fc3c7837400] Non-monotonous DTS in output stream 0:0; previous: 9080205, current: 9080200; changing to 9080206. This may result in incorrect timestamps in the output file.

    So I am guessing that the problem is small differences in timestamps that
    accumulate and become more noticeable with longer durations and the
    concatenation of multiple files.

    For reference, the DSLR that shot these clips is a Nikon D3300 and the result
    of ffprobe on one of the files is :

    $ ffprobe DSC_0017.MOV -hide_banner
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSC_0017.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 537331968
       compatible_brands: qt  niko
       creation_time   : 2019-06-12T23:52:37.000000Z
     Duration: 00:09:53.58, start: 0.000000, bitrate: 36843 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35300 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
       Metadata:
         creation_time   : 2019-06-12T23:52:37.000000Z
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
       Metadata:
         creation_time   : 2019-06-12T23:52:37.000000Z

    Update (9 August 2019)

    I concatenated the files in iMovie and the sound and image are not as out of sync as with FFMPEG. Maybe iMovie aligns the timestamps at the end of each clip instead of concatenating the audio and image streams separately.

    I ran the concatenation again with the latest ffmpeg 4.1.4_1 on these files and others from the same camera. The audio and image are in sync in one case (the results lasts 46 minutes) out of sync in another (the result lasts 48 minutes).

  • How can fix CalledProcessError : in ffmpeg

    7 décembre 2020, par Mario

    I hope someone can help to troubleshoot this problem. I'm trying to save the loss plots out of Keras in the form of the following animation.

    



    img

    



    but I have been facing the following error, and ultimately I can't save the animation :

    



    MovieWriter stderr:&#xA;[h264_v4l2m2m @ 0x55a67176f430] Could not find a valid device&#xA;[h264_v4l2m2m @ 0x55a67176f430] can&#x27;t configure encoder&#xA;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&#xA;&#xA;---------------------------------------------------------------------------&#xA;BrokenPipeError                           Traceback (most recent call last)&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in saving(self, fig, outfile, dpi, *args, **kwargs)&#xA;    229         try:&#xA;--> 230             yield self&#xA;    231         finally:&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs, progress_callback)&#xA;   1155                             frame_number &#x2B;= 1&#xA;-> 1156                     writer.grab_frame(**savefig_kwargs)&#xA;   1157 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in grab_frame(self, **savefig_kwargs)&#xA;    383         self.fig.savefig(self._frame_sink(), format=self.frame_format,&#xA;--> 384                          dpi=self.dpi, **savefig_kwargs)&#xA;    385 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/figure.py in savefig(self, fname, transparent, **kwargs)&#xA;   2179 &#xA;-> 2180         self.canvas.print_figure(fname, **kwargs)&#xA;   2181 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, **kwargs)&#xA;   2081                     bbox_inches_restore=_bbox_inches_restore,&#xA;-> 2082                     **kwargs)&#xA;   2083             finally:&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py in print_raw(self, filename_or_obj, *args, **kwargs)&#xA;    445                 cbook.open_file_cm(filename_or_obj, "wb") as fh:&#xA;--> 446             fh.write(renderer._renderer.buffer_rgba())&#xA;    447 &#xA;&#xA;BrokenPipeError: [Errno 32] Broken pipe&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;CalledProcessError                        Traceback (most recent call last)&#xA; in <module>&#xA;     17 print(f&#x27;{model_type.upper()} Train Time: {Timer} sec&#x27;)&#xA;     18 &#xA;---> 19 create_loss_animation(model_type, hist.history[&#x27;loss&#x27;], hist.history[&#x27;val_loss&#x27;], epoch)&#xA;     20 &#xA;     21 evaluate(model, trainX, trainY, testX, testY, scores_train, scores_test)&#xA;&#xA; in create_loss_animation(model_type, loss_hist, val_loss_hist, epoch)&#xA;     34 &#xA;     35     ani = matplotlib.animation.FuncAnimation(fig, animate, fargs=(l1, l2, loss, val_loss, title), repeat=True, interval=1000, repeat_delay=1000)&#xA;---> 36     ani.save(f&#x27;loss_animation_{model_type}_oneDataset.mp4&#x27;, writer=writer)&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs, progress_callback)&#xA;   1154                             progress_callback(frame_number, total_frames)&#xA;   1155                             frame_number &#x2B;= 1&#xA;-> 1156                     writer.grab_frame(**savefig_kwargs)&#xA;   1157 &#xA;   1158         # Reconnect signal for first draw if necessary&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/contextlib.py in __exit__(self, type, value, traceback)&#xA;     97                 value = type()&#xA;     98             try:&#xA;---> 99                 self.gen.throw(type, value, traceback)&#xA;    100             except StopIteration as exc:&#xA;    101                 # Suppress StopIteration *unless* it&#x27;s the same exception that&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in saving(self, fig, outfile, dpi, *args, **kwargs)&#xA;    230             yield self&#xA;    231         finally:&#xA;--> 232             self.finish()&#xA;    233 &#xA;    234 &#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in finish(self)&#xA;    365     def finish(self):&#xA;    366         &#x27;&#x27;&#x27;Finish any processing for writing the movie.&#x27;&#x27;&#x27;&#xA;--> 367         self.cleanup()&#xA;    368 &#xA;    369     def grab_frame(self, **savefig_kwargs):&#xA;&#xA;~/anaconda3/envs/CR7/lib/python3.6/site-packages/matplotlib/animation.py in cleanup(self)&#xA;    409         if self._proc.returncode:&#xA;    410             raise subprocess.CalledProcessError(&#xA;--> 411                 self._proc.returncode, self._proc.args, out, err)&#xA;    412 &#xA;    413     @classmethod&#xA;&#xA;CalledProcessError: Command &#x27;[&#x27;/usr/bin/ffmpeg&#x27;, &#x27;-f&#x27;, &#x27;rawvideo&#x27;, &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;, &#x27;-s&#x27;, &#x27;720x720&#x27;, &#x27;-pix_fmt&#x27;, &#xA;&#x27;rgba&#x27;, &#x27;-r&#x27;, &#x27;5&#x27;, &#x27;-loglevel&#x27;, &#x27;error&#x27;, &#x27;-i&#x27;, &#x27;pipe:&#x27;, &#x27;-vcodec&#x27;, &#x27;h264&#x27;, &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, &#x27;-b&#x27;, &#x27;800k&#x27;, &#x27;-y&#x27;, &#xA;&#x27;loss_animation_CNN_oneDataset.mp4&#x27;]&#x27; returned non-zero exit status 1.&#xA;</module>

    &#xA;&#xA;

    I tried to ignore the error by this answer but it seems it's not the case. I also checked similar case but its answer for getting a static git binary is not my cas as well since not especial converting PNG to MP4 !

    &#xA;&#xA;

    My code is as follows :

    &#xA;&#xA;

    plt.rcParams[&#x27;animation.ffmpeg_path&#x27;] = &#x27;/usr/bin/ffmpeg&#x27;&#xA;&#xA;def animate(i, data1, data2, line1, line2):&#xA;    temp1 = data1.iloc[:int(i&#x2B;1)]&#xA;    temp2 = data2.iloc[:int(i&#x2B;1)]&#xA;&#xA;    line1.set_data(temp1.index, temp1.value)&#xA;    line2.set_data(temp2.index, temp2.value)&#xA;&#xA;    return (line1, line2)&#xA;&#xA;&#xA;def create_loss_animation(model_type, data1, data2):&#xA;    fig = plt.figure()&#xA;    plt.title(f&#x27;Loss on Train &amp; Test&#x27;, fontsize=25)&#xA;    plt.xlabel(&#x27;Epoch&#x27;, fontsize=20)&#xA;    plt.ylabel(&#x27;Loss MSE for Sx-Sy &amp; Sxy&#x27;, fontsize=20)&#xA;    plt.xlim(min(data1.index.min(), data2.index.min()), max(data1.index.max(), data2.index.max()))&#xA;    plt.ylim(min(data1.value.min(), data2.value.min()), max(data1.value.max(), data2.value.max()))&#xA;&#xA;    l1, = plt.plot([], [], &#x27;o-&#x27;, label=&#x27;Train Loss&#x27;, color=&#x27;b&#x27;, markevery=[-1])&#xA;    l2, = plt.plot([], [], &#x27;o-&#x27;, label=&#x27;Test Loss&#x27;, color=&#x27;r&#x27;, markevery=[-1])&#xA;    plt.legend(loc=&#x27;center right&#x27;, fontsize=&#x27;xx-large&#x27;)&#xA;&#xA;    Writer = animation.writers[&#x27;ffmpeg&#x27;]&#xA;    writer = Writer(fps=5, bitrate=1800)&#xA;&#xA;    ani = matplotlib.animation.FuncAnimation(fig, animate, fargs=(data1, data2, l1, l2), repeat=True, interval=1000, repeat_delay=1000)&#xA;    ani.save(f&#x27;{model_type}.mp4&#x27;, writer=writer)&#xA;&#xA;# create datasets&#xA;x = np.linspace(0,150,50)&#xA;y1 = 41*np.exp(-x/20)&#xA;y2 = 35*np.exp(-x/50)&#xA;&#xA;my_data_number_1 = pd.DataFrame({&#x27;x&#x27;:x, &#x27;value&#x27;:y1}).set_index(&#x27;x&#x27;)&#xA;my_data_number_2 = pd.DataFrame({&#x27;x&#x27;:x, &#x27;value&#x27;:y2}).set_index(&#x27;x&#x27;)&#xA;&#xA;create_loss_animation(&#x27;test&#x27;, my_data_number_1, my_data_number_2)&#xA;

    &#xA;