Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (33)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (2911)

  • Repair mpeg files using ffmpeg

    27 février 2014, par rsdrsd

    I have a bunch of mpeg files which are some how invalid or incorrect. I can play the files in different media players but when I upload the files and they should automagically be converted. It takes a very long time to create screenshots and it creates about 10000 screenshots instead of the 50 to be expected. The command is part of an automatic conversion app. With mp4 and other files it works great but whit mpeg it doesn't work as expected. The creation of screenshots eats up all memory and processor power.

    For creating screenshots I have tried the following :

       ffmpeg -y -i /input/file.mpeg -f image2 -aspect 16:9 -bt 20M -vsync passthrough -vf select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)' /output/file-%05d.jpg

    this just creates 2 screenshots while I expect 50 or so. The following command :

       ffmpeg -y -i /input/file.mpeg -f image2 -vf fps=fps=1/10 -aspect 16:9 -vsync passthrough -bt 20M /output/file-%05d.jpg

    gave me errors about buffers :

       ffmpeg version N-39361-g1524b0f Copyright (c) 2000-2014 the FFmpeg developers
         built on Feb 26 2014 23:46:40 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
         configuration: --prefix=/home/example/ffmpeg_build --extra-cflags=-I/home/example/ffmpeg_build/include --extra-ldflags=-L/home/example/ffmpeg_build/lib --bindir=/home/example/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-libspeex --enable-libtheora
         libavutil      52. 66.100 / 52. 66.100
         libavcodec     55. 52.102 / 55. 52.102
         libavformat    55. 33.100 / 55. 33.100
         libavdevice    55. 10.100 / 55. 10.100
         libavfilter     4.  2.100 /  4.  2.100
         libswscale      2.  5.101 /  2.  5.101
         libswresample   0. 18.100 /  0. 18.100
         libpostproc    52.  3.100 / 52.  3.100
       [mp3 @ 0x200d7c0] Header missing
       [mpegts @ 0x2008a60] DTS discontinuity in stream 0: packet 6 with DTS 34185, packet 7 with DTS 8589926735
       [mpegts @ 0x2008a60] Invalid timestamps stream=0, pts=7157, dts=8589932741, size=150851
       Input #0, mpegts, from '/home/example/app/uploads/21.mpeg':
         Duration: 00:03:14.75, start: 0.213000, bitrate: 26112 kb/s
         Program 1
    Stream #0:0[0x3e9]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1440x1080 [SAR 4:3 DAR 16:9], max. 25000 kb/s, 29.97 fps, 60 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x3ea]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
       [swscaler @ 0x1ff9860] deprecated pixel format used, make sure you did set range correctly
       Output #0, image2, to '/home/example/app/uploads/21-%05d.jpg':
         Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Video: mjpeg, yuvj420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 0.10 tbc
       Stream mapping:
         Stream #0:0 -> #0:0 (mpeg2video -> mjpeg)
       Press [q] to stop, [?] for help
       [mpegts @ 0x2008a60] Invalid timestamps stream=0, pts=7157, dts=8589932741, size=150851
       [output stream 0:0 @ 0x1ff2ba0] 100 buffers queued in output stream 0:0, something may be wrong.
       [output stream 0:0 @ 0x1ff2ba0] 1000 buffers queued in output stream 0:0, something may be wrong.

    and it creates about 10000 screenshots while I expect 50.

    Now I have read some where on how to repair some broken files. For this I have the following command :

       ffmpeg -y -i input.mpeg -codec:v copy -codec:a copy output.mpeg

    This however creates a file somewhat smaller, but if I run the same command on the output again, I would expect that it creates the same file, but the following command

       ffmpeg -y -i output.mpeg -codec:v copy -codec:a copy output2.mpeg

    returns a file which is much smaller and runs for only a few seconds while the original was about 3 minutes.

    If I run the "repair" commands for a not broken mpeg it results the first time I run the command in a much smaller file. With ffprobe I checked what changed but the only thing that changes is MPEG-TS to MPEG-PS.

    If I run the command over an mp4 file it results in exactly the same file as expected. Does someone have a clue of what is going wrong. It is boggling me now for about two days and I really have no clue. Or does someone have a good suggestion on how to extract screenshots every 10 seconds without creating too much screenshots and eating up all memory and processor power.

  • ffserver Error writing frame to output

    28 mars 2014, par GarciaPL

    I am new to ffmpeg and ffserver. I spent a lot of time to stream the .avi file using ffserver. Below is my config.

    Port 8090                      # Port to bind the server to
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000             # Maximum bandwidth per client
                                  # set this high enough to exceed stream bitrate
    CustomLog -
    NoDaemon                       # Remove this if you want FFserver to daemonize after start

    RTSPPort 7654
    RTSPBindAddress 0.0.0.0

    <feed>               # This is the input feed where FFmpeg will send
      File ./feed1.ffm            # video stream.
      FileMaxSize 1G              # Maximum file size for buffering video
      ACL allow 127.0.0.1
      ACL allow 192.168.0.0 192.168.0.255
    </feed>

    <stream>
       Format avi
       Feed feed1.ffm

       VideoCodec libvpx
       VideoFrameRate 30
       VideoBitRate 800
       VideoSize 720x576

       AudioCodec aac
       Strict -2
       AudioBitRate 128
       AudioChannels 2
       AudioSampleRate 44100
       AVOptionAudio flags +global_header
    </stream>

    <stream>            # Server status URL
      Format status
      ACL allow localhost          
      ACL allow 192.168.0.0 192.168.255.255
    </stream>

    <redirect>    # Just an URL redirect for index, Redirect index.html to the appropriate site
      URL http://www.ffmpeg.org/
    </redirect>

    So, to start my ffserver I use this command :

    ffserver -d -f ffserver.conf

    and after that I start stream of this avi file using ffmpeg :

    ffmpeg -re -i russian.avi -c:v libx264 -loop 1 http://192.168.1.165:8090/feed1.ffm

    unfortunately I received two errors repeated many of times :

    Too large number of skipped frames 60120709615 > 60000
    Error writing frame to output

    I searched the entire internet....but I found nothing what would be valuable.

  • ffmpeg hwmap SW decoded frame to OpenCL and hwmap back to h264 for SW encode

    3 novembre 2019, par Oleksandr Kyrpa

    I trying speed up process and avoid copy frames between GPU and CPU. But got error : "Segmentation fault : 11", so may be I’m doing something wrong ?

    My full ffmpeg command and log here :

    ./ffmpeg -i ../720.mp4 -init_hw_device opencl=ocl:0.1 -filter_hw_device ocl  -filter_complex "hwmap,avgblur_opencl=30,hwmap"  -c:v h264 -an -t 10 -y ../out_blur.mp4 -loglevel debug

    Output :

    ./ffmpeg -i ../720.mp4 -init_hw_device opencl=ocl:0.1 -filter_hw_device ocl  -filter_complex "hwmap,avgblur_opencl=30,hwmap"  -c:v h264 -an -t 10 -y ../out_blur.mp4 -loglevel debug
    ffmpeg version N-95621-g53c21c2d6b Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
     configuration: --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-ffplay --enable-nonfree --enable-opencl
     libavutil      56. 35.101 / 56. 35.101
     libavcodec     58. 60.100 / 58. 60.100
     libavformat    58. 33.100 / 58. 33.100
     libavdevice    58.  9.100 / 58.  9.100
     libavfilter     7. 66.100 /  7. 66.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Splitting the commandline.
    Reading option '-i' ... matched as input url with argument '../720.mp4'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl=ocl:0.1'.
    Reading option '-filter_hw_device' ... matched as option 'filter_hw_device' (set hardware device used when filtering) with argument 'ocl'.
    Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'hwmap,unsharp_opencl=lx=17:ly=17:la=5,hwmap'.
    Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264'.
    Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
    Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '10'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '../out_blur.mp4' ... 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 init_hw_device (initialise hardware device) with argument opencl=ocl:0.1.
    [AVHWDeviceContext @ 0x7fbb1ec08480] 1 OpenCL platforms found.
    [AVHWDeviceContext @ 0x7fbb1ec08480] 3 OpenCL devices found on platform "Apple".
    [AVHWDeviceContext @ 0x7fbb1ec08480] 0.1: Apple / HD Graphics 4000
    Applying option filter_hw_device (set hardware device used when filtering) with argument ocl.
    Applying option filter_complex (create a complex filtergraph) with argument hwmap,unsharp_opencl=lx=17:ly=17:la=5,hwmap.
    Applying option y (overwrite output files) with argument 1.
    Applying option loglevel (set logging level) with argument debug.
    Successfully parsed a group of options.
    Parsing a group of options: input url ../720.mp4.
    Successfully parsed a group of options.
    Opening an input file: ../720.mp4.
    [NULL @ 0x7fbb1f818c00] Opening '../720.mp4' for reading
    [file @ 0x7fbb1ec3d600] Setting default whitelist 'file,crypto'
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] ISO: File Type Major Brand: isom
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Unknown dref type 0x206c7275 size 12
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Processing st: 0, edit list 0 - media time: 0, duration: 300300
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Before avformat_find_stream_info() pos: 4123312 bytes read:34929 seeks:1 nb_streams:1
    [h264 @ 0x7fbb1f9ae800] nal_unit_type: 7(SPS), nal_ref_idc: 1
    [h264 @ 0x7fbb1f9ae800] nal_unit_type: 8(PPS), nal_ref_idc: 1
    [h264 @ 0x7fbb1f9ae800] nal_unit_type: 6(SEI), nal_ref_idc: 0
    [h264 @ 0x7fbb1f9ae800] nal_unit_type: 5(IDR), nal_ref_idc: 1
    [h264 @ 0x7fbb1f9ae800] Format yuv420p chosen by get_format().
    [h264 @ 0x7fbb1f9ae800] Reinit context to 1280x720, pix_fmt: yuv420p
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] All info found
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] After avformat_find_stream_info() pos: 38244 bytes read:73125 seeks:2 frames:1
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../720.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.33.100
     Duration: 00:00:10.01, start: 0.000000, bitrate: 3295 kb/s
       Stream #0:0(und), 1, 1/30000: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 3293 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
       Metadata:
         handler_name    : ISO Media file produced by Google Inc. Created on: 10/24/2018.
    Successfully opened the file.
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'lx' to value '17'
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'ly' to value '17'
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'la' to value '5'
    Parsing a group of options: output url ../out_blur.mp4.
    Applying option c:v (codec name) with argument h264.
    Applying option an (disable audio) with argument 1.
    Applying option t (record or transcode "duration" seconds of audio/video) with argument 10.
    Successfully parsed a group of options.
    Opening an output file: ../out_blur.mp4.
    Matched encoder 'libx264' for codec 'h264'.
    [file @ 0x7fbb1ec44680] Setting default whitelist 'file,crypto'
    Successfully opened the file.
    detected 8 logical cores
    [h264 @ 0x7fbb1f9a9800] nal_unit_type: 7(SPS), nal_ref_idc: 1
    [h264 @ 0x7fbb1f9a9800] nal_unit_type: 8(PPS), nal_ref_idc: 1
    Stream mapping:
     Stream #0:0 (h264) -> hwmap
     hwmap -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
       Last message repeated 1 times
    [h264 @ 0x7fbb1f9a9800] nal_unit_type: 6(SEI), nal_ref_idc: 0
    [h264 @ 0x7fbb1f9a9800] nal_unit_type: 5(IDR), nal_ref_idc: 1
    [h264 @ 0x7fbb1f9a9800] Format yuv420p chosen by get_format().
    [h264 @ 0x7fbb1f9a9800] Reinit context to 1280x720, pix_fmt: yuv420p
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1f9b7e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1f9cf200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1fa04c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1fa1b000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1fa24800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1fa24e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    [h264 @ 0x7fbb1fa25400] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [h264 @ 0x7fbb22809200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'lx' to value '17'
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'ly' to value '17'
    [Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'la' to value '5'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'video_size' to value '1280x720'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'pix_fmt' to value '0'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'time_base' to value '1/30000'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'pixel_aspect' to value '1/1'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'sws_param' to value 'flags=2'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'frame_rate' to value '30000/1001'
    [graph 0 input from stream 0:0 @ 0x7fbb1ee09040] w:1280 h:720 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:1/1 sws_param:flags=2
    [format @ 0x7fbb1ed0a080] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le'
    [AVFilterGraph @ 0x7fbb21004240] query_formats: 7 queried, 6 merged, 0 already done, 0 delayed
    [Parsed_hwmap_2 @ 0x7fbb1ed03e00] picking yuv420p out of 13 ref:opencl alpha:1
    [Parsed_hwmap_0 @ 0x7fbb1ed09940] Configure hwmap yuv420p -> opencl.
    [Parsed_hwmap_2 @ 0x7fbb1ed03e00] Configure hwmap opencl -> yuv420p.
    [hwmap @ 0x7fbb1ed03940] Filter input: yuv420p, 1280x720 (0).
    Segmentation fault: 11