[mythtv-users] output from ffprobe
Leo Butler
leo.butler81 at googlemail.com
Thu Jan 7 20:06:39 UTC 2021
John Pilkington <johnpilk222 at gmail.com> writes:
> On 07/01/2021 03:37, James Linder wrote:
>> I tried to catch the output of mythffprobe. Failure.
>> A quick browse os stack-exchange revealed one of their rare rubish sprouts
>> (ffprobe does NOT write to stdout or stderr so trying to redirect those streams will fail)
In my experience, stack-exchange answers to ffmpeg-related questions are
subpar.
>> /store/Movies [1025]% (mythffprobe Myth-G/The\ Grand\ Budapest\
>> Hotel.mp4) | less
>> looked promising (ie worked as expected)
>> but
>> /store/Movies [1025]% (mythffprobe Myth-G/The\ Grand\ Budapest\
>> Hotel.mp4) | cat > ~/probe
>> did not.
>> Hours spent pouring over the manual (for a -o file type option) were fruitless.
>> Anybody please . . .
>> James
>
> Perhaps this will help: I think you want the 2>&1
>
> {{{
>
> # Get tech details of output file into the log.
> CMD=" mythffprobe -hide_banner -v error -show_streams -show_format
> -of json $filename "
> echo "${CMD}" | tee -a ${logfile}
> ${CMD} 2>&1 | tee -a ${logfile}
> echo
>
> }}}
The 2>&1 is not always parsed correctly by the shell, in my
experience. I use:
ffprobe -v error -show_streams -i infile > output1 2> output2
Note that ffmpeg chooses to emit some things on stdout and some on
stderr. I do not understand why, but c'est la vie.
Leo
More information about the mythtv-users
mailing list