Git Product home page Git Product logo

Comments (29)

m1k1o avatar m1k1o commented on May 31, 2024 3

I see that your cache dir does not exist. I just noticed that might be error and fixed in c26cba0.

If you want to keep your cache along with the files, you can remove cache-dir: ./bin/cache this line. Or specify directory, that exists (mount it in docker compose).

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024 2

Just noticed! I have mistake in readme:

  ffmpeg-binary: ffmpeg
  ffprobe-binary: ffmpeg

ffprobe-binary should be ffprobe, but it is ffmpeg. That is why show_format is unrecognized. Gonna fix that, thanks!

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024 1

I hope your team write powerfull document for this module.
really needed

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024 1

Thank you for your patient response :)
Hopefully being best.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

for example i have a mp4 file in /media directory
4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4

and i want the index file -> with this url
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
and it returns :
500 unable to preload metadata

docker-compose logs:

go-transcode    | 12:08PM WRN unable to preload metadata error="unable probe media for metadata: exit status 1" module=hlsvod
go-transcode    | 12:08PM DBG request complete (500) module=http req={"agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","id":"b7e509d9545f/KM6lrEb4VP-000020","method":"GET","proto":"HTTP/1.1","remote":"172.18.0.1:35092","scheme":"http","uri":"http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8"} res={"bytes":31,"elapsed":22.711615,"status":500,"time":"Sun, 05 Dec 2021 12:08:20 UTC"}

config.yaml file :

# allow debug outputs
debug: true

# mount debug pprof endpoint at /debug/pprof/
pprof: true

# bind server to IP:PORT (use :8888 for all connections)
bind: localhost:8080

# serve static files from this directory (optional)
static: /var/www/html

# TODO: issue #4
proxy: true

# For live streaming
streams:
  cam: rtmp://localhost/live/cam
  ch1_hd: http://localhost:9981/stream/channelid/85
  ch2_hd: http://localhost:9981/stream/channelid/43

# For static files
vod:
  # Source, where are static files, that will be transcoded
  media-dir: ./media
  # Temporary transcode output directory, if empty, default tmp folder will be used
  transcode-dir: ./transcode
  # Available video profiles
  video-profiles:
    360p:
      width: 640 # px
      height: 360 # px
      bitrate: 800 # kbps
    540p:
      width: 960
      height: 540
      bitrate: 1800
    720p:
      width: 1280
      height: 720
      bitrate: 2800
    1080p:
      width: 1920
      height: 1080
      bitrate: 5000
  # Use video keyframes as existing reference for chunks split
  # Using this might cause long probing times in order to get
  # all keyframes - therefore they should be cached
  video-keyframes: false
  # Single audio profile used
  audio-profile:
    bitrate: 192 # kbps
  # If cache is enabled
  cache: true
  # If dir is empty, cache will be stored in the same directory as media source
  # If not empty, cache files will be saved to specified directory
  cache-dir: ./cache
  # Use custom ffmpeg & ffprobe binary paths
  ffmpeg-binary: ffmpeg
  ffprobe-binary: ffmpeg

# For proxying HLS streams
hls-proxy:
  my_server: http://localhost:9981

what should i do for index.m3u8 file for a mp4?

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

Any document for this module?

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

Yes, adding usage examples for all modules would be needed.

Quick question, do you have ffmpeg installed? If it cannot preload metdata, it might be because of missing ffmpeg. Or do you use docker image?

And you say your files are in /media but in config it is ./media. Is that expected?

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

Thanks
ffmpeg installed before

image

i used your docker-compose for build
I think its about my media-dir: /media

i use /media directory for videos. what should i put in config.yaml -> media-dir: -----

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

If you use /media, then media-dir: /media should be the correct entry.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

image

still problem exist

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

Your config file is mounted as volume to docker, right? And after changing it you restarted the container and it does not work, correct?

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

absolutely yes

image

and this is my /media directory.

image

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

Can you try to execute ffprobe on that file inside container, to rule out all permissions issues?

Something like this:

docker-compose exec go-transcode ffprobe /media/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

could not find the file from inside docker

image

from outside container it works

image

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

Is it mounted correctly? With - ./media:/media.

version: "3"

services:
  go-transcode:
    build: . # path to go-transcode repository
    container_name: go-transcode
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./config.yaml:/app/config.yaml
      - ./media:/media
    command: serve -d

UPDATE: or - /media:/media.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

ffprobe fixed
when i correct my docker-compose

image

but the URL -> http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
still dosn't return anything

docker-compose logs -f

go-transcode    | 1:17PM WRN unable to preload metadata error="unable probe media for metadata: exit status 1" module=hlsvod
go-transcode    | 1:17PM DBG request complete (500) module=http req={"agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","id":"d03e06e9d058/03MFNWvPjp-000002","method":"GET","proto":"HTTP/1.1","remote":"172.18.0.1:56356","scheme":"http","uri":"http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8"} res={"bytes":31,"elapsed":22.090266,"status":500,"time":"Sun, 05 Dec 2021 13:17:36 UTC"}
go-transcode    | 1:17PM INF fetching metadata module=hlsvod submodule=manager

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

image

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

No problem dear.
i change it
but still same problem
image

its into docker image:
image

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

It looks like, error persists and ffmpeg is still called (because of the show_format error). Could you try to recreate your container, to be sure, changes were applied?

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

completly remove it
image

config inside docker image
image

and ffprobe error not show
there is another error :)
image

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

Added usage examples.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

Thanks bro.
I pulled last changes and problem fixed.
but this url -> http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
not retun completly manifest file
image

and of course using `ffplay` . return err
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8: Invalid data found when processing input

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

Thanks for adding usage examples :)
please add usage example for profile or multi probile/bitrate manifest.
and how can add new profile or change current profile

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

If the master playlist is empty, that can mean, your video resolution is lower than the lowest profile. You can try to get the profile directly. E.g. http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/360p.m3u8 and it should work.

I consider adding the lowest profile all the time, because it should never return empty playlist.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

Thanks
It play when i using to get all of this urls
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/360p.m3u8
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/720p.m3u8
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/1080p.m3u8

but i need the master file.
how could i get the master file?

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

What is the resolution of the video? There is also no point in upscaling, if it is not 1080p. I can though leave at least the lowest one in all cases.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

i use a 1080 video -> http://localhost:8080/vod/17bb20ab-4028-4e2f-acb4-619e4d79c8da_1080.mp4/index.m3u8

the output is like :

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=945000,RESOLUTION=640x360,NAME=360p
360p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1995000,RESOLUTION=960x540,NAME=540p
540p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3045000,RESOLUTION=1280x720,NAME=720p
720p.m3u8

why 1080 profile not in index file?
how could i config these.

from go-transcode.

rezaalimorady avatar rezaalimorady commented on May 31, 2024

and how about subtitles?
how could i add subtitle track?

from go-transcode.

m1k1o avatar m1k1o commented on May 31, 2024

why 1080 profile not in index file?

It looks like a bug, I'll look into this. It should be visible.

I hope your team write powerful document for this module.

My team consist of only me right now. Contributors are welcomed. This module is experimental now and thanks to the people who use it and give me feedback, like you, I can catch lots of bugs and make it better for everyone.

and how about subtitles?

That is on roadmap. Hopefully soon will be supported.

from go-transcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.