Skip to content

Instantly share code, notes, and snippets.

View kartdroid's full-sized avatar

Karthick Chinnathambi kartdroid

View GitHub Profile
@kartdroid
kartdroid / 01_m3u8-to-mp4.md
Last active January 2, 2024 22:48 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@kartdroid
kartdroid / m3u8.md
Created June 12, 2022 17:42 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.

1. Store api keys in a xml file

Put xml file "api_keys.xml" in the directory "res/value/".

api_keys.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>
@kartdroid
kartdroid / DemoPlayer_diff.patch
Created November 7, 2019 06:37 — forked from raja-baz/DemoPlayer_diff.patch
ExoPlayer fast surface switch
diff --git a/demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java b/demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java
index 6f1e8b0..cdd0292 100644
--- a/demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java
+++ b/demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java
@@ -40,6 +40,7 @@ import com.google.android.exoplayer.upstream.DefaultBandwidthMeter;
import com.google.android.exoplayer.util.DebugTextViewHelper;
import com.google.android.exoplayer.util.PlayerControl;
+import android.graphics.SurfaceTexture;
import android.media.MediaCodec.CryptoException;
@kartdroid
kartdroid / ndk_setup.md
Created May 7, 2018 07:47 — forked from okamayana/ndk_setup.md
Android Studio: Setting up the IDE for proper JNI NDK integration

Purpose

The purpose of this document is to outline the necessary steps to set up a development environment for Android application development with NDK integration.

Environment setup

This document was written with the following setup:

  • Android Studio version 1.3.2
  • Android NDK version r10e
@kartdroid
kartdroid / VariableSpeedMediaCodecVideoTrackRenderer.java
Created February 28, 2018 05:47 — forked from jmgirven/VariableSpeedMediaCodecVideoTrackRenderer.java
A MediaCodecVideoTrackRenderer that allows playback rate to be changed. DemoPlayer has access to videoRenderer where the playback rate can be changed.
import android.content.Context;
import android.os.Handler;
import android.os.SystemClock;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.MediaClock;
import com.google.android.exoplayer.MediaCodecSelector;
import com.google.android.exoplayer.MediaCodecVideoTrackRenderer;
import com.google.android.exoplayer.SampleSource;
@kartdroid
kartdroid / book.m
Created September 4, 2017 06:59 — forked from mdippery/book.m
An example of using @dynamic properties in Objective-C
#import <Foundation/Foundation.h>
@interface Book : NSObject
{
NSMutableDictionary *data;
}
@property (retain) NSString *title;
@property (retain) NSString *author;
@end