HoloArchivists / fc2-live-dl

Tool to download FC2 live streams
https://pypi.org/project/fc2-live-dl/
MIT License
113 stars 11 forks source link

docker autofc2 ffmpeg error #24

Closed Zhen-Bo closed 2 years ago

Zhen-Bo commented 2 years ago

I'm using docker run -d --name autofc2 -v D:/Downloads/_FC2/autofc2.json:/app/autofc2.json:ro -v D:/Downloads/_FC2/recordings:/recordings ghcr.io/holoarchivists/fc2-live-dl:latest autofc2 --config /app/autofc2.json after the live stream offline and I got this:

Task exception was never retrieved

future: <Task finished name='Task-14' coro=<AutoFC2.handle_channel() done, defined at /app/.local/lib/python3.10/site-packages/fc2_live_dl/autofc2.py:90> exception=FileNotFoundError(2, 'No such file or directory')>

Traceback (most recent call last):

File "/app/.local/lib/python3.10/site-packages/fc2_live_dl/autofc2.py", line 93, in handle_channel

await fc2.download(channel_id)

File "/app/.local/lib/python3.10/site-packages/fc2_live_dl/FC2LiveDL.py", line 214, in download

await self._remux_stream(fname_stream, fname_muxed)

File "/app/.local/lib/python3.10/site-packages/fc2_live_dl/FC2LiveDL.py", line 279, in _remux_stream

async with FFMpeg(mux_flags) as mux:

File "/app/.local/lib/python3.10/site-packages/fc2_live_dl/ffmpeg.py", line 16, in aenter

self._ffmpeg = await asyncio.create_subprocess_exec(

File "/usr/local/lib/python3.10/asyncio/subprocess.py", line 218, in create_subprocess_exec

transport, protocol = await loop.subprocess_exec(

File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1667, in subprocess_exec

transport = await self._make_subprocess_transport(

File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport

transp = _UnixSubprocessTransport(self, protocol, args, shell,

File "/usr/local/lib/python3.10/asyncio/base_subprocess.py", line 36, in init

self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,

File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 799, in _start

self._proc = subprocess.Popen(

File "/usr/local/lib/python3.10/subprocess.py", line 966, in init

self._execute_child(args, executable, preexec_fn, close_fds,

File "/usr/local/lib/python3.10/subprocess.py", line 1842, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

hizkifw commented 2 years ago

Thanks for the report. I forgot to install ffmpeg in the container. I pushed a commit, can you try to docker pull ghcr.io/holoarchivists/fc2-live-dl:latest and run the command again?

Zhen-Bo commented 2 years ago

The ffmpeg is available when I using the container cli And I was waiting for another stream offline to see the result btw:Is it normal that docker autofc2 wont see the preview file in the recordings folder both in my pc folder and docker recordings folder?(I see the preview ts in /app folder)

hizkifw commented 2 years ago

You should see the recordings in the folder. Make sure you set the outtmpl in your config to point to /recordings as the output folder.

If you didn't, you can try to browse the container and see where the files are: docker exec -it <container id> /bin/sh. You can get the container id with docker ps.

Zhen-Bo commented 2 years ago

Thanks a lot The docker autofc2 should work functionally <m(_ _)m>