Hi frnds...

i have been successfully uploaded videos to uploads folder through db...

now i need to play that videos ....plz provide code for this one....presently ineed mediaplayer format...

i got the video path....after i dont know how do that...is there any script to run videos....

plz help me asap...

Dani AI

Generated

Since already has uploaded files and stored the path in the database, the remaining tasks are: make sure the stored path is a web-accessible URL (or serve the file via PHP), ensure the file uses a browser-friendly container/codecs, and confirm server limits and MIME types allow serving video. FLV is a Flash container and won’t play natively in modern browsers. Convert FLV to MP4 (H.264 video + AAC audio) for best compatibility, or use a legacy Flash player if conversion is not possible.

A simple HTML5 embed (after converting to MP4) is the most direct option:

<video controls width="640" height="360">
  <source src="/uploads/video.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

To convert FLV to a web-friendly MP4 with ffmpeg (preserves quality and enables progressive streaming):

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

See ffmpeg documentation for options: https://ffmpeg.org/

If uploaded files are stored outside the web root or access control is required, serve them with PHP. A minimal example (no range support) is:

<?php
$path = '/path/to/uploads/video.mp4';
if (!file_exists($path)) exit;
header('Content-Type: video/mp4');
header('Content-Length: ' . filesize($path));
readfile($path);

For seeking and reliable playback, implement HTTP Range support in the script or use server features like X-Sendfile/X-Accel-Redirect. Also verify PHP limits (upload_max_filesize, post_max_size, max_execution_time), file permissions (e.g., 0644 on files, 0755 on folders), and correct MIME types (video/mp4, video/x-flv). For more on the HTML5 element and attributes consult the MDN docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video

Notes: Flash-based players (JW Player, Flowplayer) historically played FLV, but Flash is deprecated—conversion to MP4 + HTML5 is the recommended, future-proof path.

Hi frnds....

plz spent some time for me.....if u have any code regarding Video Upload and run video on my webpage by using databse... plz forward me that files and ur db formate...its very urgent to me.....the video formates are .flv and mediaplayer files.....


present i dont have any idea about regarding this....i am having code for uploading audio files, but its working for audio only, not for video files....

Thanks & Regards
ahmkssv...

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.