Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (35)

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

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

Sur d’autres sites (7783)

  • How to solve file path error while using ffprobe to find length of video file in python ?

    4 février 2018, par Mitchell Faas

    So, I’m trying to find the length of a video file by the methods discussed here : How to get the duration of a video in Python ?, Using ffmpeg to obtain video durations in python. But in doing so I run in to a problem which I haven’t been able to solve : I get

    FileNotFoundError:[WinError 2] The system cannot find the file specified

    after trying a bunch of troubleshooting steps I’ve started running in IPython and in cmd seperately to see where things might break down. Using a stripped down version of this code in IPython gives me

    In [11]: subprocess.Popen([ffmpeg_path+'ffprobe'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    Out[11]:

    which seems to be fine, as is CMD at this point. So to adding slight complexity :

    In [17]: subprocess.Popen([ffmpeg_path+'ffprobe -i "F:/tst.mp4"'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    ---------------------------------------------------------------------------
    FileNotFoundError                         Traceback (most recent call last)
    in <module>()
    ----> 1 subprocess.Popen([ffmpeg_path+'ffprobe -i "F:/tst.mp4"'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

    C:\Python\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
       705                                 c2pread, c2pwrite,
       706                                 errread, errwrite,
    --> 707                                 restore_signals, start_new_session)
       708         except:
       709             # Cleanup if the child failed starting.

    C:\Python\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
       988                                          env,
       989                                          cwd,
    --> 990                                          startupinfo)
       991             finally:
       992                 # Child is launched. Close the parent's copy of those pipe

    FileNotFoundError: [WinError 2] The system cannot find the file specified
    </module>

    This crashes IPython. Running the very same command ffprobe -i "F:/tst.mp4" in CMD works like a charm.

    Here’s what I tried : Changing / to \ and \ , adding and removing quotes around the file path, changing the path to C :\tst.mp4.

    Running the command os.system(ffmpeg_path+'ffprobe -i "F:/tst.mp4") does work.

    What could possibly be going wrong here ?

  • FFmpeg stops encoding after x minutes when using Mjpeg

    31 janvier 2018, par Rune Aspvik

    I’m using ffmpeg in a node application with this command :

    ffmpeg -seekable 0 -i http://127.0.0.1:8100/Mjpeg/1?authToken=xxx -video_size 1280x720 -r 30 -pix_fmt yuv420p -y D:\Video\pflyers\test.mp4

    The encoding would stop after 28:53 every time. After some reading I figured I had to spawn the child instead of exec because of the large sterr output.

    Before doing that I wanted to see if that was in fact the issue so I tried doing :

    -nostats -hide_banner -loglevel panic

    to avoid the large output to sterr. FFmpeg still stopped after 28:53. Further I tried to write the sterr to log.txt instead of using the above code. I did so adding this to the end :

    2> log.txt

    Still it would stop at 28:53.

    Finally I tried running the command in cmd.exe resulting in the encoding stopping at 29:14.

    What I realized comparing the outputs from ffmpeg run from node and run from cmd.exe was that the encoding stopped when the log.txt reached 388kB.

    How can I fix this ?

    Here’s the full output :

    C:\Users\VossVind>ffmpeg -seekable 0 -i http://127.0.0.1:8100/Mjpeg/1?authToken=xxx -video_size 1280x720 -r 30 -pix_fmt yuv420p -y D:\Video\pflyers\test.mp4
    ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     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
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, mpjpeg, from 'http://127.0.0.1:8100/Mjpeg/1?authToken=xxx':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [swscaler @ 0000019639b27fc0] deprecated pixel format used, make sure you did set range correctly
    [libx264 @ 0000019639944040] using SAR=1/1
    [libx264 @ 0000019639944040] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 0000019639944040] profile High, level 3.1
    [libx264 @ 0000019639944040] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=18 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=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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'D:\Video\pflyers\test.mp4':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    More than 1000 frames duplicated  114432kB time=00:03:17.80 bitrate=4739.3kbits/s dup=1000 drop=0 speed=0.95x
    frame=52544 fps= 29 q=-1.0 Lsize= 1050136kB time=00:29:11.36 bitrate=4912.0kbits/s dup=8757 drop=0 speed=0.972x
    video:1049508kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.059803%
    [libx264 @ 0000019639944040] frame I:261   Avg QP:20.59  size: 51862
    [libx264 @ 0000019639944040] frame P:15400 Avg QP:23.72  size: 33007
    [libx264 @ 0000019639944040] frame B:36883 Avg QP:24.55  size: 14989
    [libx264 @ 0000019639944040] consecutive B-frames:  0.9% 15.8%  2.5% 80.8%
    [libx264 @ 0000019639944040] mb I  I16..4: 17.1% 82.1%  0.8%
    [libx264 @ 0000019639944040] mb P  I16..4:  4.3% 48.4%  0.2%  P16..4: 12.3%  7.5%  4.8%  0.0%  0.0%    skip:22.5%
    [libx264 @ 0000019639944040] mb B  I16..4:  2.7% 15.6%  0.0%  B16..8: 22.3%  7.0%  1.8%  direct: 3.8%  skip:46.8%  L0:52.3% L1:34.0% BI:13.8%
    [libx264 @ 0000019639944040] 8x8 transform intra:88.6% inter:92.9%
    [libx264 @ 0000019639944040] coded y,uvDC,uvAC intra: 59.4% 33.6% 2.6% inter: 19.3% 10.9% 0.6%
    [libx264 @ 0000019639944040] i16 v,h,dc,p: 57% 30% 12%  1%
    [libx264 @ 0000019639944040] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 18% 45%  2%  1%  1%  2%  2%  3%
    [libx264 @ 0000019639944040] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 52% 24% 12%  2%  2%  2%  2%  2%  2%
    [libx264 @ 0000019639944040] i8c dc,h,v,p: 63% 17% 20%  1%
    [libx264 @ 0000019639944040] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0000019639944040] ref P L0: 43.8%  7.5% 29.1% 19.6%
    [libx264 @ 0000019639944040] ref B L0: 71.8% 21.2%  7.0%
    [libx264 @ 0000019639944040] ref B L1: 93.9%  6.1%
    [libx264 @ 0000019639944040] kb/s:4908.78

    Link to -v 48 verbose logging : https://pastebin.com/YwQx8bB2

  • FFmpeg stops encoding when log file reaches 388 kB

    30 janvier 2018, par Rune Aspvik

    I’m using ffmpeg in a node application with this command :

    ffmpeg -seekable 0 -i http://127.0.0.1:8100/Mjpeg/1?authToken=xxx -video_size 1280x720 -r 30 -pix_fmt yuv420p -y D:\Video\pflyers\test.mp4

    The encoding would stop after 28:53 every time. After some reading I figured I had to spawn the child instead of exec because of the large sterr output.

    Before doing that I wanted to see if that was in fact the issue so I tried doing :

    -nostats -hide_banner -loglevel panic

    to avoid the large output to sterr. FFmpeg still stopped after 28:53. Further I tried to write the sterr to log.txt instead of using the above code. I did so adding this to the end :

    2> log.txt

    Still it would stop at 28:53.

    Finally I tried running the command in cmd.exe resulting in the encoding stopping at 29:14.

    What I realized comparing the outputs from ffmpeg run from node and run from cmd.exe was that the encoding stopped when the log.txt reached 388kB.

    How can I fix this ?

    Here’s the full output :

    C:\Users\VossVind>ffmpeg -seekable 0 -i http://127.0.0.1:8100/Mjpeg/1?authToken=xxx -video_size 1280x720 -r 30 -pix_fmt yuv420p -y D:\Video\pflyers\test.mp4
    ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     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
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, mpjpeg, from 'http://127.0.0.1:8100/Mjpeg/1?authToken=xxx':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [swscaler @ 0000019639b27fc0] deprecated pixel format used, make sure you did set range correctly
    [libx264 @ 0000019639944040] using SAR=1/1
    [libx264 @ 0000019639944040] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 0000019639944040] profile High, level 3.1
    [libx264 @ 0000019639944040] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=18 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=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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'D:\Video\pflyers\test.mp4':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    More than 1000 frames duplicated  114432kB time=00:03:17.80 bitrate=4739.3kbits/s dup=1000 drop=0 speed=0.95x
    frame=52544 fps= 29 q=-1.0 Lsize= 1050136kB time=00:29:11.36 bitrate=4912.0kbits/s dup=8757 drop=0 speed=0.972x
    video:1049508kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.059803%
    [libx264 @ 0000019639944040] frame I:261   Avg QP:20.59  size: 51862
    [libx264 @ 0000019639944040] frame P:15400 Avg QP:23.72  size: 33007
    [libx264 @ 0000019639944040] frame B:36883 Avg QP:24.55  size: 14989
    [libx264 @ 0000019639944040] consecutive B-frames:  0.9% 15.8%  2.5% 80.8%
    [libx264 @ 0000019639944040] mb I  I16..4: 17.1% 82.1%  0.8%
    [libx264 @ 0000019639944040] mb P  I16..4:  4.3% 48.4%  0.2%  P16..4: 12.3%  7.5%  4.8%  0.0%  0.0%    skip:22.5%
    [libx264 @ 0000019639944040] mb B  I16..4:  2.7% 15.6%  0.0%  B16..8: 22.3%  7.0%  1.8%  direct: 3.8%  skip:46.8%  L0:52.3% L1:34.0% BI:13.8%
    [libx264 @ 0000019639944040] 8x8 transform intra:88.6% inter:92.9%
    [libx264 @ 0000019639944040] coded y,uvDC,uvAC intra: 59.4% 33.6% 2.6% inter: 19.3% 10.9% 0.6%
    [libx264 @ 0000019639944040] i16 v,h,dc,p: 57% 30% 12%  1%
    [libx264 @ 0000019639944040] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 18% 45%  2%  1%  1%  2%  2%  3%
    [libx264 @ 0000019639944040] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 52% 24% 12%  2%  2%  2%  2%  2%  2%
    [libx264 @ 0000019639944040] i8c dc,h,v,p: 63% 17% 20%  1%
    [libx264 @ 0000019639944040] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0000019639944040] ref P L0: 43.8%  7.5% 29.1% 19.6%
    [libx264 @ 0000019639944040] ref B L0: 71.8% 21.2%  7.0%
    [libx264 @ 0000019639944040] ref B L1: 93.9%  6.1%
    [libx264 @ 0000019639944040] kb/s:4908.78