• Before posting a question, please check our Frequently Asked Questions page as well as previous threads here. Odds are you aren't the first to ask, and you may find the answer without having to post!

Need Help Embedding a Custom-Cropped, Looping Youtube Video Into My Post

Count Gensokyo

Super Smash Bros. Melee is a Fair & Balanced Game
Roleplay Availability
Roleplay Type(s)
Hi, long titles are long.


I've been trying to do it myself, and I've gotten so close so many times. When I had the video able to autoplay upon opening a spoiler tab, play at a custom start and stopping point, and crudely loop through the entire video afterwards, I thought I was almost done. Unfortunately, it keeps resetting for some reason whenever I save the post. I need to find some way to manipulate Youtube's video HTML iframe code to trim the video to a custom length, have it autoplay, have the trimmed section loop infinitely, and embed it into the post. Any help here would be welcome.
 
Last edited by a moderator:
Hello there,


YT's iframe mechanics do allow for things like autoplay, they even have the parameters for these public (and built into the embed function); https://developers.google.com/youtube/player_parameters


However, cropping/atering the video embed is against YT's ToS.  I had actually inquired about something similar a while back and found it to be a fruitless venture.  If you want to play music without video, there are other services like soundcloud.





Soundcloud permits autoplay and many other parameters, including making the embed smaller; https://developers.soundcloud.com/docs/widget  However, there is not a looping option.  Also, a quick bit of advice on autplay; many people find them an annoyance.  Think of those ads that autoplay sound on load.  Every time a user goes to your page they will hear the song autoplay.  I suggest to let it be an option since there might be someone RPing late at night and their speakers might blare the song and disrupt others.
 
However, there is not a looping option.



There actually is; I've personally seen a video that I url-edited myself play from the five second to the fourteen second mark. Using "start=" and "end=" while inputting the amount of seconds after the equals sign and putting a semicolon in between allows for cropping. I saw it while I was editing my CS, so it works there. My theory is that rpnation doesn't allow cropped videos for some reason, which is pretty annoying. I need to have the actual video play a segment to demonstrate a power that a character has.
 
Last edited by a moderator:
There actually is; I've personally seen a video play from the five second to the fourteen second mark that I made myself. Using "start=" and "end=" while pitting the amount of seconds after the equals sign and putting a semicolon in between allows for cropping. I saw it while I was editing my CS, so it works there. My theory is that rpnation doesn't allow cropped videos for some reason, which is pretty annoying.

Soundcloud has no loop, that was what was being referring to there. 


Yes, there is a looping option for YT and RPN does allowed cropped YT videos, we've achieved it before, but it was made clear to not crop the videos because of the ToS.





This is possible, if that is what you want. But to crop out the video isn't.


That video has a start time, end time, and autoplay. Looping it from the start/end parameters will not work as the function isn't set up for that.  Looping is set for a playlist, so a song from start to finish.
 
Last edited by a moderator:
So the autoplay was removed.  This could be YT parameters conflicting.
 
I'd strongly advise against auto-play - it's poor choice in design, no one wants to be surprised with music playing when they load up a non-video site. Additionally, it'll chew up the data and bandwidth of users (like me). Be kind to users on small bandwidths! Don't make designs that invoke auto-playing videos or high quality gifs.
 
@Captain Gensokyo After a bit of googling, I have some bad news.  The autoplay function on YT embeds has basically been borked for a couple of years now (on and off from what I've found).  It could be that the service that RPNation uses disabled autoplay for YT, but it seems strange it wouldn't apply to other embeds.  I can say that soundcloud autoplay works, but again, I really don't think you should do any autoplay.
 
Last edited by a moderator:
I'm not as big about the autoplay. I'm mainly concerned about fully implementing the actual video with a trimmed start and finish time and hopefully looping it effectively. 


@Fyuri @welian
 
The only way to achieve what you want is not possible without the use of javascript.  Looping applies to whole videos and not sections and YT's own solution to this is that one must use javascript API and a specific parameter.  However, YT has made it clear a more than a year+ ago that this is no longer to be done.  Also, the loop iframe parameter function only works in AS3 (also part of depreciation announcement, so no go on that) and a single video can only be looped if a playlist parameter is set.


So, what you want is not supported nor possible with YT embeds.
 
Last edited by a moderator:
If you just need the video, feeding it into an online site that can convert to gif would be your best bet. (Friendly to mobile data users and no annoying autoplay noise)


Otherwise, I'm not sure. 
 
If you just need the video, feeding it into an online site that can convert to gif would be your best bet. (Friendly to mobile data users and no annoying autoplay noise)


Otherwise, I'm not sure. 

While a good idea, if they wish for the audio to loop as well, it wouldn't help regarding that. :\
 
Ohhh, nice @IctoraPost... might.... steal that >_>  Huehuehue.
 

Users who are viewing this thread

Back
Top