TikTok Mass Posting - Video Uniqueness, Metadata, TikTok Duplicate Detection Algorithm

Python:
import ffmpeg
import os

# Assuming the videos you want to process are in the "videos" folder
DIR = "videos"

def flip_video(path):
    try:
        output_path = path.replace(".mp4", "_flipped.mp4")
        (
            ffmpeg.input(path)
            .filter("hflip")
            .output(
                output_path,
                map_metadata='-1',
                **{
                    "metadata:g:0": "title=My Title",
                    "metadata:g:1": "artist=Me",
                    "metadata:g:2": "album=X",
                    "metadata:g:3": "year=2019"
                }
            )
            .run()
        )
        return True
    except ffmpeg.Error as e:
        print(e.stderr)
        return False

def main():
    files = os.listdir(DIR)
    for file in files:
        if file.endswith('.mp4'):  # Ensure only .mp4 files are processed
            path = os.path.join(DIR, file)
            flip_video(path)

if __name__ == "__main__":
    main()


I think this shsould work
Did you make any changes to the post author's script, or did you just copy and paste it as is? Thank you in advance for your reply.
 
Did you make any changes to the post author's script, or did you just copy and paste it as is? Thank you in advance for your reply.
It seems that this script is designed to horizontally invert (flip) video files in MP4 format, that's pretty little right ?
 
Let's make a group where we can search the key to bypass this algorithm
Okay, sure. I'm ready to cooperate. I'd like to bypass the Instagram, TikTok and, if possible, YouTube algorithms to avoid limiting the visibility of my content. I'm struggling to find a working solution that will help me avoid being penalised by the algorithm. It seems that all social media platforms don't like duplicate content. However, I see a lot of people on Instagram and TikTok reposting other people's videos without any restriction, and I can't understand how this is possible.
 
It seems that this script is designed to horizontally invert (flip) video files in MP4 format, that's pretty little right ?
Yes. It only applies this change. Maybe, this may be sufficient to bypass the algorithm, but I've never tested it.
 
Thank you for your suggestion. You are very kind. I read the first thread carefully and found that the author of the post was unable to circumvent TikTok's detection systems for duplicate content, although he followed the suggestions made by the other participants to the point.

As for the second thread, I will try to test the script, in the hope that it will prove effective in bypassing the algorithm of the various platforms, in particular Instagram and TikTok.
 
Please test this "Video Cropping and Centering Script" and let me know ;)

Code:
import cv2

input_video = "file name.mp4"  # Replace with the name of your video file
output_prefix = "output"
segment_duration = 300  # 5 minutes in seconds

cap = cv2.VideoCapture(input_video)
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
aspect_ratio = 9 / 16

fourcc = cv2.VideoWriter_fourcc(*'mp4v')
output_counter = 1
output_video = None

print("Starting video processing...")

while True:
    ret, frame = cap.read()
    if not ret:
        break

    # Calculate new dimensions for cropping while keeping the content centered
    if frame_width / frame_height > aspect_ratio:
        new_width = int(frame_height * aspect_ratio)
        left = (frame_width - new_width) // 2
        right = left + new_width
        new_frame = frame[:, left:right]
    else:
        new_height = int(frame_width / aspect_ratio)
        top = (frame_height - new_height) // 2
        bottom = top + new_height
        new_frame = frame[top:bottom, :]

    if output_video is None:
        output_video = cv2.VideoWriter(f"{output_prefix}{output_counter:03d}.mp4", fourcc, 30, (new_frame.shape[1], new_frame.shape[0]))

    output_video.write(new_frame)

    if cap.get(0) % (segment_duration * 1000) == 0:
        output_video.release()
        output_counter += 1
        output_video = None
        print(f"Segment {output_counter} generated...")

cap.release()
if output_video:
    output_video.release()

