Re: [FFmpeg-user] Get bitrate from stream
2018-09-24 13:26 GMT+02:00, Jesper Nilsson : > This results in a bitrate of 33, but i know that the actual and correct > value is 32. Could you provide a sample? If vlc really shows the correct bitrate, this sounds like a bug in FFmpeg. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Get bitrate from stream
I just realized that this wont work for me either, with the frames. The remote server did not write anything in the frames when running that commad. Unsure why but i just get [FRAME] [/FRAME] [FRAME] [/FRAME] when running that on the server. so i still need to change the bitrate from the read 330k to the correct 320k. Is that possible for a stream? Den mån 24 sep. 2018 kl 13:26 skrev Jesper Nilsson < jesperpoppenils...@gmail.com>: > Hey Moritz, thanks for the reply > Im currently running this command: > fprobe -select_streams a:0 -show_entries stream=bit_rate -of > default=nk=1:nw=1 > Output: > ffprobe version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2007-2018 the FFmpeg > developers > built with gcc 7 (Ubuntu 7.3.0-16ubuntu3) > configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 > --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu > --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping > --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa > --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca > --enable-libcdio --enable-libflite --enable-libfontconfig > --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm > --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg > --enable-libopenmpt --enable-libopus --enable-libpulse > --enable-librubberband --enable-librsvg --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-libxml2 > --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx > --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 > --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r > --enable-libopencv --enable-libx264 --enable-shared > libavutil 55. 78.100 / 55. 78.100 > libavcodec 57.107.100 / 57.107.100 > libavformat57. 83.100 / 57. 83.100 > libavdevice57. 10.100 / 57. 10.100 > libavfilter 6.107.100 / 6.107.100 > libavresample 3. 7. 0 / 3. 7. 0 > libswscale 4. 8.100 / 4. 8.100 > libswresample 2. 9.100 / 2. 9.100 > libpostproc54. 7.100 / 54. 7.100 > [aac @ 0x55e510fe4420] Estimating duration from bitrate, this may be > inaccurate > Input #0, aac, from > 'input.aac': > > Duration: 01:41:49.14, bitrate: 330 kb/s > Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 330 kb/s > 33 > > This results in a bitrate of 33, but i know that the actual and > correct value is 32. When i use the command you sent, the last > pkt_pts_time is the total duration and that value is correct. When using my > commad i get 101 minutes, and the duration is 105 minutes. > > When i tired your command the entire output is logged, and broke my proxy. > Can i make the -select_frames command silent, only printing the laste > output? im only intrested in the last frame. > > Kind Regards, Jesper > > Den fre 21 sep. 2018 kl 16:00 skrev Moritz Barsnick : > >> On Fri, Sep 21, 2018 at 14:47:27 +0200, Jesper Nilsson wrote: >> > Commands Used: >> > >> > ffprobe -select_streams v:0 -show_entries >> frame=pkt_size,pkt_duration_time >> > >> >> The output of that command changes significantly, if you actually >> select the *audio* stream: "-select_streams a:0". (Your AAC file >> probably has no 0:v.) >> >> Since it's obviously a VBR audio track, you need to let ffmpeg, or in >> this case ffprobe, probe all the way to the actual end of the stream, >> to get the real value. As you probably realized. >> >> I used this command: >> >> $ ffprobe -select_streams a:0 -show_entries >> frame=pkt_pts_time,pkt_duration_time input.aac >> >> to see all frames' actual timestamps. >> >> I guess the "proper" length of the audio track - assuming no >> discontinuous PTS - is the last frame's >> pkt_pts_time + pkt_duration_time >> >> Hope this helps, >> Moritz >> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user >> >> To unsubscribe, visit link above, or email >> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Get bitrate from stream
Hey Moritz, thanks for the reply Im currently running this command: fprobe -select_streams a:0 -show_entries stream=bit_rate -of default=nk=1:nw=1 Output: ffprobe version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu3) configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat57. 83.100 / 57. 83.100 libavdevice57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc54. 7.100 / 54. 7.100 [aac @ 0x55e510fe4420] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from 'input.aac': Duration: 01:41:49.14, bitrate: 330 kb/s Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 330 kb/s 33 This results in a bitrate of 33, but i know that the actual and correct value is 32. When i use the command you sent, the last pkt_pts_time is the total duration and that value is correct. When using my commad i get 101 minutes, and the duration is 105 minutes. When i tired your command the entire output is logged, and broke my proxy. Can i make the -select_frames command silent, only printing the laste output? im only intrested in the last frame. Kind Regards, Jesper Den fre 21 sep. 2018 kl 16:00 skrev Moritz Barsnick : > On Fri, Sep 21, 2018 at 14:47:27 +0200, Jesper Nilsson wrote: > > Commands Used: > > > > ffprobe -select_streams v:0 -show_entries > frame=pkt_size,pkt_duration_time > > > > The output of that command changes significantly, if you actually > select the *audio* stream: "-select_streams a:0". (Your AAC file > probably has no 0:v.) > > Since it's obviously a VBR audio track, you need to let ffmpeg, or in > this case ffprobe, probe all the way to the actual end of the stream, > to get the real value. As you probably realized. > > I used this command: > > $ ffprobe -select_streams a:0 -show_entries > frame=pkt_pts_time,pkt_duration_time input.aac > > to see all frames' actual timestamps. > > I guess the "proper" length of the audio track - assuming no > discontinuous PTS - is the last frame's > pkt_pts_time + pkt_duration_time > > Hope this helps, > Moritz > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Get bitrate from stream
On Fri, Sep 21, 2018 at 14:47:27 +0200, Jesper Nilsson wrote: > Commands Used: > > ffprobe -select_streams v:0 -show_entries frame=pkt_size,pkt_duration_time > The output of that command changes significantly, if you actually select the *audio* stream: "-select_streams a:0". (Your AAC file probably has no 0:v.) Since it's obviously a VBR audio track, you need to let ffmpeg, or in this case ffprobe, probe all the way to the actual end of the stream, to get the real value. As you probably realized. I used this command: $ ffprobe -select_streams a:0 -show_entries frame=pkt_pts_time,pkt_duration_time input.aac to see all frames' actual timestamps. I guess the "proper" length of the audio track - assuming no discontinuous PTS - is the last frame's pkt_pts_time + pkt_duration_time Hope this helps, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Get bitrate from stream
Hello, i have been trying to extract the bitrate of a stream for a proxy. This proxy is to set a correct duration and position for a QMediaPlayer. When i run the ffprobe command on the proxy for a specific song, it returns 290 kbit/s. This results in a faulty duration of 52 minutes, where the actual value is 47 minutes. Is this possible to work around this, i know that it says "Estimating duration from bitrate, this may be inaccurate" but when i check the actual bitrate, its 320. This is a too large difference and wont be accepted. I use VLC mediaplayers information to extraxt the correct bitrate. Commands Used: ffprobe -select_streams v:0 -show_entries frame=pkt_size,pkt_duration_time Returns: ffprobe version n4.0.2 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 8.1.1 (GCC) 20180531 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvenc --enable-omx --enable-shared --enable-version3 libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat58. 12.100 / 58. 12.100 libavdevice58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc55. 1.100 / 55. 1.100 [aac @ 0x55e660b0b640] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from '': Duration: 00:52:13.42, bitrate: 290 kb/s Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 291 kb/s Kind regards, Jesper ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".