What does gstreamer's h264parse really do? - h.264

I'm confused with what h264parse really does.
I tested with this commands:
with h264parse:
gst-launch-1.0 videotestsrc num-buffers=10 ! x264enc ! h264parse ! avdec_h264 ! videoconvert ! autovideosink
without h264parse:
gst-launch-1.0 videotestsrc num-buffers=10 ! x264enc ! avdec_h264 ! videoconvert ! autovideosink
it makes no difference and both work fine.
Then I tried to save h264 into file and then open it.
save it into file:
gst-launch-1.0 videotestsrc num-buffers=10 ! x264enc ! filesink location=videotestsrc.h264
Open it with h264parse, it works ok and I can see the video:
gst-launch-1.0 filesrc location=videotestsrc.h264 ! h264parse ! avdec_h264 ! videoconvert ! autovideosink
But if I open it without h264parse:
gst-launch-1.0 filesrc location=videotestsrc.h264 ! avdec_h264 ! videoconvert ! autovideosink
it does not work and the error message is like this:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/avdec_h264:avdec_h264-0: GStreamer error: negotiation problem.
Additional debug info:
gstvideodecoder.c(2448): gst_video_decoder_chain (): /GstPipeline:pipeline0/avdec_h264:avdec_h264-0:
decoder not initialized
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
I don't know how to understand it.
Thanks

According to the documentation of avdec_h264, his sink expects parsed format of h264 stream. And what h264parse does, it just parses bytes of h264 in a way that avdec_h264 could understand.
# avdec_h264 sink
video/x-h264:
alignment: au
stream-format: { (string)avc, (string)byte-stream }
video/x-h264:
alignment: nal
stream-format: byte-stream
# h264parse src
video/x-h264:
parsed: true
stream-format: { (string)avc, (string)avc3, (string)byte-stream }
alignment: { (string)au, (string)nal }
So, h264parse doesn't decode h264 bytes into the raw video stream, it just assembles bytes in some form.

Related

HeadersAlready sent error when using TCPDF with Yii2

I am getting HeadersAlreadySent Exception whenever I am printing PDF using TCPDF library, tried following suggestions found on other similar kind of questions, but in vain, none has worked
ob_start();
ob_end_clean();// All other content
return $pdf->Output($localFilePath, $destination);
Any help/pointers would be highly appreciated.
To resolve this error, go to the file called as "tcpdf_static.php" from the tcpdf vendor folder, and in function sendOutputData, replace echo $data with following lines to resolve the issue
ob_start();
ob_end_clean();// All other content
echo $data;
ob_end_flush();
die;

Looking for undefined symbol: _ZN5boost11this_thread6hidden9sleep_forERK8timespec

In my program, libboost_thread-gcc48-mt-d-1_61.so.1.61.0 is linked to build a shared library. But when loading the shared library, an error occurred:
undefined symbol: _ZN5boost11this_thread6hidden9sleep_forERK8timespec
and libboost_thread-gcc48-mt-d-1_61.so.1.61.0 only have the symbol below:
nm -D libboost_thread-gcc48-mt-d-1_61.so.1.61.0 | grep timespec
000000000003aa6f T _ZN5boost11this_thread5hiden9sleep_forERK8timespec
The name difference is thread6hidden and thread5hiden. What are the possible reasons that the shared library looks for this non-existing symbol?
Please help me solve this issue.
Versioning, your libboost is newer

FireBreath does not compile with boost process header file included

I wanted to launch the process from firebreath,so I included "boost/process.hpp". Just including this header alone throws compile error.
could some one help?
FireBreath 1.6.1, FireBreath 1.7.0,windows 8
Error:
2>C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/process/detail/pipe.hpp(129): error C2665: 'boost::system::system_error::system_error' : none of the 7 overloads could convert all the argument types
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(39): could be 'boost::system::system_error::system_error(int,const boost::system::error_category &,const std::string &)'
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(43): or 'boost::system::system_error::system_error(int,const boost::system::error_category &,const char *)'
2> while trying to match the argument list '(DWORD, overloaded-function, const char [54])'
I faced same problem
boost: 1.47
OS: Windows XP (32 bit VM)
But not with FireBreath
I changed boost::system::system_category to boost::system::system_category() in pipe.hpp line 129
the boost::process library that was in FireBreath has compilation errors in them. I have fixed those errors and it now compiles for me, at least when including . I haven't actually tried to use it on windows yet, nor I suspect has anyone else.
Good luck, hope that helps.

d programming language : standard input problem or misunderstanding?

Here is a simple program that reads lines from stdin and outputs them to stdout.
module test;
import std.stdio;
void main(string[] args)
{
foreach (int i, string line; lines(stdin)) {
writeln(line ~ " (test)");
}
}
I'm using the Windows DMD compiler v2.052.
If I do : type file.txt | test.exe
The program appends the word "test" to each line of file.txt and outputs them to the console.
However I keep getting an error at the end:
std.stdio.StdioException#std\stdio.d(2138): Bad file descriptor
Maybe I'm missing something?
It drives me crazy! :)
This is a longstanding bug: http://d.puremagic.com/issues/show_bug.cgi?id=3425
What you're trying to do definitely works on non-Windows operating systems and should work on Windows, too. I think it's a bug in the Digital Mars implementation of the C I/O functions, which are being wrapped by std.stdio. I've tried to fix this bug before, but never even succeeded in identifying its root cause.
I'm not familiar with the type command, maybe it isn't sending EOF when the file is done. In Linux you just do: ./test < file.txt
This is input redirection. Unlike piping, which turns the program output into standard input, this turns the file into standard input of the program. There is also output redirection which takes the output of the program and stores it in a file.
./test > output.txt

GStreamer with VDPAU (h264 acceleration with nVidia cards)

I use last version of gstreamer plugins bad and I would like to try VDPAU.
I test with the big buck bunny movie from blender foundation.
I've try with this command :
gst-launch-0.10 filesrc=/home/alex/big.mp4 ! mp4mux ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink but it could not link mp4mux with vdph264dec.
I also tried with ffdemux_mov_mp4_m4a_3gp_3g2_mj2 instead of mp4mux and gst-launch fail but with an error message :
[...]
Could not create vdpau decoder
[...]
Error returned from vdpau was: An invalid/unsupported VdpDecoderProfile value was supplied
[...]
How can I play h264 with VDPAU capabilities of my NVIDIA card?
Thanks in advance for any help, and please excuse my bad english.
Regards,
mp4mux is a muxer, not a demuxer. You should indeed use ffdemux_mov_mp4_m4a_3gp_3g2_mj2. The following command line worked for me:
gst-launch-0.10 filesrc location=/home/manu/big.mov ! ffdemux_mov_mp4_m4a_3gp_3g2_mj2 ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink