apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Add support for uploading and recording videos

Open nicolas-raoul opened this issue 10 years ago • 16 comments

including transcoding to Wikimedia-accepted format

Warning: We have to pay special attention to quality (on-topic, encyclopedic, good technical quality). A 2021 photo+video contest ended up with hundreds of high-quality photos but only one high-quality video.

nicolas-raoul avatar Sep 30 '15 01:09 nicolas-raoul

Commons only accepts WebM (VP8, VP9) and Ogg Theora videos.

This converter could be useful if converting on Android proves inconvenient: https://tools.wmflabs.org/videoconvert/index.php I see a "Auto upload to Commons after conversion is done?" option which is checked but the video does not get uploaded...

2020 update: Now seems to be at https://videoconvert.toolforge.org

nicolas-raoul avatar Jan 25 '16 03:01 nicolas-raoul

This was suggested on the grant talk page:

"I have two additional features to request which could probably make use of the storage and batch processing infrastructure of https://tools.wmflabs.org/video2commons/ - this would allow the uploading of videos and audios - whose formats are difficult to manage otherwise. Shyamal (talk) 08:44, 30 November 2018 (UTC)"

Audio/video support is a suggestion I receive pretty often. Might be worth considering this for a future grant.

Also, should I create an additional issue for audio?

misaochan avatar Nov 30 '18 10:11 misaochan

@brion has offered to help implement this, yay! :)

We should talk about how to best handle potential video-selfie-pocalyptic issues, too. I personally think that it would suffice to have a simple addition to the tutorial or a tooltip, when the feature is implemented... but am open to other suggestions.

misaochan avatar Feb 04 '20 18:02 misaochan

My rough plan is to test on-device transcoding to VP8 or VP9 since that can make use of the device OS and hardware codecs -- Android provides most of the plumbing needed. Performance will make or break this, but I think it should be adequate...

It might be possible to combine transcode and upload into a single pass, but I'm not sure of that (depends on if we need the final file size before we start, I forget).

I'm busy with a conference the next couple weeks; will start experimenting with the Android transcoding mid February.

bvibber avatar Feb 04 '20 19:02 bvibber

Having the ability to upload video directly from my phone using the commons app would be wonderful. Just took some video of leaping benny, a fish, and the still images do not do them justice.

WikiDocJames avatar Feb 08 '20 05:02 WikiDocJames

My bad, Thanks @maskaravivek, I had accidentally closed this one

ashishkumar468 avatar Oct 10 '20 06:10 ashishkumar468

All I know is I have a

intent://media/external/video/media/212369#Intent;scheme=content;type=video/*;launchFlags=0x13080000;S.android.intent.extra.TITLE=V_20201117_093305_vHDR_On%201.mp4;end 
------------ 
ACTION: android.intent.action.VIEW 
DATA: content://media/external/video/media/212369 
MIME: video/* 
URI: intent://media/external/video/media/212369#Intent;scheme=content;type=video/*;launchFlags=0x13080000;S.android.intent.extra.TITLE=V_20201117_093305_vHDR_On%201.mp4;end 
FLAGS: 
FLAG_RECEIVER_FOREGROUND 
FLAG_ACTIVITY_FORWARD_RESULT 
FLAG_ACTIVITY_PREVIOUS_IS_TOP 
FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 
EXTRAS: 
1 Class: java.lang.String 
Key: android.intent.extra.TITLE 
Value: V_20201117_093305_vHDR_On 1.mp4 

------------ 
MATCHING ACTIVITIES: 
Video player (com.asus.gallery - com.asus.gallery.app.MovieActivity) 
VLC (org.videolan.vlc - org.videolan.vlc.StartActivity) 

that my phone makes, that I want to upload directly, without even knowing what formats are even all about.

jidanni avatar Nov 17 '20 01:11 jidanni

For instance, with YouTube no matter what format we upload in, it is not exposed to the user.

And when people view the video on YouTube, it is usually not in the same format that it was uploaded in anyway. Therefore we see websites take care of all this legal stuff for the user automatically.

jidanni avatar Nov 17 '20 01:11 jidanni

Hi @brion , any chance you are still interested in working on this? We've received quite a few requests for video support recently. :)

misaochan avatar Mar 17 '21 12:03 misaochan

pops up

@misaochan ooh I am still interested in this, as long as the work can be time-boxed.

As long as y'all can provide for the large-file upload capability, I can work out a converter that'll use the tools provided by Android itself to do a codec & media format conversion before upload, GPU-accelerated automatically where supported. This'll take some battery power but not as much as re-encoding on CPU, and ideally can be "hidden" as part of the upload UI so users don't have to do anything special to make it work.

I think I can do this in Kotlin directly; if I have trouble with that I can make a Java class you can call from Kotlin.

The main thing is this requires infrastructure in the app for having a converted version in local storage that's sent to upload in place of the original selected from the media gallery, and a UI with progress bar & cancellation button in between hitting "upload" and it going up.

I'll leave it to you folks how to work out the UI. :)

Let me know what kind of schedule you're looking at; I've got some web video stuff to prioritize in the next couple weeks, then I'm mostly moving on to Wikifunctions stuff but can keep time free for specific work like this!

bvibber avatar Mar 22 '21 17:03 bvibber

@nicolas-raoul @4D17Y4 According to https://github.com/commons-app/commons-app-documentation/blob/master/android/Students.md can i consider this project to work on in GSOC 2022 ?

Rishavgupta12345 avatar Mar 23 '22 07:03 Rishavgupta12345

@Rishavgupta12345 If for any reason you are strongly motivated by this issue, you can choose it. But otherwise I would suggest #4764. You can also submit a proposal for each.

nicolas-raoul avatar Mar 23 '22 07:03 nicolas-raoul

It would be really very nice if there was a solution for this!

Is there a timeline for this development?

OpenGreenStreet avatar Jun 06 '22 13:06 OpenGreenStreet

Unfortunately not. :( If anyone is interested in taking this up, please let us know and we would be more than happy to provide support!

misaochan avatar Jun 07 '22 07:06 misaochan