Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

GPU instance Experience for Video Encoding with php ffpmeg

Hi.
I found on some website that some gpu is 10x or 100x faster in video encoding. currently i am using avoro VDS with 4 core. i am using my custom php script to encode video into 720P or 360P with text watermark. here is php code:
$cmd = "ffmpeg -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v libx264 -crf 23 -preset veryfast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

chatgpt give me hardware accelerator code for this which is:
$cmd = "ffmpeg -y -vsync 0 -hwaccel nvdec -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v h264_nvenc -crf 23 -preset fast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

if i convert a mp4 video in this code, it took 1 second for a 8 second length video approx on my avoro root server which is vds. i am planning to use tensordock.com hourly gpu for test. I know only almalinux/centos/REHL. I see i need to use ubuntu which is almost similar i think. I need nginx, php-fpm, ffmpeg to use. Please share your experience if you use gpu server. if you use gpu server for video encoding with ffmpeg that will be more helpful. any tips or suggestion will be helpful.

Thanked by 2ikibsys lala_th

Comments

  • Very interesting, I will be waiting for updates on this.

    Thanked by 1bdspice
  • I'm interested to know as well.

    Thanked by 1bdspice
  • @ikibsys said:
    Very interesting, I will be waiting for updates on this.

    @lala_th said:
    I'm interested to know as well.

    so i got some people like me. now i hope someone share experience or give suggestion here.

  • still looking for experienced one

  • LeviLevi Member

    Is this some Hindu drama encoding?

  • @bdspice said:
    Hi.
    I found on some website that some gpu is 10x or 100x faster in video encoding. currently i am using avoro VDS with 4 core. i am using my custom php script to encode video into 720P or 360P with text watermark. here is php code:
    $cmd = "ffmpeg -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v libx264 -crf 23 -preset veryfast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

    chatgpt give me hardware accelerator code for this which is:
    $cmd = "ffmpeg -y -vsync 0 -hwaccel nvdec -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v h264_nvenc -crf 23 -preset fast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

    if i convert a mp4 video in this code, it took 1 second for a 8 second length video approx on my avoro root server which is vds. i am planning to use tensordock.com hourly gpu for test. I know only almalinux/centos/REHL. I see i need to use ubuntu which is almost similar i think. I need nginx, php-fpm, ffmpeg to use. Please share your experience if you use gpu server. if you use gpu server for video encoding with ffmpeg that will be more helpful. any tips or suggestion will be helpful.

    avoro VDS,Can the CPU run continuously at 100% 24x7?Has the CPU been stolen?

  • @wangqing said:

    @bdspice said:
    Hi.
    I found on some website that some gpu is 10x or 100x faster in video encoding. currently i am using avoro VDS with 4 core. i am using my custom php script to encode video into 720P or 360P with text watermark. here is php code:
    $cmd = "ffmpeg -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v libx264 -crf 23 -preset veryfast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

    chatgpt give me hardware accelerator code for this which is:
    $cmd = "ffmpeg -y -vsync 0 -hwaccel nvdec -i \"$inputFile\" -vf \"scale=640:360,subtitles='$subtitleFile':force_style='FontName=Arial,FontSize=16,OutlineColour=&H80000008,BorderStyle=3,Shadow=0,Alignment=2,Outline=1' ,drawtext=text='$watermarkText':x=10:y=h-th-10:fontsize=14:fontcolor=white\" -r 25 -c:v h264_nvenc -crf 23 -preset fast -b:v 1000k -maxrate 1200k -bufsize 2400k -c:a aac -b:a 128k \"$outputFile\" > \"{$progressFolderPath}progress_$uniqueIdentifier.txt\" 2>&1 &";

    if i convert a mp4 video in this code, it took 1 second for a 8 second length video approx on my avoro root server which is vds. i am planning to use tensordock.com hourly gpu for test. I know only almalinux/centos/REHL. I see i need to use ubuntu which is almost similar i think. I need nginx, php-fpm, ffmpeg to use. Please share your experience if you use gpu server. if you use gpu server for video encoding with ffmpeg that will be more helpful. any tips or suggestion will be helpful.

    avoro VDS,Can the CPU run continuously at 100% 24x7?Has the CPU been stolen?

    never check cpu stolen. but i do run cpu continuously at 100% for 2-3days when needed.

  • @Levi said:
    Is this some Hindu drama encoding?

    no.

  • dev_vpsdev_vps Member
    edited August 2024

    @wangqing said:

    avoro VDS,Can the CPU run continuously at 100% 24x7?

    Has the CPU been stolen?

    Which translation tool are you using?

    if you are referring to cpu steal statistics, remember every VPS and VDS will have some cpu steal. This is by design, how KVM based VPS (and VDS) run on a host server.

  • @dev_vps said:

    @wangqing said:

    avoro VDS,Can the CPU run continuously at 100% 24x7?

    Has the CPU been stolen?

    Which translation tool are you using?

    If we understand the context, its enough. Correct english is not compulsory

Sign In or Register to comment.