I want to know if it possible for a code to automatically format a video once uploaded by a user to my website.

Dani AI

Generated

As suggested, the usual solution is to transcode on upload — i.e., accept the uploaded file, run a transcode step that writes an MP4 (H.264/AAC) and then serve that. FFmpeg is the standard open‑source tool for this job, but it needs to run on a machine where you can install or run binaries. If you’re on shared hosting (like the GoDaddy plan mentioned by ) you may not have that level of control; alternatives are a VPS/dedicated server or a managed video service. There’s also a browser-side option (ffmpeg.wasm) that can transcode before upload but has file-size and performance limits. (ffmpeg.org)

Server-side pattern (recommended for production): upload → store original → enqueue a job → worker runs FFmpeg → store the MP4 + derived assets (HLS/DASH, thumbnails) → update DB/serve. Example CLI to convert WMV → MP4 (H.264/AAC):

ffmpeg -i input.wmv -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k output.mp4

Tune -crf/-preset for quality vs CPU/time; include logging and a retry/timeout so a single bad file doesn’t stall workers. (ffmpeg.org)

If you can’t run FFmpeg on your host, use a managed transcoder (they handle formats, adaptive renditions and delivery). Services such as Mux, Cloudflare Stream or Cloudinary accept uploads or fetch from cloud storage, transcode to MP4/HLS/DASH, and return playback URLs — this avoids managing servers and scaling. (mux.com)

Practical tips: always keep the original file (in case you need different outputs later), do conversions asynchronously (background queue), enforce size/type limits on upload, monitor CPU/queue length, and test outputs on target browsers/devices. For quick experiments run FFmpeg locally or spin a cheap VPS (you’ll get full control to install FFmpeg and tune pipelines).

Recommended Answers

All 8 Replies

Explain what you mean by 'format'

Say I upload a video that has the extensions .wmv I want the code to format it to .mp4, while the user uploads it.

ffmpeg ?

I have seen this online and dont really understand it, can this program be installed onto my hosting account?

That is something you should ask your host.

I have an account with Godaddy, do you know anything about them?

Well I guess that answers that question. Do you know of any other programs which could format the videos?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.