Rendevior / mpv-android-argparse

Simple wrapper that lets you pass arguments to mpv-android, without root access
GNU General Public License v3.0
12 stars 0 forks source link

How to set title when playing local HLS playlist file #6

Open tathastu871 opened 1 year ago

tathastu871 commented 1 year ago

tried mpv url --title="title" not working

Rendevior commented 1 year ago

tried mpv url --title="title" not working

In android: Use --media-title="{your_title}"

For some reason title flag doesnt work on android. But that media-title both works on different platforms.

tathastu871 commented 1 year ago

but how to pass title via adb intent vlc support am -e title option. how to same in mpv

tathastu871 commented 1 year ago

can you give example. not working

tried mpv url --title="title" not working

In android: Use --media-title="{your_title}"

For some reason title flag doesnt work on android. But that media-title both works on different platforms.

tathastu871 commented 1 year ago

how to playlocal m3u8 or media file termux. tried am -e filepath option but not working

Rendevior commented 1 year ago

how to playlocal m3u8 or media file termux. tried am -e filepath option but not working

That extra args is no dice in my side either, I can play local files only using file://.

can you give example. not working

tried mpv url --title="title" not working

In android: Use --media-title="{your_title}" For some reason title flag doesnt work on android. But that media-title both works on different platforms.

I updated the readme, make sure you inserted the correct mpv config setup

include="/storage/emulated/0/mpv/mpv.tmp.mp4"

It would look something like this, just like you're in a normal mpv

mpv -nc --media-title="Hello World" file://file.mp4

Although this only works on files stored in your phone storage and also sdcard, not on your Home dir and so on. Edit: And in the latest commit, i added netcat to support media files in termux home directory without having root or any sorts.

Rendevior commented 1 year ago

But theres a neat way to do it by using netcat to serve your files to be accessible in MPV via http local. I will just merge this into the pr i created to fully fix this filepath problems.

Edit: check the Pull Request tab and test if it works.

tathastu871 commented 1 year ago

how to playlocal m3u8 or media file termux. tried am -e filepath option but not working

That extra args is no dice in my side either, I can play local files only using file://.

can you give example. not working

tried mpv url --title="title" not working

In android: Use --media-title="{your_title}" For some reason title flag doesnt work on android. But that media-title both works on different platforms.

I updated the readme, make sure you inserted the correct mpv config setup

include="/storage/emulated/0/mpv/mpv.tmp.mp4"

It would look something like this, just like you're in a normal mpv

mpv -nc --media-title="Hello World" file://file.mp4

~Although this only works on files stored in your phone storage and also sdcard, not on your Home dir and so on.~ Edit: And in the latest commit, i added netcat to support media files in termux home directory without having root or any sorts.

file://file.mp4 ?? what path it is sdcard or termux

is file.mp4 in your example location is /sdcard/file.mp4 ??

tried file://sdcard/file.webm but it opens and closes instantly

Also media title not working for urls??. eg mpv --media-title="title" http://somesite.m3u8

Rendevior commented 1 year ago

how to playlocal m3u8 or media file termux. tried am -e filepath option but not working

That extra args is no dice in my side either, I can play local files only using file://.

can you give example. not working

tried mpv url --title="title" not working

In android: Use --media-title="{your_title}" For some reason title flag doesnt work on android. But that media-title both works on different platforms.

I updated the readme, make sure you inserted the correct mpv config setup

include="/storage/emulated/0/mpv/mpv.tmp.mp4"

It would look something like this, just like you're in a normal mpv

mpv -nc --media-title="Hello World" file://file.mp4

~Although this only works on files stored in your phone storage and also sdcard, not on your Home dir and so on.~ Edit: And in the latest commit, i added netcat to support media files in termux home directory without having root or any sorts.

file://file.mp4 ?? what path it is sdcard or termux

is file.mp4 in your example location is /sdcard/file.mp4 ??

tried file://sdcard/file.webm but it opens and closes instantly

Also media title not working for urls??. eg mpv --media-title="title" http://somesite.m3u8

No, i'm doing it in the same directory where your target file is.. And also file://sdcard/file.webm is wrong... This must be file:///sdcard/file.webm.

Because if the file:// was stripped, it would result that sdcard is where the same directory as you were on not on the / directory.

file:// <- a protocol /sdcard/file.webm <- is where the file at.

Screenshot_20230209_154335 Screenshot_20230209_154308

tathastu871 commented 1 year ago

media title not working. filename appers as media titlenot custom

https://user-images.githubusercontent.com/65007212/217840815-6aab06a6-d9ef-4266-8bb7-b2b3970e595a.mp4

Rendevior commented 1 year ago

media title not working. filename appers as media titlenot custom

Screen_Recording_20230209-195220_One.UI.Home.mp4

I see, your version seems to be outdated with fix branch, That's why its not working. Try updating it first:

curl -sL -o "$PREFIX/bin/mpv" "https://raw.githubusercontent.com/Rendevior/mpv-android-argparse/fix/mpv"
tathastu871 commented 1 year ago

media title not working. filename appers as media titlenot custom Screen_Recording_20230209-195220_One.UI.Home.mp4

I see, your version seems to be outdated with fix branch, That's why its not working. Try updating it first:

curl -sL -o "$PREFIX/bin/mpv" "https://raw.githubusercontent.com/Rendevior/mpv-android-argparse/fix/mpv"

tried but title not working

Rendevior commented 1 year ago

media title not working. filename appers as media titlenot custom Screen_Recording_20230209-195220_One.UI.Home.mp4

I see, your version seems to be outdated with fix branch, That's why its not working. Try updating it first:

curl -sL -o "$PREFIX/bin/mpv" "https://raw.githubusercontent.com/Rendevior/mpv-android-argparse/fix/mpv"

tried but title not working

Have you checked your mpv.conf? Make sure to set it as:

include="/storage/emulated/0/mpv/mpv.tmp.mp4"
tathastu871 commented 1 year ago

include="/storage/emulated/0/mpv/mpv.tmp.mp4" added already

tathastu871 commented 1 year ago

hey https://github.com/pystardust/ani-cli this script sets custom title to mpv-android player. can you read and decipher what technique it was using to set title

Rendevior commented 1 year ago

hey https://github.com/pystardust/ani-cli this script sets custom title to mpv-android player. can you read and decipher what technique it was using to set title

Uhmm, thats odd, on their android player mpv doesn't seem to play it with title. Try removing the mpv on your $PATH, see if still works. Also indicate your logs to point out whats happening.

And also should we move on discussion tab?