print("Video processing complete.")

  1. Importing OpenCV (cv2) library:
    • The script starts by importing the OpenCV library, which is a popular library for computer vision and video processing tasks.
  2. Setting input video and parameters:
    • The input_video variable is set to the filename of the video you want to process. You should replace "file name.mp4" with your actual video file.
    • The output_prefix is a prefix used for naming the output video segments.
    • The segment_duration is set to 300, which represents a segment duration of 300 seconds or 5 minutes.
  3. Opening the input video:
    • The cv2.VideoCapture function is used to open the input video for processing.
    • The script retrieves the frame width and height from the video, which are used for cropping.
    • It also defines an aspect_ratio of 9/16, which is the desired aspect ratio for the output frames.
  4. Configuring video output settings:
    • The script uses the cv2.VideoWriter_fourcc function to specify the video codec as 'mp4v' (MPEG-4 Video).
    • output_counter is initialized to 1, and output_video is set to None.
  5. Starting video processing:
    • A message is printed to indicate that video processing is beginning.
  6. Looping through video frames:
    • The script enters a while loop to process each frame of the input video.
    • It checks if the end of the video has been reached using the ret variable.
    • The script calculates new dimensions for cropping while keeping the content centered, ensuring the output frames have the desired aspect ratio.
  7. Initializing and writing output video segments:
    • If output_video is None, it initializes a new video segment using cv2.VideoWriter.
    • The output frame is written to the current output segment.
    • If the current frame time is a multiple of the specified segment_duration, the current output segment is released, and a new one is started. The output_counter is incremented, and a message is printed to indicate a new segment is generated.
  8. Releasing video resources:
    • After processing all video frames, the input video is released using cap.release().
    • If there is an open output video segment, it is also released using output_video.release().
  9. Completing video processing:
    • A message is printed to indicate that video processing is complete.
The script essentially reads an input video, crops and resizes the frames to the desired aspect ratio, and creates multiple output video segments of a specified duration.
 
Please test this "Video Cropping and Centering Script" and let me know ;)

Code:
import cv2

input_video = "file name.mp4"  # Replace with the name of your video file
output_prefix = "output"
segment_duration = 300  # 5 minutes in seconds

cap = cv2.VideoCapture(input_video)
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
aspect_ratio = 9 / 16

fourcc = cv2.VideoWriter_fourcc(*'mp4v')
output_counter = 1
output_video = None

print("Starting video processing...")

while True:
    ret, frame = cap.read()
    if not ret:
        break

    # Calculate new dimensions for cropping while keeping the content centered
    if frame_width / frame_height > aspect_ratio:
        new_width = int(frame_height * aspect_ratio)
        left = (frame_width - new_width) // 2
        right = left + new_width
        new_frame = frame[:, left:right]
    else:
        new_height = int(frame_width / aspect_ratio)
        top = (frame_height - new_height) // 2
        bottom = top + new_height
        new_frame = frame[top:bottom, :]

    if output_video is None:
        output_video = cv2.VideoWriter(f"{output_prefix}{output_counter:03d}.mp4", fourcc, 30, (new_frame.shape[1], new_frame.shape[0]))

    output_video.write(new_frame)

    if cap.get(0) % (segment_duration * 1000) == 0:
        output_video.release()
        output_counter += 1
        output_video = None
        print(f"Segment {output_counter} generated...")

cap.release()
if output_video:
    output_video.release()

print("Video processing complete.")

  1. Importing OpenCV (cv2) library:
    • The script starts by importing the OpenCV library, which is a popular library for computer vision and video processing tasks.
  2. Setting input video and parameters:
    • The input_video variable is set to the filename of the video you want to process. You should replace "file name.mp4" with your actual video file.
    • The output_prefix is a prefix used for naming the output video segments.
    • The segment_duration is set to 300, which represents a segment duration of 300 seconds or 5 minutes.
  3. Opening the input video:
    • The cv2.VideoCapture function is used to open the input video for processing.
    • The script retrieves the frame width and height from the video, which are used for cropping.
    • It also defines an aspect_ratio of 9/16, which is the desired aspect ratio for the output frames.
  4. Configuring video output settings:
    • The script uses the cv2.VideoWriter_fourcc function to specify the video codec as 'mp4v' (MPEG-4 Video).
    • output_counter is initialized to 1, and output_video is set to None.
  5. Starting video processing:
    • A message is printed to indicate that video processing is beginning.
  6. Looping through video frames:
    • The script enters a while loop to process each frame of the input video.
    • It checks if the end of the video has been reached using the ret variable.
    • The script calculates new dimensions for cropping while keeping the content centered, ensuring the output frames have the desired aspect ratio.
  7. Initializing and writing output video segments:
    • If output_video is None, it initializes a new video segment using cv2.VideoWriter.
    • The output frame is written to the current output segment.
    • If the current frame time is a multiple of the specified segment_duration, the current output segment is released, and a new one is started. The output_counter is incremented, and a message is printed to indicate a new segment is generated.
  8. Releasing video resources:
    • After processing all video frames, the input video is released using cap.release().
    • If there is an open output video segment, it is also released using output_video.release().
  9. Completing video processing:
    • A message is printed to indicate that video processing is complete.
