Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Is ffmpeg able to read ArrayBuffer input from stream
7 juillet 2017, par jAndyI want to accomplish the following tasks:
- Record Video+Audio from any HTML5 (
MediaStream
) capable browser - Send that data via
WebSocket
asBlob
/ArrayBuffer
chunks to a server - Broadcast that input stream-data to multiple clients
As it turns out, this brought me into a world of pain. The first task is fairly simple using the HTML5
MediaStream
objects alongside WebSockets.// ... for simplicity... navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(stream => { let mediaRecorder = new MediaRecorder( stream ); // ... mediaRecorder.ondataavailable = e => { webSocket.send( 'newVideoData', e.data ); // configured for binary data }; });
Now, I want to receive those data fragments and stream those via
nginx vod module
, because I guess I want the output stream in HLS or DASH. I could write a littlenodejs
script as backend, which just receives the binary chunks and write them to a file or stream, and just reference it songinx vod module
could possibly read it and create them3u8
manifest on the fly?I am wondering now,
- if
ffmpeg
is able to read that binary data directly (should bewebm format
), without a man-in-the-middle script, "somehow"? - If not, do I have to write the data down into a file and pass that as input to
ffmpeg
or can I (should I) pipe the data to a self spawnedffmpeg
instance? (if so, how?) - Do I actually need the
nginx server
(probably alongside rtmp module) to deliver the output stream as HLS or could I just useffmpeg
to also create a dynamic manifest? - Is the
nginx vod module
capable of creating a dynamic hls/dash manifest or must the input data be complete beforehand? - Ultimately, am I on the totally wrong track here? :P
Actually I just want to create a little video-live-chat demo, without any plugins or 3rd party encoding software, pure browser.
- Record Video+Audio from any HTML5 (
-
FFMPEG failed to transcode mp4 Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
7 juillet 2017, par and93hilHi I tried using ffmpeg to convert a video with Drupal, however it fails on second pass. I get the following error: Any ideas? I installed the default ffmppeg and libavcodec-extra-53 packages on Ubuntu.
FFmpeg failed to transcode video.mp4. Reported errors PHPVideoToolkit error: Execute error. It was not possible to encode "/var/www/html/lms2/sites/default/files/videos/original/video.mp4" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height". Executed commands and output /usr/bin/ffmpeg -i '/var/www/html/lms2/sites/default/files/videos/original/video.mp4' -vf 'scale=640:360' -strict experimental -vcodec 'h264' -qscale '12' -acodec 'aac' -ac '2' -pass '1' -passlogfile '/tmp/1499411044-595f326449e44-multipass' -y /tmp/1499411044-595f326449d86.mp4 ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/lms2/sites/default/files/videos/original/video.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2017-04-28 15:24:27 Duration: 00:08:21.18, start: 0.000000, bitrate: 443 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 314 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. Please use -q:a or -q:v, -qscale is ambiguous [libx264 @ 0x1c89940] -qscale is ignored, -crf is recommended. [libx264 @ 0x1c89940] using SAR=1/1 [libx264 @ 0x1c89940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x1c89940] profile Main, level 3.0 [libx264 @ 0x1c89940] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 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 '/tmp/1499411044-595f326449d86.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf56.40.101 Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, pass 1, 25 fps, 12800 tbn, 25 tbc (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. encoder : Lavc56.60.100 libx264 Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. encoder : Lavc56.60.100 aac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help frame= 79 fps=0.0 q=28.0 size= 64kB time=00:00:02.87 bitrate= 181.6kbits/s frame= 155 fps=154 q=28.0 size= 156kB time=00:00:05.75 bitrate= 222.2kbits/s frame= 237 fps=158 q=28.0 size= 239kB time=00:00:09.00 bitrate= 217.6kbits/s frame= 315 fps=157 q=28.0 size= 339kB time=00:00:12.23 bitrate= 226.9kbits/s frame= 399 fps=159 q=28.0 size= 409kB time=00:00:15.48 bitrate= 216.4kbits/s frame= 467 fps=155 q=28.0 size= 516kB time=00:00:18.27 bitrate= 231.2kbits/s frame= 530 fps=151 q=28.0 size= 689kB time=00:00:21.06 bitrate= 268.1kbits/s frame= 606 fps=151 q=28.0 size= 786kB time=00:00:23.84 bitrate= 270.2kbits/s frame= 686 fps=152 q=28.0 size= 853kB time=00:00:27.09 bitrate= 257.8kbits/s frame= 765 fps=152 q=28.0 size= 942kB time=00:00:30.34 bitrate= 254.4kbits/s frame= 847 fps=153 q=28.0 size= 1041kB time=00:00:33.59 bitrate= 253.8kbits/s frame= 925 fps=153 q=28.0 size= 1103kB time=00:00:36.85 bitrate= 245.2kbits/s frame= 1003 fps=153 q=28.0 size= 1202kB time=00:00:39.63 bitrate= 248.3kbits/s frame= 1076 fps=153 q=28.0 size= 1267kB time=00:00:42.88 bitrate= 242.0kbits/s frame= 1153 fps=153 q=28.0 size= 1334kB time=00:00:45.67 bitrate= frame= 6790 fps=155 q=28.0 size= 6278kB time=00:04:31.37 bitrate= 189.5kbits/s frame= 6850 fps=155 q=28.0 size= 6284kB time=00:04:33.69 bitrate= 188.1kbits/s frame= 6909 fps=154 q=28.0 size= 6299kB time=00:04:36.01 bitrate= 186.9kbits/s frame= 6964 fps=154 q=28.0 size= 6324kB time=00:04:38.33 bitrate= 186.1kbits/s frame= 7023 fps=154 q=28.0 size= 6340kB time=00:04:40.65 bitrate= 185.1kbits/s frame= 7078 fps=153 q=28.0 size= 6345kB time=00:04:42.98 bitrate= 183.7kbits/s frame= 7132 fps=153 q=28.0 size= 6350kB time=00:04:44.83 bitrate= 182.6kbits/s frame= 7182 fps=152 q=28.0 size= 6383kB time=00:04:47.16 bitrate= 182.1kbits/s frame= 7239 fps=152 q=28.0 size= 6444kB time=00:04:49.15 bitrate= 182.6kbits/s frame= 7295 fps=151 q=28.0 size= 6469kB time=00:04:51.52 bitrate= 181.8kbits/s frame= 7355 fps=151 q=28.0 size= 6481kB time=00:04:53.66 bitrate= 180.8kbits/s frame= 7408 fps=150 q=28.0 size= 6489kB time=00:04:55.98 bitrate= 179.6kbits/s frame= 7459 fps=150 q=28.0 size= 6526kB time=00:04:58.21 bitrate= 179.3kbits/s frame= 7517 fps=150 q=28.0 size= 6533kB time=00:05:00.51 bitrate= 178.1kbits/s frame= 7574 fps=149 q=28.0 size= 6540kB time=00:05:02.88 bitrate= 176.9kbits/s frame= 7634 fps=149 q=28.0 size= 6546kB time=00:05:05.06 bitrate= 175.8kbits/s frame= 7679 fps=148 q=28.0 size= 6550kB time=00:05:06.92 bitrate= 174.8kbits/s frame= 8364 fps=145 q=28.0 size= 6754kB time=00:05:34.43 bitrate= 165.4kbits/s frame= 8425 fps=145 q=28.0 size= 6757kB time=00:05:36.85 bitrate= 164.3kbits/s frame= 9020 fps=142 q=28.0 size= 6856kB time=00:06:00.53 bitrate= 155.8kbits/s frame= 9085 fps=142 q=28.0 size= 6858kB time=00:06:02.85 bitrate= 154.8kbits/s frame= 9142 fps=142 q=28.0 size= 6860kB time=00:06:05.38 bitrate= 153.8kbits/s frame= 9200 fps=142 q=28.0 size= 6886kB time=00:06:07.80 bitrate= 153.4kbits/s frame= 9259 fps=142 q=28.0 size= 6888kB time=00:06:10.24 bitrate= 152.4kbits/s frame= 9318 fps=142 q=28.0 size= 6894kB time=00:06:12.61 bitrate= 151.6kbits/s frame= 9375 fps=141 q=28.0 size= 6916kB time=00:06:14.93 bitrate= 151.1kbits/s frame= 9438 fps=141 q=25.0 size= 6944kB time=00:06:17.25 bitrate= 150.8kbits/s frame= 9499 fps=141 q=28.0 size= 6947kB time=00:06:19.57 bitrate= 149.9kbits/s frame= 9561 fps=141 q=28.0 size= 6950kB time=00:06:22.01 bitrate= 149.0kbits/s frame= 9618 fps=141 q=28.0 size= 6955kB time=00:06:24.63 bitrate= 143.6kbits/s frame=10145 fps=139 q=28.0 size= 7080kB time=00:06:45.58 bitrate= 143.0kbits/s frame=10202 fps=139 q=28.0 size= 7105kB time=00:06:47.90 bitrate= 142.7kbits/s frame=10257 fps=139 q=28.0 size= 7124kB time=00:06:50.20 bitrate= 142.3kbits/s frame=10315 fps=139 q=28.0 size= 7143kB time=00:06:52.52 bitrate= 141.8kbits/s frame=10373 fps=139 q=28.0 size= 7145kB time=00:06:54.87 bitrate= 141.1kbits/s frame=10432 fps=138 q=28.0 size= 7174kB time=00:06:57.03 bitrate= 140.9kbits/s frame=10489 fps=138 q=28.0 size= 7180kB time=00:06:59.35 bitrate= 140.3kbits/s frame=10547 fps=138 q=28.0 size= 7199kB time=00:07:01.55 bitrate= 139.9kbits/s frame=10605 fps=138 q=28.0 size= 7215kB time=00:07:03.85 bitrate= 139.5kbits/s frame=10661 fps=138 q=28.0 size= 7223kB time=00:07:06.01 bitrate= 138.9kbits/s frame=10713 fps=138 q=28.0 size= 7277kB time=00:07:08.33 bitrate= 139.2kbits/s frame=10769 fps=137 q=28.0 size= 7303kB time=00:07:10.66 bitrate= 138.9kbits/s frame=10829 fps=137 q=28.0 size= 7309kB time=00:07:12.98 bitrate= 138.3kbits/s frame=10884 fps=137 q=28.0 size= 7329kB time=00:07:15.14 bitrate= 138.0kbits/s frame=10941 fps=137 q=28.0 size= 7355kB time=00:07:17.39 bitrate= 137.7kbits/s frame=11000 fps=137 q=28.0 size= 7360kB time=00:07:19.48 bitrate= 137.2kbits/s frame=11047 fps=137 q=28.0 size= 7407kB time=00:07:21.80 bitrate= 137.3kbits/s frame=11105 fps=136 q=28.0 size= 7423kB time=00:07:23.66 bitrate= 137.1kbits/s frame=11150 fps=136 q=28.0 size= 7472kB time=00:07:25.91 bitrate= 137.3kbits/s frame=11208 fps=136 q=28.0 size= 7541kB time=00:07:27.84 bitrate= 137.9kbits/s frame=11264 fps=136 q=28.0 size= 7553kB time=00:07:30.16 bitrate= 137.4kbits/s frame=11314 fps=136 q=28.0 size= 7589kB time=00:07:32.02 bitrate= 137.5kbits/s frame=11359 fps=135 q=28.0 size= 7635kB time=00:07:34.34 bitrate= 137.7kbits/s frame=11415 fps=135 q=28.0 size= 7698kB time=00:07:36.20 bitrate= 138.2kbits/s frame=11469 fps=135 q=28.0 size= 7740kB time=00:07:38.52 bitrate= 138.3kbits/s frame=11526 fps=135 q=28.0 size= 7752kB time=00:07:40.84 bitrate= 137.8kbits/s frame=11585 fps=135 q=28.0 size= 7755kB time=00:07:43.16 bitrate= 137.2kbits/s frame=11638 fps=135 q=28.0 size= 7791kB time=00:07:45.28 bitrate= 137.2kbits/s frame=12371 fps=133 q=28.0 size= 8045kB time=00:08:14.60 bitrate= 133.2kbits/s frame=12426 fps=133 q=28.0 size= 8068kB time=00:08:16.60 bitrate= 133.1kbits/s frame=12475 fps=133 q=25.0 size= 8113kB time=00:08:18.88 bitrate= 133.2kbits/s frame=12528 fps=133 q=28.0 size= 8135kB time=00:08:21.01 bitrate= 133.0kbits/s frame=12529 fps=133 q=28.0 Lsize= 8549kB time=00:08:21.17 bitrate= 139.7kbits/s video:3859kB audio:4279kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.047608% [libx264 @ 0x1c89940] frame I:52 Avg QP:14.60 size: 25036 [libx264 @ 0x1c89940] frame P:3390 Avg QP:16.73 size: 657 [libx264 @ 0x1c89940] frame B:9087 Avg QP:16.09 size: 47 [libx264 @ 0x1c89940] consecutive B-frames: 3.0% 0.7% 0.8% 95.5% [libx264 @ 0x1c89940] mb I I16..4: 53.8% 0.0% 46.2% [libx264 @ 0x1c89940] mb P I16..4: 2.6% 0.0% 0.0% P16..4: 2.9% 0.0% 0.0% 0.0% 0.0% skip:94.5% [libx264 @ 0x1c89940] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.5% 0.0% 0.0% direct: 0.1% skip:99.3% L0:44.8% L1:51.9% BI: 3.3% [libx264 @ 0x1c89940] coded y,uvDC,uvAC intra: 40.1% 21.9% 16.0% inter: 0.4% 0.4% 0.1% [libx264 @ 0x1c89940] i16 v,h,dc,p: 42% 53% 3% 1% [libx264 @ 0x1c89940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 45% 11% 5% 3% 2% 4% 2% 5% [libx264 @ 0x1c89940] i8c dc,h,v,p: 68% 25% 6% 1% [libx264 @ 0x1c89940] Weighted P-Frames: Y:0.4% UV:0.3% [libx264 @ 0x1c89940] kb/s:63.07 /usr/bin/ffmpeg -i '/var/www/html/lms2/sites/default/files/videos/original/video.mp4' -vf 'scale=640:360' -strict experimental -vcodec 'h264' -qscale '12' -acodec 'aac' -ac '2' -pass '2' -passlogfile '/tmp/1499411044-595f326449e44-multipass' -y /tmp/1499411044-595f326449d86.mp4 ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/lms2/sites/default/files/videos/original/video.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2017-04-28 15:24:27 Duration: 00:08:21.18, start: 0.000000, bitrate: 443 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 314 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. Please use -q:a or -q:v, -qscale is ambiguous [libx264 @ 0x1c2b940] -qscale is ignored, -crf is recommended. [libx264 @ 0x1c2b940] using SAR=1/1 [libx264 @ 0x1c2b940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x1c2b940] constant rate-factor is incompatible with 2pass. Output #0, mp4, to '/tmp/1499411044-595f326449d86.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 Stream #0:0(und): Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. encoder : Lavc56.60.100 libx264 Stream #0:1(und): Audio: aac, 0 channels, 128 kb/s (default) Metadata: creation_time : 2017-04-28 15:24:27 handler_name : ISO Media file produced by Google Inc. encoder : Lavc56.60.100 aac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
-
Python script that will take a sequence of images and turn it into a video or gif/animation ?
6 juillet 2017, par AangI know there are a few questions on this already but I have yet to find a complete solution to this problem. I am writing in Python 2.5 and I want to be able to write a script that will take a sequence of images and turn it into a video or gif/animation.
I have already tried imageio, image2gif, and opencv. Opencv gives me import errors, imageio only works on Python 2.6+, and image2gif gives me errors when I try to import the PIL or pillow Python library.
I've also looked into FFMPEG. Using the subprocess python module to run FFMPEG through the terminal, I got it to work. However, I am looking for a solution that uses a python library and not an external program such as FFMPEG. Any suggestions?
-
Cutting and fading ts segment with ffmpeg ?
6 juillet 2017, par Matt WI'm trying to cut a ts segment and apply a fade from white at the initial point of the cut segment. This is used in a situation where I need to "crop" some material from the beginning of a video and apply a fade for a smoother entry. In my test, I am cutting an 8 second segment at the 5.5s mark to yield a 2.5 second segment that will fade from white over the first second.
The cut command by itself works fine:
ffmpeg -i test.ts -ss 5.5 -c:v libx264 -profile:v baseline -c:a aac -map 0 -mpegts_copyts 1 -preset ultrafast -f ssegment -initial_offset 5.5 -segment_format mpegts ~/Desktop/cut%d.ts
I've successfully used this fade filter syntax before:
-filter:v fade=t=in:st=0:d=1:color=0xffffff
But I can't seem to make the whole thing work:
ffmpeg -i test.ts -filter:v fade=t=in:st=5.5:d=1:color=0xffffff -ss 5.5 -c:v libx264 -profile:v baseline -c:a aac -map 0 -mpegts_copyts 1 -preset ultrafast -f ssegment -initial_offset 5.5 -segment_format mpegts ~/Desktop/cut%d.ts
I'm getting the following error:
x264 [error]: baseline profile doesn't support 4:4:4
[libx264 @ 0x7fd9db002400] Error setting profile baseline.
[libx264 @ 0x7fd9db002400] Possible profiles: baseline main high high10 high422 high444
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x7fd9db001200] Qavg: nan
Conversion failed!
My knowledge of ffmpeg just isn't deep enough to figure out why this is happening. Any thoughts?
Thanks, Matt
-
How to keep the file size of a stream small and have manycam show a live picture ?
6 juillet 2017, par P. DeeI am using this command
ffmpeg -i "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov" "C:\wamp\www\streaming.mjpeg"
to stream to "C:\wamp\www\streaming.mjpeg". Then I am using
SimpleHTTPServer
to create a web server for this folder.Then I am pointing ManyCam's ip camera to the address of the file on the web server
http://127.0.0.1:8000/streaming.mjpeg
And select it in
ManyCam
.As a result ffmpeg creates a file that gets bigger and bigger and
ManyCam
shows an endless time-lapsed loop of what the camera records or recorded minutes ago.How to keep the file size small and have
ManyCam
show a live video feed?