
Recherche avancée
Autres articles (60)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (9594)
-
ffmpeg -to flag not always correctly recognized when processing the same file and different time ranges
10 novembre 2019, par SebastianI have a file that I wanted to cut into few pieces. The problem is my command not always works :
ffmpeg -ss 00:00:05 -i 4.DeepPurpleJag_robocze.mp4 -to 01:00:21 -c:v copy -c:a copy testing.mp4
produces properly cut video with the output :ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --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-libvidstab --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-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4.DeepPurpleJag_robocze.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2019-11-09T13:18:48.000000Z
encoder : HandBrake 1.2.2 2019022300
Duration: 03:05:31.33, start: 0.000000, bitrate: 1045 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt709), 350x480 [SAR 65535:35816 DAR 764575:573056], 904 kb/s, SAR 14801:8089 DAR 518035:388272, 25 fps, 25 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 134 kb/s (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : SoundHandler
File 'testing.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'testing.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt709), 350x480 [SAR 14801:8089 DAR 518035:388272], q=2-31, 904 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 134 kb/s (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=23390 fps=0.0 q=-1.0 size= 122880kB time=00:15:35.35 bitrate=1076.2kbits/s sframe=47377 fps=47167 q=-1.0 size= 259584kB time=00:31:34.83 bitrate=1122.3kbits/sframe=74437 fps=49477 q=-1.0 size= 401664kB time=00:49:37.22 bitrate=1105.2kbits/sframe=90531 fps=47477 q=-1.0 Lsize= 518987kB time=01:00:20.98 bitrate=1174.1kbits/s speed=1.9e+03x
video:457170kB audio:59123kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.521705%However when I try to cut the same source with different ss and to like this
ffmpeg -ss 01:40:05 -i 4.DeepPurpleJag_robocze.mp4 -to 02:19:21 -c:v copy -c:a copy testing2.mp4
I got output file that is over 1,5h long instead of 39 minutes - the flag -to is ignored and file is cut till the end. output is :ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --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-libvidstab --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-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4.DeepPurpleJag_robocze.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2019-11-09T13:18:48.000000Z
encoder : HandBrake 1.2.2 2019022300
Duration: 03:05:31.33, start: 0.000000, bitrate: 1045 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt709), 350x480 [SAR 65535:35816 DAR 764575:573056], 904 kb/s, SAR 14801:8089 DAR 518035:388272, 25 fps, 25 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 134 kb/s (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : SoundHandler
File 'testing2.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'testing2.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt709), 350x480 [SAR 14801:8089 DAR 518035:388272], q=2-31, 904 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 134 kb/s (default)
Metadata:
creation_time : 2019-11-09T13:18:48.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=31213 fps=0.0 q=-1.0 size= 122624kB time=00:20:45.83 bitrate= 806.3kbits/s sframe=61164 fps=61143 q=-1.0 size= 267264kB time=00:40:43.87 bitrate= 895.9kbits/sframe=91215 fps=60795 q=-1.0 size= 414464kB time=01:00:45.90 bitrate= 931.3kbits/sframe=117850 fps=58914 q=-1.0 size= 541440kB time=01:18:31.28 bitrate= 941.5kbits/frame=128220 fps=58002 q=-1.0 Lsize= 581509kB time=01:25:26.26 bitrate= 929.3kbits/s speed=2.32e+03x
video:493385kB audio:84316kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.659221%I have no idea what is going on, when I try to cut the movie using handbrake everything is ok. I can provide the file if necessary.
-
ffmpeg works manually but not with cron ?
2 mai 2017, par mdnba50I can successfully convert mp3 + audio to mp4 when i run the script manually.
exec("/usr/bin/ffmpeg -loop 1 -i $destination_thumbnail -i $input_file -c:a copy -c:v libx264 -shortest $videoPath 2>&1",$output);
When i have the above code in a script executed via cron it doesn’t convert. I get this error.
Array
(
[0] => ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
[1] => built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
[2] => configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
[3] => libavutil 54. 20.100 / 54. 20.100
[4] => libavcodec 56. 26.100 / 56. 26.100
[5] => libavformat 56. 25.101 / 56. 25.101
[6] => libavdevice 56. 4.100 / 56. 4.100
[7] => libavfilter 5. 11.102 / 5. 11.102
[8] => libavresample 2. 1. 0 / 2. 1. 0
[9] => libswscale 3. 1.101 / 3. 1.101
[10] => libswresample 1. 1.100 / 1. 1.100
[11] => libpostproc 53. 3.100 / 53. 3.100
[12] => [mp3 @ 0x1d62bc0] Estimating duration from bitrate, this may be inaccurate
[13] => Input #0, mp3, from '/home/example/public_html/wp-content/channels/videos/temp_1473937603.mp3':
[14] => Duration: 00:06:51.05, start: 0.000000, bitrate: 64 kb/s
[15] => Stream #0:0: Audio: mp3, 16000 Hz, stereo, s16p, 64 kb/s
[16] => [mjpeg @ 0x1d73de0] Changeing bps to 8
[17] => Input #1, image2, from '/home/examples/public_html/wp-content/channels/thumbnails/thumbnail_516919517.jpg':
[18] => Duration: 00:00:00.50, start: 0.000000, bitrate: N/A
[19] => Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 250x135 [SAR 1:1 DAR 50:27], 2 fps, 2 tbr, 2 tbn, 2 tbc
[20] => No pixel format specified, yuvj420p for H.264 encoding chosen.
[21] => Use -pix_fmt yuv420p for compatibility with outdated media players.
[22] => [libx264 @ 0x1d75240] height not divisible by 2 (250x135)
[23] => Output #0, mp4, to '/home/example/public_html/wp-content/channels/videos/temp_1473937603.mp4':
[24] => Stream #0:0: Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 2 fps
[25] => Metadata:
[26] => encoder : Lavc56.26.100 libx264
[27] => Stream #0:1: Audio: none, 0 channels, 128 kb/s
[28] => Stream mapping:
[29] => Stream #1:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[30] => Stream #0:0 -> #0:1 (copy)
[31] => Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
)Why does this work when i manually execute the script in
conversion.php
but when i runconversion.php
via cron i get the above error ? -
Can't write packet with unknown timestamp av_interleaved_write_frame() : Invalid argument
28 mai 2024, par jagvetinteI'm trying to convert a .ts file with this output to mkv :


ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.27)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --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-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
[mp3float @ 0x7fbd6282b200] Header missing
[mpegts @ 0x7fbd62809000] PES packet size mismatch
[mpegts @ 0x7fbd62809000] Packet corrupt (stream = 2, dts = 7125804577).
[mpegts @ 0x7fbd62809000] PES packet size mismatch
[mpegts @ 0x7fbd62809000] Packet corrupt (stream = 2, dts = 7125804577).
[mpegts @ 0x7fbd62809000] PES packet size mismatch
[mpegts @ 0x7fbd62809000] Packet corrupt (stream = 1, dts = 7125790091).
Input #0, mpegts, from '/Users/"User"/Downloads/input.ts':
 Duration: 02:11:32.82, start: 71283.837456, bitrate: 17149 kb/s
 Program 1 
 Stream #0:0[0x1004]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 2.08 tbr, 90k tbn, 100 tbc
 Stream #0:1[0x1104](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
 Stream #0:2[0x704](swe): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 640 kb/s



To do that I'm using this command :


ffmpeg -i input.ts -c copy output.mkv



But the conversion fails with this error :


Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x7fb8c1808200] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[matroska @ 0x7fb8c1808200] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 0x7fb8c1808200] Can't write packet with unknown timestamp
Error writing trailer of output.mkv: Invalid argument
frame= 27 fps=0.0 q=-1.0 Lsize= 74kB time=00:00:00.85 bitrate= 705.5kbits/s speed= 99x 
video:1092kB audio:35kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!



What should I do in order to fix this ? I've already tried to add
-fflags +genpts
in the beginning but it fails anyway.

EDIT : I did solve it by using MKVToolNix instead.