The script essentially reads an input video, crops and resizes the frames to the desired aspect ratio, and creates multiple output video segments of a specified durati
Thank you for this. May I know if this script work even for Instagram reels?
 
Please note, this script does not create a unique video; for this you must use the True Video Uniqueizer. I just noticed that it doesn't pick up the sound so I modified the script but it will be necessary to install: pip install moviepy and pip install pydub in addition I modified the parts will be 9 minutes each. Test this new version it and tell me if it works !


Code:
import cv2
from moviepy.editor import VideoFileClip
from pydub import AudioSegment
import os

input_video = "file name.mp4" # Replace with the name of your video file
output_dir = "output"
segment_duration = 540  # 9 minutes in seconds

cap = cv2.VideoCapture(input_video)
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
aspect_ratio = 9 / 16

output_counter = 1

print("Processing video started...")

while True:
    ret, frame = cap.read()
    if not ret:
        break

    if frame_width / frame_height > aspect_ratio:
        new_width = int(frame_height * aspect_ratio)
        left = (frame_width - new_width) // 2
        right = left + new_width
        new_frame = frame[:, left:right]
    else:
        new_height = int(frame_width / aspect_ratio)
        top = (frame_height - new_height) // 2
        bottom = top + new_height
        new_frame = frame[top:bottom, :]

    video_clip = VideoFileClip(input_video).subclip((output_counter - 1) * segment_duration, output_counter * segment_duration)
    audio_clip = video_clip.audio

    output_dir = "output/"
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    video_clip.write_videofile(os.path.join(output_dir, f"output{output_counter}.mp4"), codec="libx264", audio=False)
    audio_clip.write_audiofile(os.path.join(output_dir, f"audio{output_counter}.mp3"))

    output_counter += 1
    print(f"Segment {output_counter} generated...")

cap.release()

print("Video processing finished.")
 
Please note, this script does not create a unique video; for this you must use the True Video Uniqueizer. I just noticed that it doesn't pick up the sound so I modified the script but it will be necessary to install: pip install moviepy and pip install pydub in addition I modified the parts will be 9 minutes each. Test this new version it and tell me if it works !


Code:
import cv2
from moviepy.editor import VideoFileClip
from pydub import AudioSegment
import os

input_video = "file name.mp4" # Replace with the name of your video file
output_dir = "output"
segment_duration = 540  # 9 minutes in seconds

cap = cv2.VideoCapture(input_video)
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
aspect_ratio = 9 / 16

output_counter = 1

print("Processing video started...")

while True:
    ret, frame = cap.read()
    if not ret:
        break

    if frame_width / frame_height > aspect_ratio:
        new_width = int(frame_height * aspect_ratio)
        left = (frame_width - new_width) // 2
        right = left + new_width
        new_frame = frame[:, left:right]
    else:
        new_height = int(frame_width / aspect_ratio)
        top = (frame_height - new_height) // 2
        bottom = top + new_height
        new_frame = frame[top:bottom, :]

    video_clip = VideoFileClip(input_video).subclip((output_counter - 1) * segment_duration, output_counter * segment_duration)
    audio_clip = video_clip.audio

    output_dir = "output/"
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    video_clip.write_videofile(os.path.join(output_dir, f"output{output_counter}.mp4"), codec="libx264", audio=False)
    audio_clip.write_audiofile(os.path.join(output_dir, f"audio{output_counter}.mp3"))

    output_counter += 1
    print(f"Segment {output_counter} generated...")

cap.release()

print("Video processing finished.")
OK. Unlike the other script, i.e. the true video uniquezer, what does this script do? Does it not modify the video so that it is not detected as duplicate?
 
Please reread this post :
https://www.blackhatworld.com/seo/t...ate-detection-algorithm.1488080/post-16902325
The functions are explained, I will fix it because it is not operational, moreover I try to include motion tracking in order to maintain centered framing even during camera movements.
As I understand it, the script reads the video, adjusts its size to maintain the desired aspect ratio, and then divides the video into 9-minute segments. Each segment is saved as a new video file (outputX.mp4) and its associated audio is saved separately as an MP3 file (audioX.mp3), where X is the segment number.

This script can be useful when you have a very long video and wish to split it into more manageable parts for later processing. Is that correct?
 
I just made a script and posted the first video. Edits are quite minor but there's a lot of them. I'm hoping this passes the algorithm detection. Will update you guys in the morning. Here's a summary of the script (Generated with GPT):

