Bug#1026164: ffprobe: "-of json" doesn't report anything

2023-11-14 Thread Diederik de Haas
On 12 Nov 2023 19:56:22 + Phil Wyett  wrote:
> Looking at the docs, you can use -of or -print_format like follows for a
> nice json file.
> 
> ffprobe -v quiet -of json -show_format -show_streams "Critical.ogg" >
> "Critical.ogg.json"
> 
> Your needs may require some changes.

That gives a much nicer/better and much more valid result. Thanks!

signature.asc
Description: This is a digitally signed message part.


Bug#1026164: ffprobe: "-of json" doesn't report anything

2023-11-12 Thread Phil Wyett
On Sun, 12 Nov 2023 20:17:03 +0100 Diederik de Haas  
wrote:
> On 15 Dec 2022 16:05:03 +0100 Matthias Urlichs  wrote:
> > Package: ffmpeg
> > Version: 7:5.1.2-1
> > 
> > $ ffprobe -of json ./01.ogg >/tmp/ff.stdout 2>/tmp/ff.stderr
> > $ cat /tmp/ff.stderr
> > [only header, but no json output]
> > $ cat /tmp/ff.stdout
> > {
> > 
> > }
> > 
> > I'm fairly sure that this is not the intended behavior.
> > 
> > Upstream says that this works for them.
> > https://trac.ffmpeg.org/ticket/10104
> 
> I can reproduce your findings, but ...
> 
> $ ffprobe -hide_banner -of json Critical.ogg 
> {
> Input #0, ogg, from 'Critical.ogg':
>   Duration: 00:00:00.63, start: 0.00, bitrate: 129 kb/s
>   Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 86 kb/s
> 
> }
> $ ffprobe -hide_banner -of json Critical.ogg 2>/dev/null
> {
> 
> }
> 
> So it looks like `2>/dev/null` 'hides' the output.
> I don't know if without it, is valid json though.
> Using 'xml' as output_format gives an interesting result ...

Hi,

Looking at the docs, you can use -of or -print_format like follows for a nice 
json file.

ffprobe -v quiet -of json -show_format -show_streams "Critical.ogg" > 
"Critical.ogg.json"

Your needs may require some changes.

Regards

Phil

-- 
Playing the game for the games sake.

* Debian Maintainer

Web:

* Debian Wiki: https://wiki.debian.org/PhilWyett
* Website: https://kathenas.org

Social:

* Instagram: kathenasorg
* Threads: @kathenasorg





signature.asc
Description: This is a digitally signed message part


Bug#1026164: ffprobe: "-of json" doesn't report anything

2023-11-12 Thread Diederik de Haas
On 15 Dec 2022 16:05:03 +0100 Matthias Urlichs  wrote:
> Package: ffmpeg
> Version: 7:5.1.2-1
> 
> $ ffprobe -of json ./01.ogg >/tmp/ff.stdout 2>/tmp/ff.stderr
> $ cat /tmp/ff.stderr
> [only header, but no json output]
> $ cat /tmp/ff.stdout
> {
> 
> }
> 
> I'm fairly sure that this is not the intended behavior.
> 
> Upstream says that this works for them.
> https://trac.ffmpeg.org/ticket/10104

I can reproduce your findings, but ...

$ ffprobe -hide_banner -of json Critical.ogg 
{
Input #0, ogg, from 'Critical.ogg':
  Duration: 00:00:00.63, start: 0.00, bitrate: 129 kb/s
  Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 86 kb/s

}
$ ffprobe -hide_banner -of json Critical.ogg 2>/dev/null
{

}

So it looks like `2>/dev/null` 'hides' the output.
I don't know if without it, is valid json though.
Using 'xml' as output_format gives an interesting result ...

signature.asc
Description: This is a digitally signed message part.


Bug#1026164: ffprobe: "-of json" doesn't report anything

2022-12-15 Thread Matthias Urlichs
Package: ffmpeg
Version: 7:5.1.2-1
Severity: important
X-Debbugs-Cc: sm...@smurf.noris.de

$ ffprobe -of json ./01.ogg >/tmp/ff.stdout 2>/tmp/ff.stderr
$ cat /tmp/ff.stderr
ffprobe version 5.1.2-1 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-3)
  configuration: --prefix=/usr --extra-version=1 --toolchain=hardened 
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu 
--arch=amd64 --enable-gpl --disable-stripping --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-libglslang --enable-libgme --enable-libgsm 
--enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg 
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq 
--enable-librist --enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh 
--enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 
--enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq 
--enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl 
--enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx 
--enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm 
--enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 
--enable-libplacebo --enable-librav1e --enable-shared
  libavutil  57. 28.100 / 57. 28.100
  libavcodec 59. 37.100 / 59. 37.100
  libavformat59. 27.100 / 59. 27.100
  libavdevice59.  7.100 / 59.  7.100
  libavfilter 8. 44.100 /  8. 44.100
  libswscale  6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc56.  6.100 / 56.  6.100
Input #0, ogg, from './01.ogg':
  Duration: 00:02:36.45, start: 0.00, bitrate: 141 kb/s
  Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 160 kb/s
$ cat /tmp/ff.stdout
{

}

I'm fairly sure that this is not the intended behavior.

Upstream says that this works for them.
https://trac.ffmpeg.org/ticket/10104

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (700, 'testing'), (650, 'stable'), (600, 'oldstable'), (500, 
'stable-security'), (500, 'unstable'), (450, 'focal'), (350, 'oldoldstable'), 
(300, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.0.0-5-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ffmpeg depends on:
ii  libavcodec597:5.1.2-1
ii  libavdevice59   7:5.1.2-1
ii  libavfilter87:5.1.2-1
ii  libavformat59   7:5.1.2-1
ii  libavutil57 7:5.1.2-1
ii  libc6   2.36-6
ii  libpostproc56   7:5.1.2-1
ii  libsdl2-2.0-0   2.24.2+dfsg-1
ii  libswresample4  7:5.1.2-1
ii  libswscale6 7:5.1.2-1

ffmpeg recommends no packages.

Versions of packages ffmpeg suggests:
pn  ffmpeg-doc  

-- debconf-show failed