
Recherche avancée
Autres articles (59)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8783)
-
Revision 37444 : Si les theora+vorbis plantent sur vorbis quand ils sont en mono, vorbis ...
20 avril 2010, par kent1@… — LogSi les theora+vorbis plantent sur vorbis quand ils sont en mono, vorbis plantera aussi ... on rationalise tout cela
-
FFmpeg av_read_frame() interrupt_callback
14 octobre 2024, par Elijaclass TimeoutHandler_c
{
public:
 TimeoutHandler_c() = default;
 ~TimeoutHandler_c() = default;
 
 void Reset(time_t timeout_microseconds)
 {
 Timeout = timeout_microseconds;
 TimeLast = GET_US_TIME();
 }
 
 bool IsTimeout()
 {
 const time_t duration = GET_US_TIME() - TimeLast;
 LOG(LOG_LEVEL_DEBUG, "Duration = %lli, timeout = %lli, result %i\n", duration, Timeout, duration > Timeout);
 return duration > Timeout;
 }
 
 static int CheckInterrupt(void* t)
 {
 return t && static_cast(t)->IsTimeout();
 }
 
 private:
 time_t Timeout{ 0 }; // microseconds
 time_t TimeLast{ 0 }; // microseconds
};
 
...

TimeoutHandler_c TimeoutHandler; //!< Control maximum time of packets waiting
AvFormatContext->interrupt_callback.opaque = (void*)&TimeoutHandler;
AvFormatContext->interrupt_callback.callback = &TimeoutHandler_c::CheckInterrupt;
 
...

while(1)
{
 ...
 TimeoutHandler.Reset(10000000);
 time_t time_before_av_read_frame = GET_US_TIME(); // microseconds
 int av_res = av_read_frame(AvFormatContext, av_packet.get());
 time_t time_after_av_read_frame = GET_US_TIME(); // microseconds
 LOG(LOG_LEVEL_DEBUG, "av_read_frame() res %i, time %lli, time_limit %lli\n", av_res, time_after_av_read_frame - time_before_av_read_frame, options_open->ReadFrameTimeout);
 
 if (av_res == 0) // packet with frame
 {
 LOG(LOG_LEVEL_DEBUG, "AVPacket(%i): stream_index %i, pts %lli, dts %lli, time_base.num %i, time_base.den %i, duration %lli, size %i, flags 0x%x, pos %lli, side_data_elems %i\n", av_packet_cnt, av_packet->stream_index, av_packet->pts, av_packet->dts, av_packet->time_base.num, av_packet->time_base.den, av_packet->duration, av_packet->size, av_packet->flags, av_packet->pos, av_packet->side_data_elems);
 ++av_packet_cnt;
 av_read_frame_error_count = 0;
 }
 else // no packet
 {
 ++av_read_frame_error_count;
 LOG(LOG_LEVEL_WARNING, "No av_packet, %lli errors in a row. av_read_frame() failed with averror: %s\n", av_read_frame_error_count, av_err2str(av_res));
 }
 ...
}



Logging (times in microseconds) :