Purpose:This script aims to process videos from a given directory (DIR), applying a series of visual and audio modifications. After processing, the videos are saved with metadata changes that make them appear as if they were recorded on a random iPhone model.

Imports:

  • uuid: Used to generate a unique identifier.
  • time: To get the current UNIX timestamp.
  • os: For file and directory operations.
  • ffmpeg: For changing video metadata.
  • random: To make random choices and generate random numbers.
  • numpy: Used for numerical operations on video frames.
  • datetime: For time-related operations and formatting.
  • moviepy.editor: To edit video files.
  • moviepy.video.fx.all: For various video effects.
  • moviepy.video.fx: For specific video effects like color modification.
  • moviepy.audio.fx: For audio effects.
Functionalities:

  1. Filename Generation: The generate_iphone_filename function creates a filename mimicking the structure often found with iPhone recordings.
  2. iPhone Model Randomization: The random_iphone_model function returns a random iPhone model from a predefined list.
  3. Lens Details: The lens_details_for_model function maps an iPhone model to its respective camera lens details.
  4. Random US Location: The random_us_location function returns a random latitude and longitude within the continental US.
  5. Portrait Orientation: The get_portrait_orientation function returns 90 degrees, indicating a portrait orientation.
  6. Random Past Time: The random_past_time function gives a random timestamp from the recent past (up to 6 hours).
Video Modifications:

  1. Mirror Effect: The video is mirrored horizontally.
  2. Brightness Modification: Adjusts the brightness of the video.
  3. Gamma Correction: Alters the video's gamma levels.
  4. Random Pixel Modification: Randomly alters pixels in the video to a neutral gray color.
  5. Zooming and Cropping: The video is zoomed in by a random factor and then cropped to its original dimensions.
  6. Saturation Change: The video's saturation is adjusted.
Audio Modifications:The apply_random_audio_effect function divides the video's audio into segments. Each segment's volume is then randomly adjusted either up or down.

Metadata and Saving:

  1. A new filename resembling iPhone naming conventions is generated.
  2. The modified video is initially saved as an intermediate file.
  3. The change_metadata function uses FFmpeg to change the metadata of this intermediate file. The metadata changes make it seem as if the video was recorded on a random iPhone model.
  4. The video with the altered metadata is saved, and the intermediate video is deleted.
Main Execution:In the main function, the script iterates through video files in the specified directory (DIR), applies all the aforementioned modifications, changes their metadata, and then saves them in the converted_videos folder.

The aim of the entire process is to create videos that visually appear modified and have metadata resembling videos recorded on an iPhone.
 
I just made a script and posted the first video. Edits are quite minor but there's a lot of them. I'm hoping this passes the algorithm detection. Will update you guys in the morning. Here's a summary of the script (Generated with GPT):

Purpose:This script aims to process videos from a given directory (DIR), applying a series of visual and audio modifications. After processing, the videos are saved with metadata changes that make them appear as if they were recorded on a random iPhone model.

Imports:


  • uuid: Used to generate a unique identifier.
  • time: To get the current UNIX timestamp.
  • os: For file and directory operations.
  • ffmpeg: For changing video metadata.
  • random: To make random choices and generate random numbers.
  • numpy: Used for numerical operations on video frames.
  • datetime: For time-related operations and formatting.
  • moviepy.editor: To edit video files.
  • moviepy.video.fx.all: For various video effects.
  • moviepy.video.fx: For specific video effects like color modification.
  • moviepy.audio.fx: For audio effects.
Functionalities:

  1. Filename Generation: The generate_iphone_filename function creates a filename mimicking the structure often found with iPhone recordings.
  2. iPhone Model Randomization: The random_iphone_model function returns a random iPhone model from a predefined list.
  3. Lens Details: The lens_details_for_model function maps an iPhone model to its respective camera lens details.
  4. Random US Location: The random_us_location function returns a random latitude and longitude within the continental US.
  5. Portrait Orientation: The get_portrait_orientation function returns 90 degrees, indicating a portrait orientation.
  6. Random Past Time: The random_past_time function gives a random timestamp from the recent past (up to 6 hours).
Video Modifications:

  1. Mirror Effect: The video is mirrored horizontally.
  2. Brightness Modification: Adjusts the brightness of the video.
  3. Gamma Correction: Alters the video's gamma levels.
  4. Random Pixel Modification: Randomly alters pixels in the video to a neutral gray color.
  5. Zooming and Cropping: The video is zoomed in by a random factor and then cropped to its original dimensions.
  6. Saturation Change: The video's saturation is adjusted.
