Use of StreamDecoder

14 views
Skip to first unread message

Bernard Maassen

unread,
Nov 6, 2013, 9:09:32 AM11/6/13
to avblocks...@googlegroups.com
HI Support,

We're running into a problem decoding h264 frames from a certain camera.

I've captured the raw rtp data stream and VideoConverter can transcode it.
However when i tried to test it with the StreamDecoder it crashed.

The command used:
StreamDecoder.exe --input frames.1383743011871.dat --streamtype H264 --output output
Input file: frames.1383743011871.dat
YUV output file: output
Open Transcoder: Success
--- crash ---

Did i use the sample program incorrect?

Bernard
frames.1383743011871.dat

Svilen Stoilov

unread,
Nov 7, 2013, 9:53:06 AM11/7/13
to avblocks...@googlegroups.com
Hi Bernard,
 
we checked your sample file with the StreamDecoder and it actually worked. We used the latest released version 1.6.1 (Windows x86 Demo) with the same command line as yours.
 
 
Can you confirm that it still crashes with you?
Does it crash in
res = transcoder->run(); // StreamDecoder.cpp line:127
or in the following line:

printError(L"Run Transcoder", transcoder->error()); // StreamDecoder.cpp line:128

 

Are you using AVBlocks 1.6.1 or something else?

 

Thanks,

Svilen

Bernard Maassen

unread,
Nov 7, 2013, 10:08:03 AM11/7/13
to avblocks...@googlegroups.com
Hi Svilen,

For me it still crashes,
I've run it as debug and got the following:

Unhandled exception at 0x7697DEE1 (KernelBase.dll) in StreamDecoder.exe: 0xC0000005: Access violation writing location 0x00000000.

with the following stack:
     KernelBase.dll!7697dee1()    Unknown
     [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]   
     kernel32.dll!757b12cc()    Unknown
>    StreamDecoder.exe!FileStream::write(const void * buffer, int dataSize) Line 166    C++
     AVBlocks.dll!0fd542c1()    Unknown
     AVBlocks.dll!0fd5440d()    Unknown
     AVBlocks.dll!0fd5a2b8()    Unknown
     AVBlocks.dll!0fd5a4f8()    Unknown
     AVBlocks.dll!0fd5a4f8()    Unknown
     AVBlocks.dll!0fd5c431()    Unknown
     AVBlocks.dll!0fd5c7d4()    Unknown
     msvcr110d.dll!_unlock(int locknum) Line 366    C
     msvcr110d.dll!_unlock_file(_iobuf * pf) Line 300    C

Bernard Maassen

unread,
Nov 7, 2013, 10:12:40 AM11/7/13
to avblocks...@googlegroups.com
Forgot to tell:

yes i'm using the demo 1.6.1 for windows

Bernard Maassen

unread,
Nov 8, 2013, 2:41:21 AM11/8/13
to Bernard Maassen via AVBlocks Support
As its decoding for you,
could you check if it actually decodes usable images?

What we see is that the decoder decodes the frames, but that the produced images are incorrect.
Key frames are decoded correctly,
but all non key frames seem to have no relation to decoded key frame resulting in:
Inline images 1
We only see the changes.

If we send the exact same byte data into a different decoder it decodes without any problem.
Might be usefull to know that the stream contains interlaced frames



Kind regards / Met vriendelijke groet,

Bernard Maassen

--
You received this message because you are subscribed to the Google Groups "AVBlocks Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to avblocks-support+unsubscribe@googlegroups.com.
To post to this group, send email to avblocks-support@googlegroups.com.
Visit this group at http://groups.google.com/group/avblocks-support.
For more options, visit https://groups.google.com/groups/opt_out.

Capture.PNG

Svilen Stoilov

unread,
Nov 7, 2013, 10:50:09 AM11/7/13
to avblocks...@googlegroups.com
This looks like an error in the StreamDecoder sample.
In FileStream.h line:166:
 
return TRUE == WriteFile(m_hFile, buffer, dataSize, NULL, NULL);
 
It should be like this
 
DWORD bytesWritten;
return TRUE == WriteFile(m_hFile, buffer, dataSize, &bytesWritten, NULL);
 
So the call to WriteFIle is not correct but it seems that it doesn't crash on all Windows versions.
What is your Windows version?
 
I believe the above should fix the crash.
 
Thanks,
Svilen

Bernard Maassen

unread,
Nov 7, 2013, 10:54:19 AM11/7/13
to Svilen Stoilov via AVBlocks Support, avblocks...@googlegroups.com
HI Svilen,

the change doesn't compile as bytesWritten isn't known

I'm running on windows 7 64 bit




--
You received this message because you are subscribed to the Google Groups "AVBlocks Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to avblocks-suppo...@googlegroups.com.
To post to this group, send email to avblocks...@googlegroups.com.

Svilen Stoilov

unread,
Nov 7, 2013, 11:02:50 AM11/7/13
to avblocks...@googlegroups.com
It should. I'm attaching the modified FileStream.h form the StreamDecoder sample
 
Changed lines: 166,167
FileStream.h
Message has been deleted
Message has been deleted

Valentin Kantchev

unread,
Nov 7, 2013, 11:20:06 AM11/7/13
to AVBlocks Support on behalf of Bernard Maassen
See if this works for you: http://www.yuvtoolkit.com/

Svilen Stoilov

unread,
Nov 7, 2013, 11:32:13 AM11/7/13
to
Bernard, I sent you an archive of our decoded output to your corporate email to see that it looks OK.
 
About yuv player we have used this one: http://yuvplayer.com/
It automatically detects the frame size if it is part of the filename: e.g. output_640x480.yuv
It kind of works. It has a free license.
But I've noticed that it doesn't play correctly the required frame rate. I cannot remember if it was quicker or slower than required but it was not correct.
 
Another usable raw player is Vooya: http://www.offminor.de/
 
Regards,
Svilen

On Thursday, November 7, 2013 6:12:03 PM UTC+2, Bernard Maassen wrote:
Hi Svilen,

This indeed worked.
Do you know any program that could play the uncompressed video output file?
Or do i need to write it my self?



Kind regards / Met vriendelijke groet,

Bernard Maassen
Chief Technology Officer & Lead Java developer

Reply all
Reply to author
Forward
0 new messages