user27240
user27240

Reputation: 49

How to set the starting point of the video file a little bit later

I would like to set the starting point of the video file a little bit later like 0.01 seconds when I open the detail page of the video file at smartphon site by using the ffmpeg, and the coding I tried is below.

for i in /xxxxxx/xxxxxxx/*.mp4; do ffmpeg -i "$i" -pix_fmt yuv420p -movflags +faststart -ss 0.01 "/xxxxxx/xxxxxxx/$(basename "$i" .mp4).mp4"; done

The reason for that is because when I open the detail page of the video file at smartphone site(iOS and android) it is set to stop to play the video by default(I can not set to start the video automatically) with the circled start button at the white background.(The pc site starts the video automatically by default.) So I would like to see the actual picture from the video file by delaying the starting point at the smartphone detail page.

My understanding is that the starting point of 0 second is the white screen, and then the picture starts to be displayed continuosly after that.

With the command above it does not set it later even though I don't get any error.

Can anyone please help me out to code the right command for this case? Or is there any other way for this case?

Upvotes: 0

Views: 212

Answers (1)

llogan
llogan

Reputation: 134063

Use the poster attribute in the HTML5 <video> element to choose an image to represent the video before playback begins.

<video src="video.webm" poster="image.jpg">

Upvotes: 1

Related Questions