Blog posts

The Notorious MEME Culture

Memes. The social media accelerated the impact of Memes on many individuals especially Teens and early 20’s. When asked, people tell different opinions about the stereotypes in these Memes. While many people suppose them as absurd in the sense of racism and sexism, some admire the humor depicted by the Meme creator. Some popular Memes..

Yes, what one person can think of something funny can be offensive to others. Seems  very hard problem to solve (NP Hard? :D). But, as of my opinion, quantifying the impact of Memes on people is really important. Social network analysis researchers should show the downsides and usefulness of this infamous culture. Perhaps, there must be a measure which shows the offensiveness or positive impact of a Meme based on which it can be published on social media or not.

 

Advertisements

Library path issue while compiling some applications on Ubuntu

Problem:
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:

  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

Solution:

export LD_RUN_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib/

 

Ffmpeg Commands for video processing

1. Crop specific portion of video using ffmpeg
ffmpeg -i input.mp4 -filter:v "crop=1080:560:0:650" -c:a copy out.avi
2. Extract individual frames from a video using ffmpeg
ffmpeg -i input.mp4 -vf fps=60 out%d.png
3. Cut specific portion of video using ffmpeg
ffmpeg -ss 24 -i input.mp4 -t 25 -c:a copy out.avi
4. Calculate PSNR/SSIM from input video and reference video using ffmpeg
ffmpeg -i input.mp4 -i rf.mp4 -strict -2 -filter_complex "psnr" "output.mp4"
5. Change the resolution of the video using ffmpeg
ffmpeg -i input.avi -vf scale=320:240 output.avi
6. Concatenate videos using ffmpeg
ffmpeg -i "concat:input1.avi|input2.avi|input3.avi" -c:a copy output.avi
7. Generate video with only black frames, using ffmpeg
ffmpeg -t 60 -s qcif -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero dummy.mp4
8. Insert few black frames to an input video using ffmpeg
ffmpeg -i input.mp4 -f lavfi -i "color=c=black:s=1080x1920:r=25" -filter_complex "[0:v] setpts=PTS-STARTPTS [main]; [1:v] trim=end=10,setpts=PTS-STARTPTS [pre]; [pre][main] concat=n=2:v=1:a=0 [out]" -map "[out]" -vcodec mpeg2video -maxrate 30000k -b:v 30000k output.mp4
9. Split a video into multiple segments at key frames using ffmpeg
ffmpeg -i input.mp4 -f segment -vcodec copy -reset_timestamps 1 -map 0 output%d.mp4
10. Split a video into multiple segments of equal in length or approximately equal
ffmpeg -i input.mp4 -c copy -map 0 -segment_time 8 -f segment output%03d.mp4
11. Filter a video to get duplicate frames in a video using ffmpeg
ffmpeg -i input.mp4 -vf mpdecimate -loglevel debug -f null -
12. Generate a video by removing duplicate frames from input video using ffmpeg
ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4