Yetangitu / Spodcast

Spodcast is a caching Spotify podcast to RSS proxy. Using Spodcast you can follow Spotify-hosted netcasts/podcasts using any player which supports RSS, thus enabling the use of older hardware which is not compatible with the Spotify (web) app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transcoding not working with docker-compose setup

jamesvincent opened this issue · comments

I can't for the life of me get transcoding to work when using the docker-compose.yml setup. I can see the command is parsed, but no transcoding occurs.

I've noticed the same. I experimented with adding a separate nginx container with php-fpm running with an increased timeout limit but no joy. Attaching the relevant sections from my compose file and nginx.conf file:

docker-compose.yml
...
...
  spodcast-cron:
  image: heywoodlh/spodcast-cron:latest
  container_name: spodcast-cron
  hostname: spodcast-cron
  volumes:
    - ${CONFIG}/spodcast:/data
  environment:
    - PGID
    - PUID
    - CRON_SCHEDULE=0 * * * *
    - SPOTIFY_USERNAME=${SPOTIFY_USR}
    - SPOTIFY_PASSWORD=${SPOTIFY_PWD}
    - SPOTIFY_PODCAST_URLS=https://open.spotify.com/show/6kAsbP8pxwaU2kPibKTuHE
    - TRANSCODE=YES
    - MAX_EPISODES=15
    - LOG_LEVEL=INFO
  restart: unless-stopped

spodcast-php:
  image: php:7-fpm
  container_name: spodcast-php
  hostname: spodcast-php
  volumes:
    - ${CONFIG}/spodcast:/data
  restart: unless-stopped
  user: "101:101"
  networks:
    - local
  depends_on:
    - spodcast-cron

spodcast-web:
  image: heywoodlh/spodcast-web:latest
  container_name: spodcast-web
  hostname: spodcast-web
  volumes:
    - ${CONFIG}/spodcast:/data
  restart: unless-stopped
  networks:
    - local
  ports:
    - 3310:80
  depends_on:
    - spodcast-cron

pod-feed:
  image: nginx:latest
  container_name: pod-feed
  ports:
    - 8080:80
  volumes:
    - ${CONFIG}/pod_rss/default.conf:/etc/nginx/conf.d/default.conf
    - ${CONFIG}/spodcast/html:/var/www/html
  environment:
    - NGINX_HOST=example.local
    - NGINX_PORT=80
  links:
    - php-fpm
  networks:
    - local
  depends_on:
    - php-fpm

php-fpm:
  image: php:8-fpm
  container_name: feed-php
  expose:
    - 9000
  volumes:
    - ${CONFIG}/spodcast/html:/var/www/html
  networks:
    - local
default.conf
...
server {
      listen 80;
      # listen 80 default_server;
      # listen [::]:80;
      # server_name locahost;
      index .index.php;
      
      root /var/www/html;

      fastcgi_read_timeout 300;
      fastcgi_send_timeout 300;

      proxy_read_timeout 300;
      proxy_connect_timeout 300;
      proxy_send_timeout 300;

      # these files should not be accessible
      location ~\.(json|info)$ {
              deny all;
              return 404;
      }

      location / {
              try_files $uri $uri/ /index.php?$query_string =404;
      }

      location /Armchair_Expert_with_Dax_Shepard {
              client_max_body_size 50M;
      }

      # adjust nginx to start if host is not reachable
      resolver 127.0.0.11;
      set $upstream php-fpm:9000;


      location ~ \.php$ {
              try_files $uri =404;
              fastcgi_split_path_info ^(.+\.php)(/.+)$;
              fastcgi_pass $upstream;
              fastcgi_index index.php;
              include fastcgi_params;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              fastcgi_param PATH_INFO $fastcgi_path_info;
      }
}

Interestingly enough, using the nginx proxy, I could add the feed in the iOS Podcast app and follow the request in the container logs, but streaming/downloading continuously errors out. I would love to troubleshoot it further if anyone has any ideas.

I had the same problem.

What seems to have fixed it for me (at least temporarily) is to manually edit spodcast.json (should be located in the root of the used docker-volume) and set "TRANSCODE": "True".

After that, I deleted the podcast from the html folder (this might not be required) and restarted the docker setup. The episodes re-downloaded, were transcoded to mp3 and added to the rss feed immediately.