Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for an open-source tool/code or some guidance to extract the motion vectors (MVs) of a H.264 encoded bit sequence. I'm already aware that motion vectors can be visualized using ffmpeg with the following command:
ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
However, I want to produce a log file where the MVs of P and B frames are listed frame by frame. I checked out the structure of MVs from libavutil/motion_vector.h, but I couldn't find an example which shows how they are extracted and laid over the original sequence by ffplay. I thought that if I can find that out, I could possibly re-arrange the code to extract the MVs to a text file.
I also tried the code given in this answer, but it doesn't seem to work with the newer versions of ffmpeg:
I would appreciate any example codes or hints.
The source code for the codecview video filter is here, is that what you're looking for?
[edit] Sorry I guess that's not terribly helpful. The function you're looking for is filter_frame(), which shows you how to read AVMotionVectors (as side-data) from a given AVFrame, this is the code used in your commandline example. This example calls draw_arrow(), but you can simply replace that with a call to printf() or some custom function that logs the MV information to a logfile of your choosing.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to cross check a C implementation of the CRC64 ECMA-182 algorithm.
I tried a different C code snippet I found online and I tried two online CRC calculators but each of them returned different results.
Is there some reference implementation or reference data that allows me to get a reliable reference checksum?
The EMBL-EBI web site has an online checksum calculator, that is used in the context of bioinformatics for analysing protein or genome sequences:
http://www.ebi.ac.uk/Tools/so/seqcksum/
that supports many different methods, included the CRC64-ECMA-182. You can paste your input sequence directly in the form and it will return the checksum. The problem is that the input is a sequence must be one from a set of fixed formats:
http://www.ebi.ac.uk/Tools/so/seqcksum/help/index.html#sequence
However those formats are quite simple, for example the FASTA (link)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
In reading the man pages for tcpdump, I saw that the -dd arguement would output the dump as a fragment of a C file. In what situations is that useful? I take it this is to quickly include and compile the fragment in a program that will be used to process the data according to code we write ourselves? Does this have its utility with unknown or new protocols? Is there some other common, standing situation in which this is needed? Just curious.
It's useful if you're writing a program using libpcap/WinPcap that would use a filter but that, for whatever reason, wouldn't run pcap_compile() to translate a filter string into BPF machine code; it lets you do the compilation with tcpdump and generate some text that you could use in the initialization of an array of struct bpf_insn (a pointer to which, and a count of elements in which, you'd put in a struct bpf_program).
I'm not sure who would do that, however.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking for a .c editor that has:
1) text formatting, for example to set some line to bold/italic or different color
2) context awareness
For example I would like to automatic highlight for a code section.
For example between the call to function A and the call to function B to have a different background color.
If I call function A
Or if I am using a local variable that is not initialized to have the variable name marked in red.
Do you know any editor with such features?
Thank you.
I could suggest you a hell lot with syntax highlighting.Sublime on linux,windows notepad ++ on windows,visual studio etc.
But when considering your second requirement I realise that not many editors satisfy the condition and it is better for you to use vim and modify it accordingly.
A few links i can post which will help you achieve the same C/C++ ide using vim
Another one to refer is this question from SO itself Vim for C
Thanks
Or if I am using a local variable that is not initialized to have the variable >name marked in red.
That actually sounds like Intellisense or some other smart code checking.
You can try Microsoft Visual C++ Express and just save files as '.c' instead of '.cpp'.
You can try as well CodeBlocks, CLion (commercial), Code (not as smart, but lightweight and cross-platform).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have a text file (generated by a script each week) with multiple lines, where I'd like to strip out certain characted, that differ each week. The files can look something like this;
Community S05E05 Geothermal Escapism SD TV.avi
Community S05E02 Introduction to Teaching SD TV.mp4
Supernatural S09E12 Sharp Teeth SD TV.avi
Elementary S02E11 Internal Audit SD TV.mp4
What I want removed is the season/episode numbering, and the quality and filetype. How to do this on a synology machine (busybox linux).
Given the comment you posted about a perl solution, it sounds like this is all you need:
$ awk '{$2="-";NF-=2}1' file
Community - Geothermal Escapism
Community - Introduction to Teaching
Supernatural - Sharp Teeth
Elementary - Internal Audit
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking for a small C library to handle utf8 strings.
Specifically, splitting based on unicode delimiters for use with stemming algorithms.
Related posts have suggested:
ICU http://www.icu-project.org/ (I found it too bulky for my purposes on embedded devices)
UTF8-CPP: http://utfcpp.sourceforge.net/ (Excellent, but C++ not C)
Has anyone found any platform independent, small codebase libraries for handling unicode strings (doesn't need to do naturalisation).
A nice, light, library which I use successfully is utf8proc.
There's also MicroUTF-8, but it may require login credentials to view or download the source.
UTF-8 is specially designed so that many byte-oriented string functions continue to work or only need minor modifications.
C's strstr function, for instance, will work perfectly as long as both its inputs are valid, null-terminated UTF-8 strings. strcpy works fine as long as its input string starts at a character boundary (for instance the return value of strstr).
So you may not even need a separate library!