I'm using a Raspberry Pi 3B (OS: Raspian) to livestream an attached camera feed to YouTube using the following command in a python script(I removed the livestream secret key):
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -thread_queue_size 1024 -i /dev/zero -f h264 -thread_queue_size 1024 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/[My Secret Key]> /home/Desktop/Livestream_Logs/Output_Runthrough".txt 2>&1
However, I am running into a problem where the livestream cuts out at random times (usually after an hour) and the command terminates due to the following error: av_interleaved_write_frame(): Broken pipe
I am new to the ffmpeg command and live-streaming in general, so please go easy on me for I do not know what I am doing wrong with this command, nor do I understand all its arguments! This is a Christmas project I am working on, and I copied this command from this site.
Below is the output log from running the command. There were over 60,000 frames in the log so I removed most lines to save space, but included some samples; the bitrate and speed remained relatively the same throughout the command's execution:
ffmpeg version 4.3.5-0+deb11u1+rpt2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Raspbian 10.2.1-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
WARNING: library configuration mismatch
avutil configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avcodec configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avformat configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avdevice configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avfilter configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avresample configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
swscale configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
swresample configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
postproc configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
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
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, s16le, from '/dev/zero':
Duration: N/A, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Stream mapping:
Stream #1:0 -> #0:0 (copy)
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/[My Secret Key]':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 1k tbn, 1200k tbc
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc58.91.100 aac
[flv # 0x130e5f0] 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
[h264 # 0x1308e30] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
frame= 13 fps=0.0 q=-1.0 size= 188kB time=00:00:00.48 bitrate=3202.0kbits/s speed=0.948x
frame= 25 fps= 25 q=-1.0 size= 582kB time=00:00:00.97 bitrate=4892.9kbits/s speed=0.966x
frame= 38 fps= 25 q=-1.0 size= 909kB time=00:00:01.48 bitrate=5012.3kbits/s speed=0.983x
frame= 50 fps= 25 q=-1.0 size= 1219kB time=00:00:01.99 bitrate=5001.6kbits/s speed=0.988x
frame= 63 fps= 25 q=-1.0 size= 1594kB time=00:00:02.48 bitrate=5255.3kbits/s speed=0.983x
frame= 76 fps= 25 q=-1.0 size= 1855kB time=00:00:03.00 bitrate=5064.6kbits/s speed=0.99x
frame= 2144 fps= 25 q=-1.0 size= 52465kB time=00:01:25.75 bitrate=5012.1kbits/s speed= 1x
frame= 2157 fps= 25 q=-1.0 size= 52755kB time=00:01:26.24 bitrate=5011.2kbits/s speed= 1x
frame= 2170 fps= 25 q=-1.0 size= 53101kB time=00:01:26.76 bitrate=5013.8kbits/s speed= 1x
frame=25690 fps= 25 q=-1.0 size= 628697kB time=00:17:07.57 bitrate=5012.1kbits/s speed= 1x
frame=25703 fps= 25 q=-1.0 size= 628980kB time=00:17:08.08 bitrate=5011.8kbits/s speed= 1x
frame=25715 fps= 25 q=-1.0 size= 629295kB time=00:17:08.59 bitrate=5011.9kbits/s speed= 1x
frame=58274 fps= 25 q=-1.0 size= 1426073kB time=00:38:50.93 bitrate=5011.9kbits/s speed= 1x
frame=58287 fps= 25 q=-1.0 size= 1426391kB time=00:38:51.44 bitrate=5011.9kbits/s speed= 1x
frame=58299 fps= 25 q=-1.0 size= 1426707kB time=00:38:51.95 bitrate=5011.9kbits/s speed= 1x
frame=94289 fps= 25 q=-1.0 size= 2307471kB time=01:02:51.54 bitrate=5011.9kbits/s speed= 1x
frame=94302 fps= 25 q=-1.0 size= 2307767kB time=01:02:52.04 bitrate=5011.9kbits/s speed= 1x
frame=94315 fps= 25 q=-1.0 size= 2308071kB time=01:02:52.56 bitrate=5011.9kbits/s speed= 1x
frame=128044 fps= 25 q=-1.0 size= 3133566kB time=01:25:21.74 bitrate=5012.0kbits/s speed= 1x
frame=128057 fps= 25 q=-1.0 size= 3133823kB time=01:25:22.25 bitrate=5011.9kbits/s speed= 1x
frame=128069 fps= 25 q=-1.0 size= 3134109kB time=01:25:22.72 bitrate=5011.9kbits/s speed=0.996x
av_interleaved_write_frame(): End of file
[flv # 0x130e5f0] Failed to update header with correct duration.
[flv # 0x130e5f0] Failed to update header with correct filesize.
Error writing trailer of rtmp://a.rtmp.youtube.com/live2/[My Secret Key]: End of file
frame=128069 fps= 25 q=-1.0 Lsize= 3134109kB time=01:25:22.74 bitrate=5011.9kbits/s speed=0.996x
video:3126661kB audio:1307kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.196311%
[aac # 0x130ed10] Qavg: 65536.000
Conversion failed!
As stated before the command I am using is from this site. However, they are using avconv instead of ffmpeg, but since avconv would not work on my raspberry pi, I switched out "avconv" for "ffmpeg" and kept all the same flags.
Does anyone know why I'm getting this error?
Related
I'm using a Raspberry Pi 3B (OS: Raspian) to livestream an attached camera feed to YouTube using the following command in a python script(I removed the livestream secret key):
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -thread_queue_size 1024 -i /dev/zero -f h264 -thread_queue_size 1024 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/[My Secret Key]> /home/Desktop/Livestream_Logs/Output_Runthrough.txt 2>&1
However, I am running into a problem where the livestream cuts out at random times (usually after an hour) and the command terminates due to the following error: av_interleaved_write_frame(): Broken pipe
I am new to the ffmpeg command and live-streaming in general, so please go easy on me for I do not know what I am doing wrong with this command, nor do I understand all its arguments! This is a Christmas project I am working on, and I copied this command from this site.
Below is the output log from running the command. There were over 60,000 frames in the log so I removed most lines to save space, but included some samples; the bitrate and speed remained relatively the same throughout the command's execution:
ffmpeg version 4.3.5-0+deb11u1+rpt2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Raspbian 10.2.1-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
WARNING: library configuration mismatch
avutil configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avcodec configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avformat configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avdevice configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avfilter configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
avresample configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
swscale configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
swresample configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
postproc configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
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
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, s16le, from '/dev/zero':
Duration: N/A, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Stream mapping:
Stream #1:0 -> #0:0 (copy)
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/[My Secret Key]':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 1k tbn, 1200k tbc
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc58.91.100 aac
[flv # 0x17f25a0] 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
frame= 13 fps=0.0 q=-1.0 size= 196kB time=00:00:00.48 bitrate=3338.1kbits/s speed=0.945x
frame= 25 fps= 25 q=-1.0 size= 598kB time=00:00:00.97 bitrate=5021.1kbits/s speed=0.958x
frame= 38 fps= 25 q=-1.0 size= 911kB time=00:00:01.48 bitrate=5023.5kbits/s speed=0.977x
frame= 51 fps= 25 q=-1.0 size= 1236kB time=00:00:02.00 bitrate=5060.4kbits/s speed=0.987x
frame= 63 fps= 25 q=-1.0 size= 1622kB time=00:00:02.50 bitrate=5299.4kbits/s speed=0.989x
frame= 76 fps= 25 q=-1.0 size= 1866kB time=00:00:03.00 bitrate=5093.2kbits/s speed=0.988x
frame= 89 fps= 25 q=-1.0 size= 2157kB time=00:00:03.52 bitrate=5017.7kbits/s speed=0.992x
frame= 101 fps= 25 q=-1.0 size= 2435kB time=00:00:04.01 bitrate=4965.0kbits/s speed=0.992x
frame= 2119 fps= 25 q=-1.0 size= 51856kB time=00:01:24.72 bitrate=5013.7kbits/s speed= 1x
frame= 2131 fps= 25 q=-1.0 size= 52156kB time=00:01:25.24 bitrate=5012.4kbits/s speed= 1x
frame= 2144 fps= 25 q=-1.0 size= 52465kB time=00:01:25.75 bitrate=5012.0kbits/s speed= 1x
frame= 2157 fps= 25 q=-1.0 size= 52757kB time=00:01:26.24 bitrate=5011.4kbits/s speed= 1x
frame= 2170 fps= 25 q=-1.0 size= 53104kB time=00:01:26.76 bitrate=5014.1kbits/s speed= 1x
frame= 2182 fps= 25 q=-1.0 size= 53390kB time=00:01:27.26 bitrate=5012.2kbits/s speed= 1x
frame= 2195 fps= 25 q=-1.0 size= 53711kB time=00:01:27.77 bitrate=5013.0kbits/s speed= 1x
frame= 2207 fps= 25 q=-1.0 size= 53997kB time=00:01:28.25 bitrate=5011.9kbits/s speed=0.999x
frame= 2220 fps= 25 q=-1.0 size= 54299kB time=00:01:28.77 bitrate=5010.9kbits/s speed= 1x
frame= 2232 fps= 25 q=-1.0 size= 54641kB time=00:01:29.28 bitrate=5013.6kbits/s speed= 1x
frame= 2245 fps= 25 q=-1.0 size= 54952kB time=00:01:29.79 bitrate=5013.5kbits/s speed= 1x
frame= 6384 fps= 25 q=-1.0 size= 156217kB time=00:04:15.32 bitrate=5012.1kbits/s speed= 1x
frame=63216 fps= 25 q=-1.0 size= 1547043kB time=00:42:08.63 bitrate=5012.0kbits/s speed= 1x
frame=63229 fps= 25 q=-1.0 size= 1547337kB time=00:42:09.12 bitrate=5011.9kbits/s speed= 1x
frame=63242 fps= 25 q=-1.0 size= 1547710kB time=00:42:09.64 bitrate=5012.1kbits/s speed= 1x
frame=63254 fps= 25 q=-1.0 size= 1547959kB time=00:42:10.13 bitrate=5011.9kbits/s speed= 1x
frame=63267 fps= 25 q=-1.0 size= 1548272kB time=00:42:10.65 bitrate=5011.9kbits/s speed= 1x
frame=63274 fps= 25 q=-1.0 size= 1548443kB time=00:42:10.92 bitrate=5011.9kbits/s speed=0.986x
av_interleaved_write_frame(): Broken pipe
[flv # 0x17f25a0] Failed to update header with correct duration.
[flv # 0x17f25a0] Failed to update header with correct filesize.
Error writing trailer of rtmp://a.rtmp.youtube.com/live2/[MY SECRET KEY]: Broken pipe
frame=63274 fps= 25 q=-1.0 Lsize= 1548443kB time=00:42:10.92 bitrate=5011.9kbits/s speed=0.986x
video:1544778kB audio:646kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.195331%
[aac # 0x17ee650] Qavg: 65536.000
Conversion failed!
As stated before the command I am using is from this site. However, they are using avconv instead of ffmpeg, but since avconv would not work on my raspberry pi, I switched out "avconv" for "ffmpeg" and kept all the same flags.
I also added in "-thread_queue_size 1024" before both "-i" flags. This was a solution that I found within this link, which detailed how to get rid of the following error, which I initially thought could be the culprit to my problem but wasn't:
[h264 # 0x1308e30] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
I'm trying to compile the Rust simd-json package. It complains that the box is not SIMD-compatible:
|
221 | fn please_compile_with_a_simd_compatible_cpu_setting_read_the_simdjsonrs_readme() -> ! {}
| ---------------------------------------------------------------------------- ^ expected `!`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
However, the box is x86 as required:
$ uname -a
Linux ip-172-31-68-220 5.15.0-1011-aws #14-Ubuntu SMP Wed Jun 1 20:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
And Cargo.toml contains the required compiler flags:
[build]
rustflags = ["-C", "target-cpu=native"]
[target.wasm32-unknown-unknown]
rustflags = ["-C", "target-feature=+simd128"]
[target.wasm32-wasi]
rustflags = ["-C", "target-feature=+simd128"]
Why is simd-json unhappy?
Full /proc/cpuinfo output below.
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Platinum 8259CL CPU # 2.50GHz
stepping : 7
microcode : 0x500320a
cpu MHz : 2500.006
cache size : 36608 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5000.01
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Platinum 8259CL CPU # 2.50GHz
stepping : 7
microcode : 0x500320a
cpu MHz : 2500.006
cache size : 36608 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5000.01
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Platinum 8259CL CPU # 2.50GHz
stepping : 7
microcode : 0x500320a
cpu MHz : 2500.006
cache size : 36608 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5000.01
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Platinum 8259CL CPU # 2.50GHz
stepping : 7
microcode : 0x500320a
cpu MHz : 2500.006
cache size : 36608 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5000.01
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
The implementation of that function is defined as follows:
#[cfg(all(
not(feature = "allow-non-simd"),
not(any(
target_feature = "sse4.2",
target_feature = "avx2",
target_feature = "neon",
target_feature = "simd128"
))
))]
fn please_compile_with_a_simd_compatible_cpu_setting_read_the_simdjsonrs_readme() -> ! {}
This means that the Rust compiler thinks your CPU doesn't have sse4.2 or avx2 or neon or simd128.
Your /proc/cpuinfo seems to have avx2, so is a giveaway of something strange going on.
The problem is that rustflags is not valid in your Cargo.toml, it needs to be added to your .cargo/config.toml file instead. The configuration file is meant primarily for global settings for cargo and rustc, but you can make one local to your repository in your project root. (e.g myproject/.cargo/config.toml)
If you look at the example of simd-json, you can see that is what they do.
Currently trying to mix two audio streams together to perform an overlay. (Vocals over Instruments). I have two M4A files and I want to combine them together. If the vocal track is 30 seconds, it takes roughly 32 seconds to mix them together, but was hoping for significantly faster processing.
Here is the code I'm using
-ss 0.300 -i /data/user/0/me.rapchat.rapchat/cache/recording.m4a -i /data/user/0/me.rapchat.rapchat/cache/beats/cc3613da-849b-47a5-97b1-b9bf3f1136db.m4a -filter_complex [0:a][1:a]amerge=inputs=2,pan=stereo|c0<c0+c2|c1<c1+c3[aout] -map [aout] /data/user/0/me.rapchat.rapchat/cache/rap.m4a
I've read about using the preset Ultrafast but not sure how it would fit in as I've tried adding it and gotten errors about it's placement in the command. I've also read about copying the stream "as is" and not worrying about encoding/decoding which I was curious if that would speed up the whole process.
And here are my logs for a succesful mix
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: built with gcc 4.8 (GCC)
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libavutil 55. 17.103 / 55. 17.103
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libavcodec 57. 24.102 / 57. 24.102
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libavformat 57. 25.100 / 57. 25.100
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libavdevice 57. 0.101 / 57. 0.101
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libavfilter 6. 31.100 / 6. 31.100
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libswscale 4. 0.100 / 4. 0.100
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libswresample 2. 0.101 / 2. 0.101
09-23 15:08:08.412 13909-13909/me.rapchat.rapchat E/Studio Process: libpostproc 54. 0.100 / 54. 0.100
09-23 15:08:08.442 13909-13909/me.rapchat.rapchat E/Studio Process: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/me.rapchat.rapchat/cache/recording.m4a':
09-23 15:08:08.442 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.442 13909-13909/me.rapchat.rapchat E/Studio Process: major_brand : mp42
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: minor_version : 0
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: compatible_brands: isommp42
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: creation_time : 2016-09-23 20:08:08
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: com.android.version: 6.0.1
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Duration: 00:00:34.74, start: 0.000000, bitrate: 64 kb/s
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Stream #0:0(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: creation_time : 2016-09-23 20:08:08
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: handler_name : SoundHandle
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/data/user/0/me.rapchat.rapchat/cache/beats/cc3613da-849b-47a5-97b1-b9bf3f1136db.m4a':
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: major_brand : M4A
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: minor_version : 0
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: compatible_brands: M4A mp42isom
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: creation_time : 2016-06-21 20:00:19
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: artist :
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: album : Rapchat
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: date : 2016
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: composer :
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: title : wrist - beat
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: encoder : 10.2.0
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: iTunSMPB : 00000000 00000840 000003BF 00000000004A0001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Duration: 00:01:50.04, start: 0.000000, bitrate: 110 kb/s
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 259 kb/s (default)
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: creation_time : 2016-06-21 20:00:19
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: [Parsed_amerge_0 # 0xf6f57140] No channel layout for input 1
09-23 15:08:08.452 13909-13909/me.rapchat.rapchat E/Studio Process: [Parsed_amerge_0 # 0xf6f57140] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
09-23 15:08:08.472 13909-13909/me.rapchat.rapchat E/Studio Process: Output #0, ipod, to '/data/user/0/me.rapchat.rapchat/cache/rap.m4a':
09-23 15:08:08.472 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: major_brand : mp42
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: minor_version : 0
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: compatible_brands: isommp42
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: com.android.version: 6.0.1
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: encoder : Lavf57.25.100
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Metadata:
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: encoder : Lavc57.24.102 aac
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Stream mapping:
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Stream #0:0 (aac) -> amerge:in0
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Stream #1:0 (aac) -> amerge:in1
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: pan -> Stream #0:0 (aac)
09-23 15:08:08.482 13909-13909/me.rapchat.rapchat E/Studio Process: Press [q] to stop, [?] for help
09-23 15:08:09.022 13909-13909/me.rapchat.rapchat E/Studio Process: size= 9kB time=00:00:00.62 bitrate= 115.8kbits/s speed=1.22x
09-23 15:08:09.532 13909-13909/me.rapchat.rapchat E/Studio Process: size= 21kB time=00:00:01.41 bitrate= 122.7kbits/s speed=1.39x
09-23 15:08:10.032 13909-13909/me.rapchat.rapchat E/Studio Process: size= 34kB time=00:00:02.20 bitrate= 124.6kbits/s speed=1.45x
09-23 15:08:10.532 13909-13909/me.rapchat.rapchat E/Studio Process: size= 47kB time=00:00:03.04 bitrate= 125.6kbits/s speed= 1.5x
09-23 15:08:11.052 13909-13909/me.rapchat.rapchat E/Studio Process: size= 59kB time=00:00:03.83 bitrate= 126.1kbits/s speed=1.51x
09-23 15:08:11.552 13909-13909/me.rapchat.rapchat E/Studio Process: size= 71kB time=00:00:04.62 bitrate= 126.4kbits/s speed=1.51x
09-23 15:08:12.062 13909-13909/me.rapchat.rapchat E/Studio Process: size= 84kB time=00:00:05.41 bitrate= 126.6kbits/s speed=1.52x
09-23 15:08:12.582 13909-13909/me.rapchat.rapchat E/Studio Process: size= 97kB time=00:00:06.24 bitrate= 126.8kbits/s speed=1.53x
09-23 15:08:13.072 13909-13909/me.rapchat.rapchat E/Studio Process: size= 109kB time=00:00:07.03 bitrate= 126.9kbits/s speed=1.54x
09-23 15:08:13.572 13909-13909/me.rapchat.rapchat E/Studio Process: size= 121kB time=00:00:07.82 bitrate= 127.1kbits/s speed=1.54x
09-23 15:08:14.092 13909-13909/me.rapchat.rapchat E/Studio Process: size= 134kB time=00:00:08.61 bitrate= 127.1kbits/s speed=1.54x
09-23 15:08:14.602 13909-13909/me.rapchat.rapchat E/Studio Process: size= 146kB time=00:00:09.40 bitrate= 127.2kbits/s speed=1.54x
09-23 15:08:15.122 13909-13909/me.rapchat.rapchat E/Studio Process: size= 159kB time=00:00:10.24 bitrate= 127.3kbits/s speed=1.55x
09-23 15:08:15.592 13909-13909/me.rapchat.rapchat E/Studio Process: size= 171kB time=00:00:10.98 bitrate= 127.3kbits/s speed=1.55x
09-23 15:08:16.112 13909-13909/me.rapchat.rapchat E/Studio Process: size= 183kB time=00:00:11.77 bitrate= 127.4kbits/s speed=1.55x
09-23 15:08:16.612 13909-13909/me.rapchat.rapchat E/Studio Process: size= 195kB time=00:00:12.56 bitrate= 127.4kbits/s speed=1.55x
09-23 15:08:17.122 13909-13909/me.rapchat.rapchat E/Studio Process: size= 208kB time=00:00:13.39 bitrate= 127.4kbits/s speed=1.55x
09-23 15:08:17.692 13909-13909/me.rapchat.rapchat E/Studio Process: size= 217kB time=00:00:13.90 bitrate= 127.9kbits/s speed=1.52x
09-23 15:08:18.162 13909-13909/me.rapchat.rapchat E/Studio Process: size= 223kB time=00:00:14.28 bitrate= 127.8kbits/s speed=1.48x
09-23 15:08:18.662 13909-13909/me.rapchat.rapchat E/Studio Process: size= 229kB time=00:00:14.65 bitrate= 127.8kbits/s speed=1.44x
09-23 15:08:19.202 13909-13909/me.rapchat.rapchat E/Studio Process: size= 235kB time=00:00:15.06 bitrate= 127.7kbits/s speed=1.41x
09-23 15:08:19.792 13909-13909/me.rapchat.rapchat E/Studio Process: size= 240kB time=00:00:15.39 bitrate= 127.8kbits/s speed=1.38x
09-23 15:08:20.192 13909-13909/me.rapchat.rapchat E/Studio Process: size= 244kB time=00:00:15.67 bitrate= 127.8kbits/s speed=1.34x
09-23 15:08:20.712 13909-13909/me.rapchat.rapchat E/Studio Process: size= 252kB time=00:00:16.13 bitrate= 127.7kbits/s speed=1.32x
09-23 15:08:21.242 13909-13909/me.rapchat.rapchat E/Studio Process: size= 257kB time=00:00:16.46 bitrate= 127.8kbits/s speed=1.29x
09-23 15:08:21.752 13909-13909/me.rapchat.rapchat E/Studio Process: size= 260kB time=00:00:16.64 bitrate= 127.8kbits/s speed=1.25x
09-23 15:08:22.272 13909-13909/me.rapchat.rapchat E/Studio Process: size= 264kB time=00:00:16.92 bitrate= 127.7kbits/s speed=1.23x
09-23 15:08:22.882 13909-13909/me.rapchat.rapchat E/Studio Process: size= 269kB time=00:00:17.29 bitrate= 127.6kbits/s speed=1.21x
09-23 15:08:23.352 13909-13909/me.rapchat.rapchat E/Studio Process: size= 274kB time=00:00:17.62 bitrate= 127.5kbits/s speed=1.19x
09-23 15:08:23.952 13909-13909/me.rapchat.rapchat E/Studio Process: size= 282kB time=00:00:18.13 bitrate= 127.6kbits/s speed=1.18x
09-23 15:08:24.372 13909-13909/me.rapchat.rapchat E/Studio Process: size= 285kB time=00:00:18.32 bitrate= 127.6kbits/s speed=1.15x
09-23 15:08:24.892 13909-13909/me.rapchat.rapchat E/Studio Process: size= 290kB time=00:00:18.59 bitrate= 127.6kbits/s speed=1.13x
09-23 15:08:25.402 13909-13909/me.rapchat.rapchat E/Studio Process: size= 293kB time=00:00:18.85 bitrate= 127.5kbits/s speed=1.12x
09-23 15:08:26.032 13909-13909/me.rapchat.rapchat E/Studio Process: size= 300kB time=00:00:19.24 bitrate= 127.5kbits/s speed= 1.1x
09-23 15:08:26.462 13909-13909/me.rapchat.rapchat E/Studio Process: size= 304kB time=00:00:19.57 bitrate= 127.4kbits/s speed=1.09x
09-23 15:08:27.042 13909-13909/me.rapchat.rapchat E/Studio Process: size= 309kB time=00:00:19.89 bitrate= 127.4kbits/s speed=1.07x
09-23 15:08:27.622 13909-13909/me.rapchat.rapchat E/Studio Process: size= 312kB time=00:00:20.08 bitrate= 127.4kbits/s speed=1.05x
09-23 15:08:28.182 13909-13909/me.rapchat.rapchat E/Studio Process: size= 317kB time=00:00:20.36 bitrate= 127.4kbits/s speed=1.03x
09-23 15:08:28.702 13909-13909/me.rapchat.rapchat E/Studio Process: size= 322kB time=00:00:20.68 bitrate= 127.3kbits/s speed=1.02x
09-23 15:08:29.262 13909-13909/me.rapchat.rapchat E/Studio Process: size= 326kB time=00:00:20.96 bitrate= 127.3kbits/s speed=1.01x
09-23 15:08:29.762 13909-13909/me.rapchat.rapchat E/Studio Process: size= 332kB time=00:00:21.38 bitrate= 127.3kbits/s speed=1.01x
09-23 15:08:30.282 13909-13909/me.rapchat.rapchat E/Studio Process: size= 339kB time=00:00:21.80 bitrate= 127.3kbits/s speed= 1x
09-23 15:08:30.892 13909-13909/me.rapchat.rapchat E/Studio Process: size= 345kB time=00:00:22.22 bitrate= 127.3kbits/s speed=0.995x
09-23 15:08:31.392 13909-13909/me.rapchat.rapchat E/Studio Process: size= 352kB time=00:00:22.63 bitrate= 127.3kbits/s speed=0.989x
09-23 15:08:31.942 13909-13909/me.rapchat.rapchat E/Studio Process: size= 359kB time=00:00:23.10 bitrate= 127.3kbits/s speed=0.986x
09-23 15:08:32.452 13909-13909/me.rapchat.rapchat E/Studio Process: size= 363kB time=00:00:23.38 bitrate= 127.3kbits/s speed=0.977x
09-23 15:08:32.932 13909-13909/me.rapchat.rapchat E/Studio Process: size= 367kB time=00:00:23.61 bitrate= 127.4kbits/s speed=0.966x
09-23 15:08:33.542 13909-13909/me.rapchat.rapchat E/Studio Process: size= 372kB time=00:00:23.93 bitrate= 127.3kbits/s speed=0.96x
09-23 15:08:33.942 13909-13909/me.rapchat.rapchat E/Studio Process: size= 378kB time=00:00:24.31 bitrate= 127.3kbits/s speed=0.955x
09-23 15:08:34.462 13909-13909/me.rapchat.rapchat E/Studio Process: size= 384kB time=00:00:24.68 bitrate= 127.3kbits/s speed=0.951x
09-23 15:08:35.022 13909-13909/me.rapchat.rapchat E/Studio Process: size= 389kB time=00:00:25.05 bitrate= 127.3kbits/s speed=0.945x
09-23 15:08:35.542 13909-13909/me.rapchat.rapchat E/Studio Process: size= 392kB time=00:00:25.24 bitrate= 127.3kbits/s speed=0.933x
09-23 15:08:36.082 13909-13909/me.rapchat.rapchat E/Studio Process: size= 399kB time=00:00:25.65 bitrate= 127.3kbits/s speed=0.931x
09-23 15:08:36.572 13909-13909/me.rapchat.rapchat E/Studio Process: size= 405kB time=00:00:26.07 bitrate= 127.3kbits/s speed=0.929x
09-23 15:08:37.082 13909-13909/me.rapchat.rapchat E/Studio Process: size= 410kB time=00:00:26.40 bitrate= 127.3kbits/s speed=0.924x
09-23 15:08:37.632 13909-13909/me.rapchat.rapchat E/Studio Process: size= 417kB time=00:00:26.81 bitrate= 127.3kbits/s speed=0.921x
09-23 15:08:37.862 13909-16848/me.rapchat.rapchat I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
09-23 15:08:37.862 13909-16848/me.rapchat.rapchat I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
09-23 15:08:38.172 13909-13909/me.rapchat.rapchat E/Studio Process: size= 422kB time=00:00:27.14 bitrate= 127.3kbits/s speed=0.915x
09-23 15:08:38.672 13909-13909/me.rapchat.rapchat E/Studio Process: size= 427kB time=00:00:27.51 bitrate= 127.3kbits/s speed=0.912x
09-23 15:08:39.182 13909-13909/me.rapchat.rapchat E/Studio Process: size= 432kB time=00:00:27.79 bitrate= 127.4kbits/s speed=0.906x
09-23 15:08:39.692 13909-13909/me.rapchat.rapchat E/Studio Process: size= 440kB time=00:00:28.25 bitrate= 127.5kbits/s speed=0.906x
09-23 15:08:40.202 13909-13909/me.rapchat.rapchat E/Studio Process: size= 449kB time=00:00:28.81 bitrate= 127.6kbits/s speed=0.909x
09-23 15:08:40.702 13909-13909/me.rapchat.rapchat E/Studio Process: size= 456kB time=00:00:29.28 bitrate= 127.7kbits/s speed=0.909x
09-23 15:08:41.222 13909-13909/me.rapchat.rapchat E/Studio Process: size= 463kB time=00:00:29.69 bitrate= 127.8kbits/s speed=0.908x
09-23 15:08:41.782 13909-13909/me.rapchat.rapchat E/Studio Process: size= 471kB time=00:00:30.16 bitrate= 127.9kbits/s speed=0.907x
09-23 15:08:42.282 13909-13909/me.rapchat.rapchat E/Studio Process: size= 477kB time=00:00:30.53 bitrate= 128.0kbits/s speed=0.905x
09-23 15:08:42.782 13909-13909/me.rapchat.rapchat E/Studio Process: size= 485kB time=00:00:31.04 bitrate= 128.1kbits/s speed=0.906x
09-23 15:08:43.292 13909-13909/me.rapchat.rapchat E/Studio Process: size= 494kB time=00:00:31.55 bitrate= 128.2kbits/s speed=0.907x
09-23 15:08:43.872 13909-13909/me.rapchat.rapchat E/Studio Process: size= 501kB time=00:00:31.97 bitrate= 128.4kbits/s speed=0.905x
09-23 15:08:44.472 13909-13909/me.rapchat.rapchat E/Studio Process: size= 510kB time=00:00:32.48 bitrate= 128.5kbits/s speed=0.906x
09-23 15:08:44.872 13909-13909/me.rapchat.rapchat E/Studio Process: size= 516kB time=00:00:32.85 bitrate= 128.6kbits/s speed=0.904x
09-23 15:08:45.442 13909-13909/me.rapchat.rapchat E/Studio Process: size= 524kB time=00:00:33.36 bitrate= 128.7kbits/s speed=0.903x
09-23 15:08:46.012 13909-13909/me.rapchat.rapchat E/Studio Process: size= 529kB time=00:00:33.69 bitrate= 128.7kbits/s speed=0.898x
09-23 15:08:46.512 13909-13909/me.rapchat.rapchat E/Studio Process: size= 532kB time=00:00:33.87 bitrate= 128.7kbits/s speed=0.891x
09-23 15:08:47.072 13909-13909/me.rapchat.rapchat E/Studio Process: size= 536kB time=00:00:34.11 bitrate= 128.7kbits/s speed=0.885x
09-23 15:08:47.572 13909-13909/me.rapchat.rapchat E/Studio Process: size= 540kB time=00:00:34.38 bitrate= 128.7kbits/s speed=0.88x
09-23 15:08:47.722 13909-13909/me.rapchat.rapchat E/Studio Process: size= 547kB time=00:00:34.45 bitrate= 130.2kbits/s speed=0.878x
09-23 15:08:47.722 13909-13909/me.rapchat.rapchat E/Studio Process: video:0kB audio:541kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.207577%
09-23 15:08:47.722 13909-13909/me.rapchat.rapchat E/Studio Process: [aac # 0xf6f43400] Qavg: 12320.994
The problem is that there is some time delay on this and i'm not sure how to go about optimizing this. I'm pretty new to FFMPEG and the syntax has quite the learning curve when throwing in presets, and codecs. Will the preset ultrafast be what i'm looking for, and how do I add it to this?
Thank you in advance!
I am just trying to compile some simple example code I typed in from a book, and GCC gives me the above error. Here's my code:
$ cat -n test.cpp
1 #define READ_COMMAND 3
2
3 #define MSG_LENGTH 128
4
5 #include <stdlib.h>
6 #include <stdio.h>
7
8 int main(int argc, char *arg[])
9 {
10 int syslog_command = READ_COMMAND;
11 int bytes_to_read = MSG_LENGTH;
12 int retval;
13 char buffer[MSG_LENGTH];
14
15 asm volatile(
16 "movl %1, %%ebx\n\t"
17 "movl %2, %%ecx\n\t"
18 "movl %3, %%edx\n\t"
19 "movl $103, %%eax\n\t"
20 "int $128\n\t"
21 "movl %%eax, %0"
22 :"=r" (retval)
23 :"m"(syslog_command),"r"(buffer),"m"(bytes_to_read)
24 :"%eax","%ebx","%ecx","%edx");
25 if (retval > 0) printf("%s\n", buffer);
26
27 }
28
29
The code is supposed to invoke the syslog() system call to read the last 128 bytes from the kernel printk() ring buffer. Here is some information about my OS and system configuration:
uname -a:
Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Heres the full error:
$ gcc test.cpp
test.cpp: Assembler messages:
test.cpp:25: Error: unsupported for `mov'
You are attempting to compile 32-bit assembly code on a 64-bit machine. The inline assembly you list compiles to:
movl -24(%rbp), %ebx
movl %rsi, %ecx <--- error here
movl -28(%rbp), %edx
movl $103, %eax
int $128
movl %eax, %r12d
As you can see, you're attempting to store a 64-bit register in a 32-bit register, which is illegal. More importantly, this isn't the 64-bit ABI system call protocol either.
Try compiling with -m32 to force 32-bit ABI.
you should use "movq" to move 64 bits value.
see like this:
int main(void)
{
long str_len = 15;
const char* str = "hello world!\n\r";
asm volatile(
"movl $4, %%eax\n\t"
"movl $1, %%ebx\n\t"
"movq %0, %%rcx\n\t"
"movq %1, %%rdx\n\t"
"int $0x80\n\t"
:
:"r"(str), "r"(str_len)
:"eax","ebx", "rcx", "rdx"
);
return 0;
}
I am just trying to compile some simple example code I typed in from a book, and GCC gives me the above error. Here's my code:
$ cat -n test.cpp
1 #define READ_COMMAND 3
2
3 #define MSG_LENGTH 128
4
5 #include <stdlib.h>
6 #include <stdio.h>
7
8 int main(int argc, char *arg[])
9 {
10 int syslog_command = READ_COMMAND;
11 int bytes_to_read = MSG_LENGTH;
12 int retval;
13 char buffer[MSG_LENGTH];
14
15 asm volatile(
16 "movl %1, %%ebx\n\t"
17 "movl %2, %%ecx\n\t"
18 "movl %3, %%edx\n\t"
19 "movl $103, %%eax\n\t"
20 "int $128\n\t"
21 "movl %%eax, %0"
22 :"=r" (retval)
23 :"m"(syslog_command),"r"(buffer),"m"(bytes_to_read)
24 :"%eax","%ebx","%ecx","%edx");
25 if (retval > 0) printf("%s\n", buffer);
26
27 }
28
29
The code is supposed to invoke the syslog() system call to read the last 128 bytes from the kernel printk() ring buffer. Here is some information about my OS and system configuration:
uname -a:
Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Heres the full error:
$ gcc test.cpp
test.cpp: Assembler messages:
test.cpp:25: Error: unsupported for `mov'
You are attempting to compile 32-bit assembly code on a 64-bit machine. The inline assembly you list compiles to:
movl -24(%rbp), %ebx
movl %rsi, %ecx <--- error here
movl -28(%rbp), %edx
movl $103, %eax
int $128
movl %eax, %r12d
As you can see, you're attempting to store a 64-bit register in a 32-bit register, which is illegal. More importantly, this isn't the 64-bit ABI system call protocol either.
Try compiling with -m32 to force 32-bit ABI.
you should use "movq" to move 64 bits value.
see like this:
int main(void)
{
long str_len = 15;
const char* str = "hello world!\n\r";
asm volatile(
"movl $4, %%eax\n\t"
"movl $1, %%ebx\n\t"
"movq %0, %%rcx\n\t"
"movq %1, %%rdx\n\t"
"int $0x80\n\t"
:
:"r"(str), "r"(str_len)
:"eax","ebx", "rcx", "rdx"
);
return 0;
}