Skip to main content

Comments

27 comments

  • Shirly Manor

    `mp3` and `mp4` consider as video as the resource type. If you try to overlay an audio/video file. You'll need to add `l_video:<public_id>`.

    For example: https://res.cloudinary.com/demo/video/upload/l_video:bumblebee/dog

    0
  • kathleen

    Shirly, thanks for the info...but I´m missing something, like where to put the public ID of the mp3 overlay.
    this is what I have but it ai t working- https://res.cloudinary.com/demo/image/upload/1_video:A_Thrilled/single3000.mp4

    thanks KD

    0
  • kathleen

    Shirly, I don´t wan´t to sound like I´m not wrapped too tight - I see where you put the public ID but does the ext go into that too, and the brackets around the public ID? all I know is it´s not working

    thanks  KD

    0
  • Aleksandar Kostadinov

    Hi Kathleen,

    The reason your URL didn't work is that you are using the demo account and the GIF (single3000) and MP3 (A_Thrilled) don't exist there. In addition, you are using a 1_ instead of l_ for the overlay which is invalid.

    If you correct the above you will get the below URL.

    https://res.cloudinary.com/dw4ypdgcl/image/upload/l_video:A_Thrilled/single3000.mp4

    Please note that single3000 is a GIF file with only a single frame (still image) and not animated.

    0
  • kathleen

    Thanks Aleksandar for the help. I made the changes but still don´t have the mp3 layover. The single300 is just suppose to be an album cover, meaning no animation. So what I hear you saying is it would have to be animated in order to have the mp3 play as an overlay?

    thanks much, KD

    0
  • Ido

    Hi Kathleen

     

    In order for the mp3 to play on top of a gif, that gif should have the same length as the overlayed mp3. If the length of the base resource and overlay are not the same the overlay would stop playing when the video/animation stops.

     

    For example, I've uploaded a short video to your account and overlayed the requested mp3 on top of it so you could see the effect:

    https://res.cloudinary.com/dw4ypdgcl/video/upload/l_video:A_Thrilled/antelope_crossing.mp4

     

    Since the base gif is a one frame gif, there isn't any sound since it "stops". So the overlay actually works, but there is no sound since the base resource does not have any length/frames to it.

     

    Makes sense?

    0
  • kathleen

    Ido

    yes it makes sense, so I made an animated gif. So if the mp3 is 5:14 minutes long.  which in seconds is about 300 seconds, I would put both mp4 and mp3 at 300 seconds?

     

    thnaks KD

    0
  • Shirly Manor

    Yes, It should work.

    Please send us the link if you have any issues.

    Best,

    0
  • kathleen

    Hello

    I should work, but it´s not. my video works fine, I hear the music. until I add -the following info.  /vs_40,dl_200,h_200,e_loop/cover.mp4 

      I am trying to lengthen the base video - sor the mp3 overlay will play to the end.

    thanks KD

    0
  • 0
  • Shirly Manor

    Hi Kathleen,

     

    When adding `e_loop` you'll need to specify the loop number. 

    For example:

    https://res.cloudinary.com/dw4ypdgcl/video/upload/l_video:A_Thrilled/vs_40,dl_200,h_200,e_loop:3/cover.mp4

     

    Please let me know if that works for you,

    Shirly

     

    0
  • kathleen

    Shirly, thanks for the sample. The problem is, it also affects the overlay that I want to play without looping.
    thanks
    kathleen

    0
  • Shirly Manor

    Hi Kathleen,

    You can try setting the looping to 1.

    If that doesn't work, can you please share a sample?

    If privacy is an issue, please feel free to contact us at support@cloudinary.com

    0
  • kathleen

    Shirly

    setting looping to one would only defet the purpose of lengthening the base video to last as long as the mp3 the overlay. I tried this: https://res.cloudinary.com/dw4ypdgcl/video/upload/l_video:A_Thrilled/vs_40,dl_1000/cover2.mp4 But that did nothing to the base video

    I have tried everything, and it´s such a simple thing to add a album art to a mp3. there has got to be something that affects the base but not the overlay. If I could edit it in my webpage I would but for it to be included in the link it has to be included in Cloudinary.

    thanks

    0
  • kathleen

    Shirly

     

    considering the base video and mp3 work fine apart, the only problem is the mp3 player takes up the whole screen with blackness. is there a way to get rid of all that blackness.  I tried the invisible but that wipes out the player too.

    So I tried again, loading the link on my web page, but there is nothing to lengthen the base video, a poster should be there even when the music stops.

    thanks  KD

    0
  • Shirly Manor

    Hi Kathleen,

    Can you please point up the difference between the original video:

    https://res.cloudinary.com/dw4ypdgcl/video/upload/cover2.mp4

    And the video with the overlay:

    https://res.cloudinary.com/dw4ypdgcl/video/upload/l_video:A_Thrilled/vs_40,dl_1000/cover2.mp4

    Where is the blackness?

    0
  • kathleen

    Shirly

    this is the video with the overlay: https://res.cloudinary.com/dw4ypdgcl/video/upload/l_video:A_Thrilled/cover2.mp4

    with out the vs_40.dl_1000

     

    Thanks KD

    0
  • Raz Ziv

    Hi Kathleen,

    If I understand your requirements correctly, you can try and switch between the order of your transformations components so the component with the loop and delay will be applied first and only afterward the mp3 overlay will be embedded in the video.
    Here's what the URL looks like: https://res.cloudinary.com/dw4ypdgcl/video/upload/vs_40,dl_200,h_200,e_loop:3/l_video:A_Thrilled/cover2.mp4

    Can you please open the above URL and let me know if this is indeed your desired result?

    Raz

    0
  • kathleen

    .hello Raz

    No it is not what I want. 'The mp3 (layover) doesn´t play to the end. I´ve had the mp3s tagged in another program so the album art automatically plays with no problem.  but once the mp3s are loaded to Cloudinary the tag is dropped.and is a problem.  sad to have such a problem on something so simple. 

    Thanks KD

    0
  • kathleen

    Raz

    but I do notice the mp3 plays longer than it did before.  with this link I should be able to make it play to the end, 5:   minues instead of 2: minutes.by adjusting something in the link.

    thanks KD

    0
  • Eyal Katz Talmon

    Hi Kathleen,

    In general, we support variables, which you could make use of in order to dynamically calculate the number of loops -
    https://res.cloudinary.com/dw4ypdgcl/video/upload/$cdur_du/l_video:A_Thrilled,$dur_600/fl_layer_apply/$loops_$dur_div_$cdur/vs_40,dl_200,h_200,e_loop:$loops/cover2.mp4

    But, we currently have a bug with providing the loop effect with a variable.
    I went ahead and opened an internal ticket to have this bug fixed.

    At this point in time, we cannot guarantee if and when this will be resolved, but once we have any updates available, we’ll make sure to share it with you.

    In the meanwhile, as you have mentioned, you can provide the "loop" effect the exact number of loops needed in order to have the entire mp3 played -
    https://res.cloudinary.com/dw4ypdgcl/video/upload/vs_40,dl_200,h_200,e_loop:10/l_video:A_Thrilled/cover2.mp4

    Kind regards,
    Eyal

    0
  • Eyal Katz Talmon

    Hi Kathleen,

    In addition to the above - It came to my attention, that the number of loops for video assets is restricted to a maximum of 5.
    When you provide the loop effect with a number larger than 5, as I did in the above URL, only 5 additional loops would be generated (a total of 6 loops - the first loop is the original video, and 5 additional loops).

    This means, in your case, that in order to have the entire audio track played - 5 minutes, you'll need to apply the loop effect on a video that is at least 50 seconds long. The 'cover2.mp4' video is 30 seconds long, thus the maximum length of video you can achieve by looping over it is 6*30s = 180s = 3 minutes.

    Hope this helps,
    Eyal.

    0
  • kathleen

    Thanks Ryal

    I´ve gotten the hang of the loop.  I have one more question.  I want my link in url to target _self , to open in the same page. as it is it opens in a new page.  I dot see anything about that on Cloudinary.

     

    Thangs KD

    0
  • kathleen

     Okay,

    found that my website can handle the target-thing. So what I´m having problem with is putting 6 buttons in the player area. so when the button is clicked that plays a different song.  I thought I could do that in my web editor but the buttons dont show through. I´ve put the button index and 4 and still they don´t show through.

    Thanks KD

    0
  • Aleksandar Kostadinov

    Hi Kathleen,

    Is there a development/test site we can access to see your implementation of this? Alternatively, are you able to share a JSFiddle with the code so that we can run this and take a further look?

    Best regards,

    Aleksandar

    0
  • kathleen

    Aleksander

    I have no idea what you mean, I´m not familiar with JSFiddle, so I´ll just look for an answer on the internet.

    Thanks

    0
  • Aleksandar Kostadinov

    Hi Kathleen,

    Is there public access to your site where we can see the implementation where the buttons do not show? It's difficult to say what the issue could be without seeing the code or how it's behaving.

    Best regards,

    Aleksandar

    0

Post is closed for comments.