Re: [FFmpeg-user] FFprobe sometimes freezing instead of exiting?

2018-04-23 Thread Stuart Bruce
On 21 April 2018 at 17:24, Carl Eugen Hoyos  wrote:

> 2018-04-21 14:25 GMT+02:00, Stuart Bruce :
> > The arguments being called to FFprobe are simply this:
> >
> > -show_streams "E:\Tests\2018-04-21\Timecode.mov"
>
> Exits immediately here.
> Can you reproduce the issue from "cmd" (the shell)?
>

Thanks for the response, and apologies for the delay in replying.

I haven't yet been able to reproduce the freeze from the command shell,
which in itself is a possible clue to where my problem may lie.

I am continuing to try and work it and I will post again once I have more
information.

Thanks

Stuart

-- 
Stuart Bruce - stu...@stuartbruce.co.uk - www.stuartbruce.co.uk
___
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] FFprobe sometimes freezing instead of exiting?

2018-04-21 Thread Carl Eugen Hoyos
2018-04-21 14:25 GMT+02:00, Stuart Bruce :
> The arguments being called to FFprobe are simply this:
>
> -show_streams "E:\Tests\2018-04-21\Timecode.mov"

Exits immediately here.
Can you reproduce the issue from "cmd" (the shell)?

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".

[FFmpeg-user] FFprobe sometimes freezing instead of exiting?

2018-04-21 Thread Stuart Bruce
Hello

I've got a Windows Visual Studio .NET application which, amongst other
things, uses FFprobe to get some basic information about the stream content
of movie files. My application starts FFprobe as a thread with arguments,
reads the StandardOutput until FFprobe exists, then works with the data
that FFprobe has provided.

Sometimes, FFprobe will complete finish the requested task of showing all
the stream info, but then it will 'freeze' instead of exiting immediately-
it can sit there for a variable amount of time, sometimes a few seconds,
sometimes several minutes, neither busy nor exiting, just sort of stuck.
Since my application is waiting for FFprobe to exit, users are left waiting
(sometimes impatiently...)

So my question/problem is this: is there a way I can stop FFprobe from
sometimes 'sticking' like this, and ensuring that once the analysis is
done, it closes nice and promptly?

More details:

The arguments being called to FFprobe are simply this:

-show_streams "E:\Tests\2018-04-21\Timecode.mov"

I have pasted FFprobe's console output below. Because it's the last line,
I'm guessing that it's something to do with "Unsupported codec with id 0
for input stream 2". In the case of the media I'm testing with, stream 2 is
a timecode stream (sample stream output is also pasted below).

I've also pasted below what is (I think) the relevant bit of my VB.NET code
in case it's pertinent at all.

If it helps, you can download the basic MOV that I created in Avid Media
Composer for testing purposes from here:
http://www.twentypenguins.co.uk/misc/ffpmeg_tests/Timecode.mov

and you can see a screengrab of the 'stuck' FFprobe console window here:
http://www.twentypenguins.co.uk/misc/ffpmeg_tests/F
Fprobe-freeze-issue_21Apr18.JPG

Any comments or suggestions about what I should do to get ffprobe.exe to
always exit promptly would be much appreciated.

Thanks

Stuart



Console output:

ffprobe version N-90796-ge5ba5fab49 Copyright (c) 2007-2018 the FFmpeg
developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth
  libavutil  56. 15.100 / 56. 15.100
  libavcodec 58. 19.100 / 58. 19.100
  libavformat58. 13.100 / 58. 13.100
  libavdevice58.  4.100 / 58.  4.100
  libavfilter 7. 18.100 /  7. 18.100
  libswscale  5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc55.  2.100 / 55.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Aardman EditReader
tests\2018-04-21\Timecode.mov':
  Metadata:
creation_time   : 2018-04-21T12:23:13.00Z
timecode: 01:00:00:00
  Duration: 00:30:00.00, start: 0.00, bitrate: 875 kb/s
Stream #0:0(eng): Audio: pcm_s16be (twos / 0x736F7774), 44100 Hz, mono,
s16, 705 kb/s (default)
Metadata:
  creation_time   : 2018-04-21T12:23:13.00Z
  handler_name: Apple Alias Data Handler
Stream #0:1(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
smpte170m/smpte170m/bt709), 640x360, 160 kb/s, 25 fps, 25 tbr, 25k tbn, 50k
tbc (default)
Metadata:
  creation_time   : 2018-04-21T12:23:14.00Z
  handler_name: Apple Alias Data Handler
  encoder : H.264
Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
  creation_time   : 2018-04-21T12:47:58.00Z
  handler_name: Apple Alias Data Handler
  timecode: 01:00:00:00
Unsupported codec with id 0 for input stream 2


.NET code that calls FFprobe and gets the results, (where probeProcess is
a System.Diagnostics.Process that has already been pointed to ffprobe.exe):

probeProcess.StartInfo.Arguments = "-show_streams -select_streams v " +
Chr(34) + filePath + Chr(34)
probeProcess.StartInfo.UseShellExecute = False
probeProcess.StartInfo.RedirectStandardOutput = True
probeProcess.StartInfo.RedirectStandardError = True
probeProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
probeProcess.StartInfo.CreateNoWindow = True
probeProcess.Start()
Dim probeStreamReader As StreamReader = probeProcess.StandardOutput
streamData = probeStreamReader.ReadToEnd
myStreamReader.Close()


Stream data that is logged before FFprobe 'freezes':

[STREAM]
index=0
codec_name=pcm_s16be
codec_long_name=PCM si