BuddyDev

Search

Local Transcoder – Would like video in orginal resolution up to 1080 x 1920

  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27869

    Hello –

    I notice the transcoder is downscaling 1080p video to 720p.
    I would like to retain 1080p quality if that’s what was uploaded. If it’s 2k or 4k, I would have it downscaled to 1080p.

    Can you tell me where in the PHP code this needs to be adjusted?

  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27870

    Also, I would like all videos to be transcoded to MP4 format.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #27871

    Hi Tony,

    1. We do not check the quality of video and currently let the defaults work. I believe, It can be checked using ffprobe
    https://superuser.com/questions/841235/how-do-i-use-ffmpeg-to-get-the-video-resolution

    We do not have this currently.

    The code to run FFMPEG for video conversions are on line 57 – 61.
    You can most probably append

    
     -s {$width}x{$height}"
    

    e.g

    
    -s 1080x1920
    

    But, It will error out for videos of lower resolution.

    Also, we are not FFMPEG experts currently. Our goal with the plugin is to provide people a way to make videos playable over web and that’s all. There are limitations when we are calling the executable via php. We do hope to overcome limitation of this implementation by offering a microservice for conversion of videos in future.

    We assume that people needing more sophisticated implementation will go for custom development. This is a bare minimal implementation.

    Please feel free to look into FFMPEG docs and modify the plugin as you please
    https://ffmpeg.org/documentation.html

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27873
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27874

    I also observe that any video that is taken on a phone “live” and then uploaded, the video is posted at a resolution of 480×360.

    To replicate use a mobile device / iphone, go to timeline, click upload video, the phone will prompt to take photo/video or go to the photo library…choose take photo/video. Take a video. Upload it.

    You will see that it doesn’t upload at the phone’s 1080p setting. In fact, it’s 480×360.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #27875

    Hi,
    Is there any chance you modified the ffmpeg command in the plugin? We are not specifying any dimension, and the conversion happens server side not the client side, so it does not make sense.

    If a video is of higher resolution, I do not see any reason why it will be scaled to 480×360(Did you try opening the video directly and check its resolution in the browser). The video size may be restricted by our player(we are applying size on the player via css).

    Also, from your previous reply:- You mentioned that if you upload same video from desktop or mobile, they get converted with different resolution. Well, that is not feasible. The server does not care from where the video came. Please recheck it.

    Also, there is a way to maintain the same quality if you want to. Using the -sameq flag.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27876
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 57
    Tony on #27877

    Brajesh –

    It’s possible that in reference to #27873, it is the phone which is compressing before uploading.
    I will look at that first.

    I supposed the same issue is likely related to issue 27874.

    Let me dig into it.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #27879

    Hi Tony,
    Please do let me know what you find.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved