How to locate the intra dct Coefficient in blocks of mpeg-4 visual stream? - mpeg-4

is there any 'easy' way to locate the specific syntax unit(like an intra dct coefficient in 8x8 blocks) in a mpeg4 visual stream?
or just say , the only way to do it is analysing the stream with all the detail?

No easy way at all. You have to decode the stream to get those.
EDIT
Use ffmpeg to get those. A single fprintf in the right place should give it to you.

Related

How to convert Psd to psf?

I have PSD document but my client requires the file in .psf format.Is there any way to convert PSD file to PSf file? Desperately need help.
This is a rather strange request from a client, but I suppose there may be circumstances calling for such arcane undertakings.
Check this: https://fileinfo.com/extension/psf
Then locate that file, package and send.
RobC is correct in his comment. If I were you, I would research ICC (International Colour Consortium) processes. This is standard tools if you work in a (precision) print environment. The general thinking regarding screens (in my neck of the woods anyway) is that there is no colour control on the consumer side (meaning that screens produce varying colour results) and so don't bother with precision — just get it close.
If you want to comment on the specific end-use environment, we can respond to that.

Is there an easy to use way to print a small file as QR-Code on a sheet of paper?

Assume I have sensitive information (passwords, private keys,...) that I saved to a file which I encrypted.
Is there an easy to use tool to convert back and forth between a small file (say 0.5kB) and an image (QR code?) that I can print out to have a safe backup?
You can use LaTeX with the ps-tricks and pst-barcode modules, it produces nice QR codes, and yesm we used it exactly for this purpose: Paper backup of SSH private keys.
Denso Wave of QR code developer distributes software on their site.
Membership registration on the site is required to obtain it.
Even if you can not print with this, there are various tools regardless of free/commercial, so please search.
The maximum amount of data that can be stored in the QR code is 2953 bytes in binary mode.
However, it depends on the ability of the scanner to use.
QR code FAQ #6 Can an image or sound be stored in a QR Code?
I wrote a linux program to do this, called qr-backup.
In researching similar programs as part of it, I discovered a number of alternative projects as well. All of these are also linux-only.
asc2qr.sh
paperbackup. Focused on GPG/SSH key backup. See also the paperkey preprocessor, to reduce the size of keys.
qrdump (incomplete)
qrpdf
If your file is very small (0.5KB is a good cutoff), you can generate one single QR code. An example command-line program to generate it is qrencode. Several web converters are also available.

Block for serial output in GNURadio/GRC

I am working on a project that involves GNU Radio/GRC and am not very familiar with the software. I am trying to output data to a serial port in GNU Radio using a block, but have not found a way to do so.
I was wondering if there is a pre-defined block that I can use to put this information to a serial port (USB on a Raspberry Pi 3), or if I had to create my own block. And if I had to create my own block, what that code would look like.
I have been able to write the data to a file using the File Sink to make sure I was getting data, and was wondering if the fix is something as simple as changing the File sink to an serial port sink. See picture below:
http://imgur.com/a/BdaMZ
I also did some research and found a github repo that looks like what I need -- unfortunately, the repository that it links to is no longer there. It did mention using pyserial, which is what I believe is meant for creating my own block in python. The link to this repo is below:
https://github.com/jmalsbury/gr-pyserial
… was wondering if the fix is something as simple as changing the File sink to an serial port sink.
Yes! Or No, it's even easier:
So, in fact, you could even simply use your file sink to write to e.g. /dev/ttyS0 (or /dev/ttyUSB0, or whatever is the device name of your serial port), but you'd have to set up the serial port to work like you want it to separately first. A way of doing that would be using stty, e.g.
stty -F /dev/ttyS0 115200
prior to running your flow graph.
Note that practically all in your flow graph point points to you not being sufficiently proficient with GNU Radio to successfully exchange data. I can't cover everything here, please read the official Guided Tutorials, but:
In a flow graph like yours, where the IO is the inherently rate-limiting element, you must not use "Throttle". Throttle is really just a tool to avoid a flowgraph consuming all your CPU (and to slow down simulations)
Giving your files a .grc ending is bad practice, as that is the ending reserved for GNU Radio flow graphs.
Giving it a .txt ending is plain misleading, since there's no text involved whatsoever. The "file format" (I wouldn't even call it a format) is really just plain binary numbers, as your computer handles them; not decimal ASCII representations of these floating point binary numbers
I also did some research and found a github repo that looks like what I need -- unfortunately, the repository that it links to is no longer there. It did mention using pyserial, which is what I believe is meant for creating my own block in python. The link to this repo is below:
Don't know what you're referring to, https://github.com/jmalsbury/gr-pyserial is perfectly existing!

scraping a website - is this even possible?

I'd like to extract the Rates values for properties in Northern Ireland from the LPS website http://lpsni.gov.uk/vListDCV/search.asp?submit=form
I'm a reasonable php programmer but I haven't a clue how I'd go about doing this. Can someone point me in the direction of what I need to find out in order to do this?
Is it even possible to do what I want?
Yes, it is very do-able.
Pointers: Ignore trying to go in through the form, all the data can be reached via static links from http://lpsni.gov.uk/vListDCV/districts.asp as all the propertys are fixed it becomes merely a case of scraping each layer for links to build loops within loops eg: councils-wards-streets-etc till you eventually get down to the meat and pull it out using cURL or even just file_get_contents and regex off the bits you don't want. Store for later use in a database.
Scraping data using Php is lengthy and code-driven. You write the script and extract the data from the site but I suggest to automate the process.

How to create a graph in order to parse an mp4 file to get the duration?

I am trying to find duration of an mp4 file using direct show component of windows using the Dotnet wrapper(directShow-lib 2005). But the method i used was GetDuration of IMediaSeeking interface. But this returns zero as duration.
After searching i found the following statement:
"It doesn't matter whether it's in a container or not, it
only matters whether you have a parser/reader for it. There
is no stock DirectShow parser to read raw H.264 files and no
third-party one I can think of. Also, whether IMediaSeeking
would work with such a raw file is implementation-dependent.
Last, most H.264-related filters use MPEG2Video or
VideoInfo2 and neither works with MediaDet, so you would
have to build the graph yourself."
Any body please help me to do this in c#.net?
You'll need to either find or make an MP4 file source filter to make this work. You can build one with mp4v2 or follow the instructions here.

Resources