10:52:50.234176:Run(925): av_read_frame() res 0, time 20354, time_limit 10000000
10:52:50.234235:Run(931): AVPacket(1695): stream_index 1, pts 661875112, dts 661875112, time_base.num 0, time_base.den 1, duration 1920, size 251, flags 0x1, pos 6341240, side_data_elems 1
10:52:50.234272:Run(925): av_read_frame() res 0, time 1, time_limit 10000000
10:52:50.234293:Run(931): AVPacket(1696): stream_index 1, pts 661877032, dts 661877032, time_base.num 0, time_base.den 1, duration 1920, size 250, flags 0x1, pos -1, side_data_elems 0
10:52:50.234319:Run(925): av_read_frame() res 0, time 1, time_limit 10000000
10:52:50.234338:Run(931): AVPacket(1697): stream_index 1, pts 661878952, dts 661878952, time_base.num 0, time_base.den 1, duration 1920, size 287, flags 0x1, pos -1, side_data_elems 0
10:52:50.234365:Run(925): av_read_frame() res 0, time 0, time_limit 10000000
10:52:50.234393:Run(931): AVPacket(1698): stream_index 1, pts 661880872, dts 661880872, time_base.num 0, time_base.den 1, duration 1920, size 323, flags 0x1, pos -1, side_data_elems 0
10:52:50.234423:IsTimeout(146): Duration = 1, timeout = 10000000, result 0
10:52:50.345009:IsTimeout(146): Duration = 110579, timeout = 10000000, result 0
10:52:50.456198:IsTimeout(146): Duration = 221772, timeout = 10000000, result 0
10:52:50.566359:IsTimeout(146): Duration = 331934, timeout = 10000000, result 0
10:52:50.675843:IsTimeout(146): Duration = 441409, timeout = 10000000, result 0
10:52:50.785050:IsTimeout(146): Duration = 550621, timeout = 10000000, result 0
10:52:50.906415:IsTimeout(146): Duration = 671985, timeout = 10000000, result 0
10:52:51.030219:IsTimeout(146): Duration = 795790, timeout = 10000000, result 0
10:52:51.155401:IsTimeout(146): Duration = 920970, timeout = 10000000, result 0
10:52:51.280220:IsTimeout(146): Duration = 1045789, timeout = 10000000, result 0
10:52:51.405379:IsTimeout(146): Duration = 1170948, timeout = 10000000, result 0
10:52:51.530548:IsTimeout(146): Duration = 1296118, timeout = 10000000, result 0
10:52:51.655525:IsTimeout(146): Duration = 1421099, timeout = 10000000, result 0
10:52:51.780054:IsTimeout(146): Duration = 1545622, timeout = 10000000, result 0
10:52:51.905742:IsTimeout(146): Duration = 1671312, timeout = 10000000, result 0
10:52:52.030028:IsTimeout(146): Duration = 1795598, timeout = 10000000, result 0
10:52:52.156941:IsTimeout(146): Duration = 1922516, timeout = 10000000, result 0
10:52:52.280096:IsTimeout(146): Duration = 2045669, timeout = 10000000, result 0
10:52:52.405634:IsTimeout(146): Duration = 2171209, timeout = 10000000, result 0
10:52:52.530967:IsTimeout(146): Duration = 2296541, timeout = 10000000, result 0
10:52:52.655179:IsTimeout(146): Duration = 2420754, timeout = 10000000, result 0
10:52:52.781832:IsTimeout(146): Duration = 2547403, timeout = 10000000, result 0
10:52:52.905314:IsTimeout(146): Duration = 2670889, timeout = 10000000, result 0
10:52:53.030055:IsTimeout(146): Duration = 2795630, timeout = 10000000, result 0
10:52:53.155874:IsTimeout(146): Duration = 2921448, timeout = 10000000, result 0
10:52:53.281438:IsTimeout(146): Duration = 3047014, timeout = 10000000, result 0
10:52:53.405043:IsTimeout(146): Duration = 3170613, timeout = 10000000, result 0
10:52:53.531218:IsTimeout(146): Duration = 3296793, timeout = 10000000, result 0
10:52:53.656935:IsTimeout(146): Duration = 3422504, timeout = 10000000, result 0
10:52:53.781820:IsTimeout(146): Duration = 3547395, timeout = 10000000, result 0
10:52:53.907028:IsTimeout(146): Duration = 3672600, timeout = 10000000, result 0
10:52:54.030327:IsTimeout(146): Duration = 3795899, timeout = 10000000, result 0
10:52:54.155265:IsTimeout(146): Duration = 3920833, timeout = 10000000, result 0
10:52:54.281383:IsTimeout(146): Duration = 4046958, timeout = 10000000, result 0
10:52:54.405035:IsTimeout(146): Duration = 4170604, timeout = 10000000, result 0
10:52:54.530395:IsTimeout(146): Duration = 4295971, timeout = 10000000, result 0
10:52:54.655403:IsTimeout(146): Duration = 4420976, timeout = 10000000, result 0
10:52:54.780385:IsTimeout(146): Duration = 4545954, timeout = 10000000, result 0
10:52:54.905529:IsTimeout(146): Duration = 4671098, timeout = 10000000, result 0
10:52:55.030476:IsTimeout(146): Duration = 4796050, timeout = 10000000, result 0
10:52:55.155904:IsTimeout(146): Duration = 4921479, timeout = 10000000, result 0
10:52:55.280770:IsTimeout(146): Duration = 5046339, timeout = 10000000, result 0
10:52:55.405693:IsTimeout(146): Duration = 5171254, timeout = 10000000, result 0
10:52:55.530824:IsTimeout(146): Duration = 5296397, timeout = 10000000, result 0
10:52:55.655984:IsTimeout(146): Duration = 5421559, timeout = 10000000, result 0
10:52:55.780807:IsTimeout(146): Duration = 5546382, timeout = 10000000, result 0
10:52:55.905002:IsTimeout(146): Duration = 5670577, timeout = 10000000, result 0
10:52:56.030066:IsTimeout(146): Duration = 5795641, timeout = 10000000, result 0
10:52:56.155151:IsTimeout(146): Duration = 5920726, timeout = 10000000, result 0
10:52:56.281405:IsTimeout(146): Duration = 6046980, timeout = 10000000, result 0
10:52:56.406788:IsTimeout(146): Duration = 6172357, timeout = 10000000, result 0
10:52:56.530478:IsTimeout(146): Duration = 6296054, timeout = 10000000, result 0
10:52:56.656392:IsTimeout(146): Duration = 6421968, timeout = 10000000, result 0
10:52:56.781922:IsTimeout(146): Duration = 6547497, timeout = 10000000, result 0
10:52:56.905743:IsTimeout(146): Duration = 6671311, timeout = 10000000, result 0
10:52:57.031014:IsTimeout(146): Duration = 6796589, timeout = 10000000, result 0
10:52:57.155710:IsTimeout(146): Duration = 6921282, timeout = 10000000, result 0
10:52:57.281593:IsTimeout(146): Duration = 7047168, timeout = 10000000, result 0
10:52:57.406115:IsTimeout(146): Duration = 7171690, timeout = 10000000, result 0
10:52:57.530220:IsTimeout(146): Duration = 7295796, timeout = 10000000, result 0
10:52:57.655566:IsTimeout(146): Duration = 7421135, timeout = 10000000, result 0
10:52:57.780723:IsTimeout(146): Duration = 7546298, timeout = 10000000, result 0
10:52:57.905480:IsTimeout(146): Duration = 7671050, timeout = 10000000, result 0
10:52:58.030799:IsTimeout(146): Duration = 7796375, timeout = 10000000, result 0
10:52:58.155789:IsTimeout(146): Duration = 7921364, timeout = 10000000, result 0
10:52:58.281769:IsTimeout(146): Duration = 8047344, timeout = 10000000, result 0
10:52:58.405858:IsTimeout(146): Duration = 8171427, timeout = 10000000, result 0
10:52:58.531698:IsTimeout(146): Duration = 8297271, timeout = 10000000, result 0
10:52:58.656105:IsTimeout(146): Duration = 8421681, timeout = 10000000, result 0
10:52:58.780503:IsTimeout(146): Duration = 8546072, timeout = 10000000, result 0
10:52:58.905195:IsTimeout(146): Duration = 8670770, timeout = 10000000, result 0
10:52:59.030539:IsTimeout(146): Duration = 8796114, timeout = 10000000, result 0
10:52:59.156909:IsTimeout(146): Duration = 8922482, timeout = 10000000, result 0
10:52:59.281819:IsTimeout(146): Duration = 9047392, timeout = 10000000, result 0
10:52:59.405967:IsTimeout(146): Duration = 9171536, timeout = 10000000, result 0
10:52:59.531362:IsTimeout(146): Duration = 9296937, timeout = 10000000, result 0
10:52:59.655612:IsTimeout(146): Duration = 9421181, timeout = 10000000, result 0
10:52:59.780532:IsTimeout(146): Duration = 9546101, timeout = 10000000, result 0
10:52:59.906761:IsTimeout(146): Duration = 9672331, timeout = 10000000, result 0
10:53:00.030563:IsTimeout(146): Duration = 9796138, timeout = 10000000, result 0
10:53:00.156556:IsTimeout(146): Duration = 9922131, timeout = 10000000, result 0
10:53:00.280257:IsTimeout(146): Duration = 10045828, timeout = 10000000, result 1
10:53:00.280398:Run(925): av_read_frame() res 0, time 10045975, time_limit 10000000
10:53:00.280420:Run(931): AVPacket(1699): stream_index 0, pts 661881817, dts 661874257, time_base.num 0, time_base.den 1, duration 3753, size 1874, flags 0x0, pos 6334472, side_data_elems 1
10:53:00.280480:Run(925): av_read_frame() res 0, time 21, time_limit 10000000
10:53:00.280501:Run(931): AVPacket(1700): stream_index 0, pts 661878037, dts 661878037, time_base.num 0, time_base.den 1, duration 3753, size 1154, flags 0x0, pos 6339924, side_data_elems 0
10:53:00.280533:Run(925): av_read_frame() res -1414092869, time 5, time_limit 10000000
10:53:00.280561:Run(952): No av_packet, 1 errors in a row. av_read_frame() failed with averror: Immediate exit requested
10:53:00.290830:Run(925): av_read_frame() res -1414092869, time 17, time_limit 10000000
10:53:00.290862:Run(952): No av_packet, 2 errors in a row. av_read_frame() failed with averror: Immediate exit requested
10:53:00.301673:Run(925): av_read_frame() res -1414092869, time 25, time_limit 10000000
10:53:00.301725:Run(952): No av_packet, 3 errors in a row. av_read_frame() failed with averror: Immediate exit requested
10:53:00.312259:Run(925): av_read_frame() res -1414092869, time 10, time_limit 10000000
10:53:00.312308:Run(952): No av_packet, 4 errors in a row. av_read_frame() failed with averror: Immediate exit requested
10:53:00.323144:Run(925): av_read_frame() res -1414092869, time 11, time_limit 10000000
10:53:00.323196:Run(952): No av_packet, 5 errors in a row. av_read_frame() failed with averror: Immediate exit requested
10:53:00.334049:Run(925): av_read_frame() res -1414092869, time 9, time_limit 10000000
10:53:00.334101:Run(952): No av_packet, 6 errors in a row. av_read_frame() failed with averror: Immediate exit requested



