Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8537)

  • Cryptic `ffmpeg` + Python error : `Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_crop_1`

    5 août 2022, par mattze_frisch

    I want to use ffmpeg with Python in a Jupyter notebook to create a video from 2000 PNG image files generated by matplotlib. I'm on a Windows 7 machine.

    


    The frames are very narrow and high, so I'd like to cut them vertically into seven equal-sized "tiles" using crop and stacked those "tiles" horizontally using hstack, but I'm getting only getting cryptic error messages :

    


    ffmpeg_path = notebook_directory    # Make sure ffmpeg.exe is in notebook directory!&#xA;&#xA;frames_path = &#x27;C:\\Users\\Username\\Desktop&#x27;&#xA;frames_renamed_path = os.path.join(frames_path, &#x27;renamed&#x27;)&#xA;os.chdir(frames_renamed_path)    # Temporarily change current working directory&#xA;&#xA;check_call(&#xA;    [&#xA;        os.path.join(ffmpeg_path, &#x27;ffmpeg&#x27;),&#xA;        &#x27;-y&#x27;,    # Overwrite output files without asking&#xA;        &#x27;-report&#x27;,    # Write logfile to current working directory&#xA;        &#x27;-hwaccel&#x27;, &#x27;cuda&#x27;,    # Use GPU acceleration&#xA;        &#x27;-framerate&#x27;, &#x27;60&#x27;,    # Input frame rate&#xA;        &#x27;-i&#x27;, os.path.join(frames_renamed_path, &#x27;frame%05d.png&#x27;),    # Path to input frames&#xA;        #&#x27;-r&#x27;, &#x27;60&#x27;,    # Output frame rate&#xA;        #&#x27;-vf&#x27;, &#x27;pad=ceil(iw/2)*2:ceil(ih/2)*2&#x27;,    # Pad frames to even pixel numbers (required by many codecs)&#xA;        #&#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;        &#x27;-pix_fmt&#x27;, &#x27;rgb32&#x27;,    # Use RGB32 pixel format matching MatPlotLib image output&#xA;        &#x27;-filter_complex&#x27;,    # Cut frames into tiles and rearrange (here: 7 horizontal tiles)&#xA;            &#x27;crop=in_w:in_h/7:0:0[tile_1],&#x27;    # 1st tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*1/7[tile_2],&#x27;    # 2nd tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*2/7[tile_3],&#x27;    # 3rd tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*3/7[tile_4],&#x27;    # 4th tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*4/7[tile_5],&#x27;    # 5th tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*5/7[tile_6],&#x27;    # 6th tile from top&#xA;            &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*6/7[tile_7],&#x27;    # 7th tile from top&#xA;            &#x2B; &#x27;[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7&#x27;,    # Stack tiles horizontally&#xA;        os.path.join(frames_renamed_path, &#x27;video.mp4&#x27;)    # Path to store output video&#xA;    ]&#xA;)&#xA;&#xA;os.chdir(notebook_directory)    # Reset current working directory to notebook directory&#xA;&#xA;---------------------------------------------------------------------------&#xA;CalledProcessError                        Traceback (most recent call last)&#xA;Input In [10], in <cell 9="9">()&#xA;      6 frames_renamed_path = os.path.join(frames_path, &#x27;renamed&#x27;)&#xA;      7 os.chdir(frames_renamed_path)    # Temporarily change current working directory&#xA;----> 9 check_call(&#xA;     10     [&#xA;     11         os.path.join(ffmpeg_path, &#x27;ffmpeg&#x27;),&#xA;     12         &#x27;-y&#x27;,    # Overwrite output files without asking&#xA;     13         &#x27;-report&#x27;,    # Write logfile to current working directory&#xA;     14         &#x27;-hwaccel&#x27;, &#x27;cuda&#x27;,    # Use GPU acceleration&#xA;     15         &#x27;-framerate&#x27;, &#x27;60&#x27;,    # Input frame rate&#xA;     16         &#x27;-i&#x27;, os.path.join(frames_renamed_path, &#x27;frame%05d.png&#x27;),    # Path to input frames&#xA;     17         #&#x27;-pattern_type&#x27;, &#x27;glob&#x27;, &#x27;-i&#x27;, os.path.join(frames_renamed_path, &#x27;*.png&#x27;),    # glob not available in Windows by default&#xA;     18         #&#x27;-r&#x27;, &#x27;60&#x27;,    # Output frame rate&#xA;     19         &#x27;-vf&#x27;, &#x27;pad=ceil(iw/2)*2:ceil(ih/2)*2&#x27;,    # Pad frames to even pixel numbers (required by many codecs)&#xA;     20         #&#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;     21         &#x27;-pix_fmt&#x27;, &#x27;rgb32&#x27;,    # Use RGB32 pixel format matching MatPlotLib image output&#xA;     22         &#x27;-filter_complex&#x27;,    # Cut frames into tiles and rearrange (here: 7 horizontal tiles)&#xA;     23             &#x27;crop=in_w:in_h/7:0:0[tile_1],&#x27;    # 1st tile from top&#xA;     24             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*1/7[tile_2],&#x27;    # 2nd tile from top&#xA;     25             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*2/7[tile_3],&#x27;    # 3rd tile from top&#xA;     26             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*3/7[tile_4],&#x27;    # 4th tile from top&#xA;     27             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*4/7[tile_5],&#x27;    # 5th tile from top&#xA;     28             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*5/7[tile_6],&#x27;    # 6th tile from top&#xA;     29             &#x2B; &#x27;crop=in_w:in_h/7:0:in_h*6/7[tile_7],&#x27;    # 7th tile from top&#xA;     30             &#x2B; &#x27;[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7&#x27;,    # Stack tiles horizontally&#xA;     31         os.path.join(frames_renamed_path, &#x27;video.mp4&#x27;)    # Path to store output video&#xA;     32     ]&#xA;     33 )&#xA;     35 os.chdir(notebook_directory)&#xA;&#xA;File C:\Program Files\Python38\lib\subprocess.py:364, in check_call(*popenargs, **kwargs)&#xA;    362     if cmd is None:&#xA;    363         cmd = popenargs[0]&#xA;--> 364     raise CalledProcessError(retcode, cmd)&#xA;    365 return 0&#xA;&#xA;CalledProcessError: Command &#x27;[&#x27;C:\\Users\\Username\\Desktop\\ffmpeg\\ffmpeg&#x27;, &#x27;-y&#x27;, &#x27;-report&#x27;, &#x27;-hwaccel&#x27;, &#x27;cuda&#x27;, &#x27;-framerate&#x27;, &#x27;60&#x27;, &#x27;-i&#x27;, &#x27;C:\\Users\\Username\\Desktop\\renamed\\frame%05d.png&#x27;, &#x27;-vf&#x27;, &#x27;pad=ceil(iw/2)*2:ceil(ih/2)*2&#x27;, &#x27;-pix_fmt&#x27;, &#x27;rgb32&#x27;, &#x27;-filter_complex&#x27;, &#x27;crop=in_w:in_h/7:0:0[tile_1],crop=in_w:in_h/7:0:in_h*1/7[tile_2],crop=in_w:in_h/7:0:in_h*2/7[tile_3],crop=in_w:in_h/7:0:in_h*3/7[tile_4],crop=in_w:in_h/7:0:in_h*4/7[tile_5],crop=in_w:in_h/7:0:in_h*5/7[tile_6],crop=in_w:in_h/7:0:in_h*6/7[tile_7],[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7&#x27;, &#x27;C:\\Users\\Username\\Desktop\\renamed\\video.mp4&#x27;]&#x27; returned non-zero exit status 1.&#xA;</cell>

    &#xA;

    This is the ffmpeg log output (cropped) :

    &#xA;

    ffmpeg started on 2022-08-04 at 01:17:19&#xA;Report written to "ffmpeg-20220804-011719.log"&#xA;Log level: 48&#xA;Command line:&#xA;"C:\\Users\\Username\\Desktop\\ffmpeg\\ffmpeg" -y -report -hwaccel cuda -framerate 60 -i "C:\\Users\\Username\\Desktop\\renamed\\frame%05d.png" -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -pix_fmt rgb32 -filter_complex "crop=in_w:in_h/7:0:0[tile_1],crop=in_w:in_h/7:0:in_h*1/7[tile_2],crop=in_w:in_h/7:0:in_h*2/7[tile_3],crop=in_w:in_h/7:0:in_h*3/7[tile_4],crop=in_w:in_h/7:0:in_h*4/7[tile_5],crop=in_w:in_h/7:0:in_h*5/7[tile_6],crop=in_w:in_h/7:0:in_h*6/7[tile_7],[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7" "C:\\Users\\Username\\Desktop\\renamed\\video.mp4"&#xA;ffmpeg version 2022-07-14-git-882aac99d2-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --ena  libavutil      57. 29.100 / 57. 29.100&#xA;  libavcodec     59. 38.100 / 59. 38.100&#xA;  libavformat    59. 28.100 / 59. 28.100&#xA;  libavdevice    59.  8.100 / 59.  8.100&#xA;  libavfilter     8. 45.100 /  8. 45.100&#xA;  libswscale      6.  8.100 /  6.  8.100&#xA;  libswresample   4.  8.100 /  4.  8.100&#xA;  libpostproc    56.  7.100 / 56.  7.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-y&#x27; ... matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-report&#x27; ... matched as option &#x27;report&#x27; (generate a report) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-hwaccel&#x27; ... matched as option &#x27;hwaccel&#x27; (use HW accelerated decoding) with argument &#x27;cuda&#x27;.&#xA;Reading option &#x27;-framerate&#x27; ... matched as AVOption &#x27;framerate&#x27; with argument &#x27;60&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;C:\Users\Username\Desktop\renamed\frame%05d.png&#x27;.&#xA;Reading option &#x27;-vf&#x27; ... matched as option &#x27;vf&#x27; (set video filters) with argument &#x27;pad=ceil(iw/2)*2:ceil(ih/2)*2&#x27;.&#xA;Reading option &#x27;-pix_fmt&#x27; ... matched as option &#x27;pix_fmt&#x27; (set pixel format) with argument &#x27;rgb32&#x27;.&#xA;Reading option &#x27;-filter_complex&#x27; ... matched as option &#x27;filter_complex&#x27; (create a complex filtergraph) with argument &#x27;crop=in_w:in_h/7:0:0[tile_1],crop=in_w:in_h/7:0:in_h*1/7[tile_2],crop=in_w:in_h/7:0:in_h*2/7[tile_3],crop=in_w:in_h/7:0:in_h*3/7[tile_4],crop=in_w:in_h/7:0:in_h*4/7[tile_5],crop=in_w:in_h/7:0:in_h*5/7[tile_6],crop=in_w:in_h/7:0:in_h*6/7[tile_7],[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7&#x27;.&#xA;Reading option &#x27;C:\Users\Username\Desktop\renamed\video.mp4&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option y (overwrite output files) with argument 1.&#xA;Applying option report (generate a report) with argument 1.&#xA;Applying option filter_complex (create a complex filtergraph) with argument crop=in_w:in_h/7:0:0[tile_1],crop=in_w:in_h/7:0:in_h*1/7[tile_2],crop=in_w:in_h/7:0:in_h*2/7[tile_3],crop=in_w:in_h/7:0:in_h*3/7[tile_4],crop=in_w:in_h/7:0:in_h*4/7[tile_5],crop=in_w:in_h/7:0:in_h*5/7[tile_6],crop=in_w:in_h/7:0:in_h*6/7[tile_7],[tile_1][tile_2][tile_3][tile_4][tile_5][tile_6][tile_7]hstack=7.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url C:\Users\Username\Desktop\renamed\frame%05d.png.&#xA;Applying option hwaccel (use HW accelerated decoding) with argument cuda.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: C:\Users\Username\Desktop\renamed\frame%05d.png.&#xA;[image2 @ 00000000005db0c0] Opening &#x27;C:\Users\Username\Desktop\renamed\frame00000.png&#x27; for reading&#xA;[file @ 00000000005f6c00] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;[AVIOContext @ 00000000005fed40] Statistics: 28860 bytes read, 0 seeks&#xA;&#xA;&lt;...>&#xA;&#xA;[AVIOContext @ 00000000005fda00] Statistics: 67659 bytes read, 0 seeks&#xA;[image2 @ 00000000005db0c0] Probe buffer size limit of 5000000 bytes reached&#xA;Input #0, image2, from &#x27;C:\Users\Username\Desktop\renamed\frame%05d.png&#x27;:&#xA;  Duration: 00:00:25.00, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0, 80, 1/60: Video: png, rgba(pc), 1200x1857 [SAR 3937:3937 DAR 400:619], 60 fps, 60 tbr, 60 tbn&#xA;Successfully opened the file.&#xA;[Parsed_crop_0 @ 00000000005fdc40] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_0 @ 00000000005fdc40] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_0 @ 00000000005fdc40] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_0 @ 00000000005fdc40] Setting &#x27;y&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_1 @ 0000000000607500] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_1 @ 0000000000607500] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_1 @ 0000000000607500] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_1 @ 0000000000607500] Setting &#x27;y&#x27; to value &#x27;in_h*1/7&#x27;&#xA;[Parsed_crop_2 @ 0000000000607880] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_2 @ 0000000000607880] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_2 @ 0000000000607880] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_2 @ 0000000000607880] Setting &#x27;y&#x27; to value &#x27;in_h*2/7&#x27;&#xA;[Parsed_crop_3 @ 0000000000607c00] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_3 @ 0000000000607c00] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_3 @ 0000000000607c00] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_3 @ 0000000000607c00] Setting &#x27;y&#x27; to value &#x27;in_h*3/7&#x27;&#xA;[Parsed_crop_4 @ 00000000005fda00] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_4 @ 00000000005fda00] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_4 @ 00000000005fda00] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_4 @ 00000000005fda00] Setting &#x27;y&#x27; to value &#x27;in_h*4/7&#x27;&#xA;[Parsed_crop_5 @ 0000000002b8f800] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_5 @ 0000000002b8f800] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_5 @ 0000000002b8f800] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_5 @ 0000000002b8f800] Setting &#x27;y&#x27; to value &#x27;in_h*5/7&#x27;&#xA;[Parsed_crop_6 @ 0000000000607d00] Setting &#x27;out_w&#x27; to value &#x27;in_w&#x27;&#xA;[Parsed_crop_6 @ 0000000000607d00] Setting &#x27;out_h&#x27; to value &#x27;in_h/7&#x27;&#xA;[Parsed_crop_6 @ 0000000000607d00] Setting &#x27;x&#x27; to value &#x27;0&#x27;&#xA;[Parsed_crop_6 @ 0000000000607d00] Setting &#x27;y&#x27; to value &#x27;in_h*6/7&#x27;&#xA;[Parsed_hstack_7 @ 0000000002b8fb80] Setting &#x27;inputs&#x27; to value &#x27;7&#x27;&#xA;Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_crop_1&#xA;

    &#xA;

    What is the problem here ? Also, how does one interpret this cryptic error message at the end of the log output :

    &#xA;

    Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_crop_1

    &#xA;

    E.g. what is input pad 0, why is it unlabeled, and why can't it find a matching stream ?

    &#xA;

    (PS. : Yes, I do have a habit of excessively documenting my code. ^^)

    &#xA;

  • Dash output with ffmpeg not producing durations specified with -seg_duration

    30 juillet 2022, par Codie

    There is a .mp4 file of 35 MB and 51 seconds. I have to create 51 chunks, each corresponding to 1 second with a size of less than 1MB (the total size should be almost the same as the original file). Please note that I have to implement lossless converting.

    &#xA;

    I've tried many times, but it just produces about 10 files above 10 MB.

    &#xA;


    &#xA;

    Command :

    &#xA;

    ffmpeg -re -i input.mp4 -map 0:v -c:v libx264 -crf 0 -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -use_template 1 -seg_duration 1 -window_size 60 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash ./dashTest/out.mpd&#xA;

    &#xA;


    &#xA;

    Command line log :

    &#xA;

    ffmpeg version 5.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    creation_time   : 2022-07-27T09:13:31.000000Z&#xA;  Duration: 00:00:50.03, start: 0.000000, bitrate: 5716 kb/s&#xA;  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 5396 kb/s, 25 fps, 25 tbr, 25k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : AVC Coding&#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : #Mainconcept MP4 Sound Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 000001d13acb0380] using SAR=1/1&#xA;[libx264 @ 000001d13acb0380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX&#xA;[libx264 @ 000001d13acb0380] profile High 4:4:4 Predictive, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 000001d13acb0380] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=120 keyint_min=61 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0&#xA;[dash @ 000001d13a2a4680] No bit rate set for stream 0&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/init-stream0.m4s&#x27; for writing&#xA;Output #0, dash, to &#x27;./dashTest/out.mpd&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    encoder         : Lavf59.27.100&#xA;  Stream #0:0(eng): Video: h264, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc59.37.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00001.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.849x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00002.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.918x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00003.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.942x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00004.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.957x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00005.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.964x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00006.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.971x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00007.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.975x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00008.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.978x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00009.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.981x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00010.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.982x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00011.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.983x&#xA;frame= 1250 fps= 25 q=-1.0 Lsize=N/A time=00:00:49.96 bitrate=N/A speed=0.992x&#xA;video:171641kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;[libx264 @ 000001d13acb0380] frame I:11    Avg QP: 0.00  size:255122&#xA;[libx264 @ 000001d13acb0380] frame P:1239  Avg QP: 0.00  size:139591&#xA;[libx264 @ 000001d13acb0380] mb I  I16..4: 52.8%  8.8% 38.4%&#xA;[libx264 @ 000001d13acb0380] mb P  I16..4:  3.9%  0.7%  1.3%  P16..4: 28.0% 13.9% 11.3%  0.0%  0.0%    skip:40.8%&#xA;[libx264 @ 000001d13acb0380] 8x8 transform intra:11.9% inter:33.4%&#xA;[libx264 @ 000001d13acb0380] coded y,uvDC,uvAC intra: 68.6% 80.1% 78.9% inter: 38.0% 47.1% 46.5%&#xA;[libx264 @ 000001d13acb0380] i16 v,h,dc,p: 65% 28%  5%  2%&#xA;[libx264 @ 000001d13acb0380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 33% 28%  2%  1%  1%  1%  1%  1%&#xA;[libx264 @ 000001d13acb0380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 36%  7%  3%  5%  3%  4%  3%  2%&#xA;[libx264 @ 000001d13acb0380] i8c dc,h,v,p: 17% 38% 44%  1%&#xA;[libx264 @ 000001d13acb0380] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 000001d13acb0380] ref P L0: 86.4%  7.6%  4.6%  1.4%&#xA;[libx264 @ 000001d13acb0380] kb/s:28121.58&#xA;

    &#xA;


    &#xA;

    .mpd file :

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT50.0S" maxsegmentduration="PT1.0S" minbuffertime="PT9.6S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="25/1" maxwidth="1280" maxheight="720" par="16:9" lang="eng">&#xA;            <representation mimetype="video/mp4" codecs="avc1.f4001f" bandwidth="28122926" width="1280" height="720" sar="1:1">&#xA;                <segmenttemplate timescale="12800" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="61440" r="9"></s>&#xA;                        <s d="25600"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;

    &#xA;


    &#xA;

    Please, if you want to put a negative point, mention your reason in the comments !

    &#xA;


    &#xA;
  • Can't convert .ts files that downloaded from .m3u8 file to mp4

    23 juin 2023, par smartnima

    I Have This Files :

    &#xA;

    001.ts  014.ts  027.ts  040.ts  053.ts  066.ts  079.ts  092.ts  105.ts  118.ts  131.ts  144.ts  157.ts  170.ts  183.ts  196.ts  209.ts  222.ts  235.ts  248.ts  261.ts  274.ts  287.ts  300.ts  313.ts  326.ts&#xA;002.ts  015.ts  028.ts  041.ts  054.ts  067.ts  080.ts  093.ts  106.ts  119.ts  132.ts  145.ts  158.ts  171.ts  184.ts  197.ts  210.ts  223.ts  236.ts  249.ts  262.ts  275.ts  288.ts  301.ts  314.ts  327.ts&#xA;003.ts  016.ts  029.ts  042.ts  055.ts  068.ts  081.ts  094.ts  107.ts  120.ts  133.ts  146.ts  159.ts  172.ts  185.ts  198.ts  211.ts  224.ts  237.ts  250.ts  263.ts  276.ts  289.ts  302.ts  315.ts  328.ts&#xA;004.ts  017.ts  030.ts  043.ts  056.ts  069.ts  082.ts  095.ts  108.ts  121.ts  134.ts  147.ts  160.ts  173.ts  186.ts  199.ts  212.ts  225.ts  238.ts  251.ts  264.ts  277.ts  290.ts  303.ts  316.ts  329.ts&#xA;005.ts  018.ts  031.ts  044.ts  057.ts  070.ts  083.ts  096.ts  109.ts  122.ts  135.ts  148.ts  161.ts  174.ts  187.ts  200.ts  213.ts  226.ts  239.ts  252.ts  265.ts  278.ts  291.ts  304.ts  317.ts  330.ts&#xA;006.ts  019.ts  032.ts  045.ts  058.ts  071.ts  084.ts  097.ts  110.ts  123.ts  136.ts  149.ts  162.ts  175.ts  188.ts  201.ts  214.ts  227.ts  240.ts  253.ts  266.ts  279.ts  292.ts  305.ts  318.ts  331.ts&#xA;007.ts  020.ts  033.ts  046.ts  059.ts  072.ts  085.ts  098.ts  111.ts  124.ts  137.ts  150.ts  163.ts  176.ts  189.ts  202.ts  215.ts  228.ts  241.ts  254.ts  267.ts  280.ts  293.ts  306.ts  319.ts  332.ts&#xA;008.ts  021.ts  034.ts  047.ts  060.ts  073.ts  086.ts  099.ts  112.ts  125.ts  138.ts  151.ts  164.ts  177.ts  190.ts  203.ts  216.ts  229.ts  242.ts  255.ts  268.ts  281.ts  294.ts  307.ts  320.ts  333.ts&#xA;009.ts  022.ts  035.ts  048.ts  061.ts  074.ts  087.ts  100.ts  113.ts  126.ts  139.ts  152.ts  165.ts  178.ts  191.ts  204.ts  217.ts  230.ts  243.ts  256.ts  269.ts  282.ts  295.ts  308.ts  321.ts  334.ts&#xA;010.ts  023.ts  036.ts  049.ts  062.ts  075.ts  088.ts  101.ts  114.ts  127.ts  140.ts  153.ts  166.ts  179.ts  192.ts  205.ts  218.ts  231.ts  244.ts  257.ts  270.ts  283.ts  296.ts  309.ts  322.ts&#xA;011.ts  024.ts  037.ts  050.ts  063.ts  076.ts  089.ts  102.ts  115.ts  128.ts  141.ts  154.ts  167.ts  180.ts  193.ts  206.ts  219.ts  232.ts  245.ts  258.ts  271.ts  284.ts  297.ts  310.ts  323.ts&#xA;012.ts  025.ts  038.ts  051.ts  064.ts  077.ts  090.ts  103.ts  116.ts  129.ts  142.ts  155.ts  168.ts  181.ts  194.ts  207.ts  220.ts  233.ts  246.ts  259.ts  272.ts  285.ts  298.ts  311.ts  324.ts&#xA;013.ts  026.ts  039.ts  052.ts  065.ts  078.ts  091.ts  104.ts  117.ts  130.ts  143.ts  156.ts  169.ts  182.ts  195.ts  208.ts  221.ts  234.ts  247.ts  260.ts  273.ts  286.ts  299.ts  312.ts  325.ts&#xA;

    &#xA;

    That I Downloaded With This Python Program (m3u8 File Does Not Work !) :

    &#xA;

    import requests&#xA;import shutil&#xA;import os&#xA;import subprocess&#xA;&#xA;&#xA;def strip_end(text, suffix):&#xA;    if not text.endswith(suffix):&#xA;        return text&#xA;    return text[:len(text)-len(suffix)]&#xA;&#xA;&#xA;def download_file(url):&#xA;    cwd = os.getcwd()&#xA;    command = f"wget -O {cwd}/ts_files/{url.split(&#x27;/&#x27;)[-1]} {url}"&#xA;    subprocess.call(command, shell=True)&#xA;&#xA;&#xA;base_url = "https://stream.example.com/video/2021/example/720p_{}.ts"&#xA;&#xA;if not os.path.exists(&#x27;ts_files&#x27;):&#xA;    print(&#x27;ts_file folder is not found, creating the folder.&#x27;)&#xA;    os.makedirs(&#x27;ts_files&#x27;)&#xA;&#xA;i = 1&#xA;while True:&#xA;    if len(str(i)) == 1:&#xA;        num = f"00{i}"&#xA;    elif len(str(i)) == 2:&#xA;        num = f"0{i}"&#xA;    else:&#xA;        num = str(i)&#xA;    url = base_url.replace("{}", num)&#xA;    r = requests.get(url, stream=True)&#xA;    print(f&#x27;downloading {i}&#x27;)&#xA;    if r.status_code != 404:&#xA;        download_file(url)  # comment out this line to download ts files.&#xA;    else:&#xA;        print("404")&#xA;        break&#xA;    i = i&#x2B;1&#xA;&#xA;cwd = os.getcwd()  # Get the current working directory (cwd)&#xA;TS_DIR = &#x27;ts_files&#x27;&#xA;with open(&#x27;merged.ts&#x27;, &#x27;wb&#x27;) as merged:&#xA;    for ts_file in os.listdir(f&#x27;{cwd}/{TS_DIR}&#x27;):&#xA;        with open(f&#x27;{cwd}/{TS_DIR}/{ts_file}&#x27;, &#x27;rb&#x27;) as mergefile:&#xA;            shutil.copyfileobj(mergefile, merged)&#xA;&#xA;

    &#xA;

    My Problem Is When I Want To Convert All This Files To One .ts File And Then An MP4 File With ffmpeg, I Get An Error :

    &#xA;

    nima@funlife:~/ts_files$ cat ./*.ts > all.ts&#xA;nima@funlife:~/ts_files$ ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4&#xA;ffmpeg version 5.0.1-3&#x2B;b1 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11 (Debian 11.3.0-4)&#xA;  configuration: --prefix=/usr --extra-version=3&#x2B;b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libplacebo --enable-libx264 --enable-shared&#xA;  libavutil      57. 17.100 / 57. 17.100&#xA;  libavcodec     59. 18.100 / 59. 18.100&#xA;  libavformat    59. 16.100 / 59. 16.100&#xA;  libavdevice    59.  4.100 / 59.  4.100&#xA;  libavfilter     8. 24.100 /  8. 24.100&#xA;  libswscale      6.  4.100 /  6.  4.100&#xA;  libswresample   4.  3.100 /  4.  3.100&#xA;  libpostproc    56.  3.100 / 56.  3.100&#xA;all.ts: Invalid data found when processing input&#xA;

    &#xA;

    .ts Files Content Is Like This :

    &#xA;

     }��,.g���}��&#xA;             �����c����Ww�c���c���eo��m�����ŧ�  䱉&#xA;�b(&#x2B;��D�FG�zPe��7�&amp;#bz�1ɶ���                      C&#xA;�`,��>Ϲc4J��̀��T�I}�"��ކ�R�1��w͋�   "� &lt;�#B`ƪ�̸�co&#xA;                                             �9���&#x2B;��W�&#xA;P���N���w��T\5g��&#xA;\�E�N�E�v��͑4f��U�@]�ΩX�U�x�E��bwm=ְ�iA�����p���M�����\=�_�I3C�hL�h����0)�ο��*��`���eZ� �ؗ4To�0V��S,�&#x2B;�>�8_]�W�lNJD�|7e�2s�1X)̃5�0h�������~8ߩg���?e��EK�>۷�L&#xA;             ��:6|������>\  �N�WW��,�w&#xA;bk��1?*��/��/�5��k����~��                 Lޕ}�a���2�{��l��$�d=����g�{a2��L�����&#xA;                         jҫַ��ʿ�"1`ZZ.he)�=�x��E_4:Vg�����H=���x1�����}��W::y�&#xA;

    &#xA;

    Are They Encrypted Or Something ?&#xA;I'm Trying To Do This Works With Debian 11.3.0-4, Python 3.10.5

    &#xA;

    Edit : Thanks Johnny, I Saw This Post : How to concatenate two MP4 files using FFmpeg ?&#xA;I Tried But I Get An Error Again !

    &#xA;

    nima@funlife:~/ts_files$ ffmpeg -f concat -i file.txt -c copy output.ts&#xA;ffmpeg version 5.0.1-3&#x2B;b1 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11 (Debian 11.3.0-4)&#xA;  configuration: --prefix=/usr --extra-version=3&#x2B;b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libplacebo --enable-libx264 --enable-shared&#xA;  libavutil      57. 17.100 / 57. 17.100&#xA;  libavcodec     59. 18.100 / 59. 18.100&#xA;  libavformat    59. 16.100 / 59. 16.100&#xA;  libavdevice    59.  4.100 / 59.  4.100&#xA;  libavfilter     8. 24.100 /  8. 24.100&#xA;  libswscale      6.  4.100 /  6.  4.100&#xA;  libswresample   4.  3.100 /  4.  3.100&#xA;  libpostproc    56.  3.100 / 56.  3.100&#xA;[concat @ 0x55932dbf2500] Impossible to open &#x27;001.ts&#x27;&#xA;file.txt: Invalid data found when processing input&#xA;

    &#xA;

    Same Error With ffmpeg -f concat -safe 0 -i file.txt -c copy output.ts

    &#xA;

    file.txt is The List Of Files !

    &#xA;