Audio Modifications:The apply_random_audio_effect function divides the video's audio into segments. Each segment's volume is then randomly adjusted either up or down.

Metadata and Saving:


  1. A new filename resembling iPhone naming conventions is generated.
  2. The modified video is initially saved as an intermediate file.
  3. The change_metadata function uses FFmpeg to change the metadata of this intermediate file. The metadata changes make it seem as if the video was recorded on a random iPhone model.
  4. The video with the altered metadata is saved, and the intermediate video is deleted.
Main Execution:In the main function, the script iterates through video files in the specified directory (DIR), applies all the aforementioned modifications, changes their metadata, and then saves them in the converted_videos folder.

The aim of the entire process is to create videos that visually appear modified and have metadata resembling videos recorded on an iPhone.
Where can I find this script, as well as the video you reference?
 
Where can I find this script, as well as the video you reference?
I made it myself.
I just made a script and posted the first video. Edits are quite minor but there's a lot of them. I'm hoping this passes the algorithm detection. Will update you guys in the morning. Here's a summary of the script (Generated with GPT):

Purpose:This script aims to process videos from a given directory (DIR), applying a series of visual and audio modifications. After processing, the videos are saved with metadata changes that make them appear as if they were recorded on a random iPhone model.

Imports:


  • uuid: Used to generate a unique identifier.
  • time: To get the current UNIX timestamp.
  • os: For file and directory operations.
  • ffmpeg: For changing video metadata.
  • random: To make random choices and generate random numbers.
  • numpy: Used for numerical operations on video frames.
  • datetime: For time-related operations and formatting.
  • moviepy.editor: To edit video files.
  • moviepy.video.fx.all: For various video effects.
  • moviepy.video.fx: For specific video effects like color modification.
  • moviepy.audio.fx: For audio effects.
Functionalities:

  1. Filename Generation: The generate_iphone_filename function creates a filename mimicking the structure often found with iPhone recordings.
  2. iPhone Model Randomization: The random_iphone_model function returns a random iPhone model from a predefined list.
  3. Lens Details: The lens_details_for_model function maps an iPhone model to its respective camera lens details.
  4. Random US Location: The random_us_location function returns a random latitude and longitude within the continental US.
  5. Portrait Orientation: The get_portrait_orientation function returns 90 degrees, indicating a portrait orientation.
  6. Random Past Time: The random_past_time function gives a random timestamp from the recent past (up to 6 hours).
Video Modifications:

  1. Mirror Effect: The video is mirrored horizontally.
  2. Brightness Modification: Adjusts the brightness of the video.
  3. Gamma Correction: Alters the video's gamma levels.
  4. Random Pixel Modification: Randomly alters pixels in the video to a neutral gray color.
  5. Zooming and Cropping: The video is zoomed in by a random factor and then cropped to its original dimensions.
  6. Saturation Change: The video's saturation is adjusted.
Audio Modifications:The apply_random_audio_effect function divides the video's audio into segments. Each segment's volume is then randomly adjusted either up or down.

Metadata and Saving:


  1. A new filename resembling iPhone naming conventions is generated.
  2. The modified video is initially saved as an intermediate file.
  3. The change_metadata function uses FFmpeg to change the metadata of this intermediate file. The metadata changes make it seem as if the video was recorded on a random iPhone model.
  4. The video with the altered metadata is saved, and the intermediate video is deleted.
Main Execution:In the main function, the script iterates through video files in the specified directory (DIR), applies all the aforementioned modifications, changes their metadata, and then saves them in the converted_videos folder.

The aim of the entire process is to create videos that visually appear modified and have metadata resembling videos recorded on an iPhone.
Update: The videos made by this are stuck at around 100 views. I have also added some extra video editing. I will try to run the video through the capcut and save it and then post it. I will also try upscaling the video since TikTok's algorithm prefers better quality videos.
 
I made it myself.

Update: The videos made by this are stuck at around 100 views. I have also added some extra video editing. I will try to run the video through the capcut and save it and then post it. I will also try upscaling the video since TikTok's algorithm prefers better quality videos.
Ok, good. I'm waiting for your updates.
 
I made it myself.

Update: The videos made by this are stuck at around 100 views. I have also added some extra video editing. I will try to run the video through the capcut and save it and then post it. I will also try upscaling the video since TikTok's algorithm prefers better quality videos.
Any updates,working with throung capcut or still stuck ?
 
Back
Top