I start broadcasting to the address udp ://239.0.0.1:6688. I start receiving data successfully. Then I stop broadcasting. As a result, the av_read_frame(), as expected, is blocked for 10 seconds, which I set before calling av_read_frame().
But I have two questions :


- 

- Why, after 10 seconds of blocking and exiting at the maximum waiting time I set, I get 2 good video frames (stream_index 0). Why don't I get these frames earlier ? It seems that the blocking occurs while waiting for elementary audio stream data (stream_index 1), although the elementary video stream data (stream_index 0) is available. But this can't be true, can it ?
- Why do I get "Immediate exit requested" errors with a frequency of 10 milliseconds, although I set the maximum waiting time to 10 seconds each time before av_read_frame() ? Or is the "Immediate exit requested" error not related to the maximum wait time I set ? How is this situation different from waiting for data for 10 seconds earlier, when the broadcast was also already stopped ? I saw that ffplay in some situations uses a wait of 10 milliseconds (https://ffmpeg.org/doxygen/trunk/ffplay_8c_source.html#l03023)






-
Bad video quality and only 3 fps
25 juillet 2019, par ApplowPiThere are a few things wrong with the quality of the output file when I run this command.
arecord -d 0 -r 48000 -c 2 -f S16_LE -t wav -D sysdefault:CARD=tc358743 | avconv -t 0 -i pipe:0 -f v4l2 -i /dev/video0 -c:v libx264 -r 30 -acodec aac -ar 48000 -vcodec flv -strict experimental -y -f flv test.flv
The audio seems okay at the moment but, if I’m reading it correctly (at the very bottom of the output below), the fps is about 3 and the quality is at 31, which I understand is the worse. This is the output during the process.
I’m looking to get 30 fps (ideally 60 if possible).
I’m pretty new to this, any help would be great. Thanks in advance.
ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'pipe:0':
Duration: N/A, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x172e110] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x172e110] Time per frame unknown
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 927.631204, bitrate: N/A
Stream #1:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 120 tbr, 1000k tbn, 1000k tbc
Output #0, flv, to 'test.flv':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720, q=2-31, 200 kb/s, 120 fps, 1k tbn, 120 tbc
Metadata:
encoder : Lavc57.64.101 flv
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.64.101 aac
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
[wav @ 0x1728730] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[video4linux2,v4l2 @ 0x172e110] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
overrun!!! (at least 9513.101 ms long)44kB time=00:00:00.97 bitrate=2890.9kbits/s speed=0.0987x
overrun!!! (at least 25.077 ms long) 363kB time=00:00:01.84 bitrate=1614.1kbits/s speed=0.162x
overrun!!! (at least 254.192 ms long)421kB time=00:00:02.97 bitrate=1159.1kbits/s speed=0.226x
overrun!!! (at least 93.349 ms long) 441kB time=00:00:03.86 bitrate= 935.3kbits/s speed=0.263x
overrun!!! (at least 198.942 ms long)461kB time=00:00:04.97 bitrate= 758.6kbits/s speed=0.303x
overrun!!! (at least 155.909 ms long)526kB time=00:00:06.14 bitrate= 701.0kbits/s speed=0.337x
frame= 54 fps=2.8 q=31.0 Lsize= 534kB time=00:00:06.67 bitrate= 655.6kbits/s speed=0.352xRunning different commands to see what happens. This command :
avconv -t 0 -i /dev/video0 -c:v libx264 -preset ultrafast -y newtest.h264
Slowly builds up to 40 fps but the result is still poor. Feels like it’s 5 fps not 40. The CPU percentage when running this is 65-70%. Output is :
ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[video4linux2,v4l2 @ 0x16d4600] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x16d4600] Time per frame unknown
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 5015.769341, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 59.94 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x16d77e0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x16d77e0] profile High 4:2:2, level 3.2, 4:2:2 8-bit
Output #0, h264, to 'newtest.h264':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (libx264), yuv422p, 1280x720, q=-1--1, 59.94 fps, 59.94 tbn, 59.94 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 1813 fps= 37 q=-1.0 Lsize= 3218kB time=00:00:30.24 bitrate= 871.5kbits/s dup=1700 drop=0 speed=0.617x
video:3218kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
[libx264 @ 0x16d77e0] frame I:8 Avg QP:14.00 size:170114
[libx264 @ 0x16d77e0] frame P:1805 Avg QP:15.46 size: 1071
[libx264 @ 0x16d77e0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x16d77e0] mb P I16..4: 0.4% 0.0% 0.0% P16..4: 2.0% 0.0% 0.0% 0.0% 0.0% skip:97.6%
[libx264 @ 0x16d77e0] coded y,uvDC,uvAC intra: 43.4% 28.3% 19.2% inter: 1.1% 0.8% 0.2%
[libx264 @ 0x16d77e0] i16 v,h,dc,p: 61% 26% 8% 5%
[libx264 @ 0x16d77e0] i8c dc,h,v,p: 68% 12% 17% 4%
[libx264 @ 0x16d77e0] kb/s:871.45Running this command :
avconv -t 0 -i /dev/video0 -r 60 -c:v libx264 -preset ultrafast -y newtest.flv
(just specifying a different output file format, results in a CPU usage of about 30% and produces this output :
avconv -t 0 -i /dev/video0 -r 60 -c:v libx264 -preset ultrafast -y newtest.flv
ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[video4linux2,v4l2 @ 0x527620] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x527620] Time per frame unknown
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 6071.912862, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 120 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x52a870] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x52a870] profile High 4:2:2, level 3.2, 4:2:2 8-bit
[libx264 @ 0x52a870] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 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=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'newtest.flv':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv422p, 1280x720, q=-1--1, 60 fps, 1k tbn, 60 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 158 fps=4.1 q=-1.0 Lsize= 878kB time=00:00:30.70 bitrate= 234.2kbits/s speed=0.803x
video:874kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.385400%
[libx264 @ 0x52a870] frame I:1 Avg QP:20.00 size: 68854
[libx264 @ 0x52a870] frame P:157 Avg QP: 8.93 size: 5261
[libx264 @ 0x52a870] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x52a870] mb P I16..4: 1.4% 0.0% 0.0% P16..4: 7.7% 0.0% 0.0% 0.0% 0.0% skip:90.9%
[libx264 @ 0x52a870] coded y,uvDC,uvAC intra: 28.1% 13.8% 13.4% inter: 3.4% 2.7% 2.3%
[libx264 @ 0x52a870] i16 v,h,dc,p: 76% 22% 1% 1%
[libx264 @ 0x52a870] i8c dc,h,v,p: 88% 4% 7% 0%
[libx264 @ 0x52a870] kb/s:231.42