Comskip icon indicating copy to clipboard operation
Comskip copied to clipboard

comskip on Debian Buster

Open leosimony opened this issue 5 years ago • 8 comments

Anyone tried this on Debian Buster,

mpeg2dec.c:2386:25: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] double frame_delay = av_q2d(is->video_st->codec->time_base) * is->video_st->codec->ticks_per_frame; ^~~~~~ In file included from mpeg2dec.c:35: /usr/local/include/libavformat/avformat.h:712:21: note: declared here AVCodecContext *codec; ^~~~~ make: *** [Makefile:570: comskip-mpeg2dec.o] Error 1

Stucked on this error. No luck on forums. Can someone help on this

leosimony avatar Aug 19 '19 13:08 leosimony

Install docker; run comskip in a container.

Regards,

Mitch Brown [email protected] 330-391-0447


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 9:54 AM To: erikkaashoek/Comskip Cc: Subscribed Subject: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Anyone tried this on Debian Buster,

mpeg2dec.c:2386:25: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] double frame_delay = av_q2d(is->video_st->codec->time_base) * is->video_st->codec->ticks_per_frame; ^~~~~~ In file included from mpeg2dec.c:35: /usr/local/include/libavformat/avformat.h:712:21: note: declared here AVCodecContext *codec; ^~~~~ make: *** [Makefile:570: comskip-mpeg2dec.o] Error 1

Stucked on this error. No luck on forums. Can someone help on this

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMWXY6KTT4VHP5BE7H3QFKQYVA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HF7XBKQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHZPMRV7XC5SBVSM5ATG2DQFKQYVANCNFSM4INB4VZQ.

mjbrowns avatar Aug 19 '19 14:08 mjbrowns

Mitch, I am not sure how that will work for us. We need this on a Physical box.

leosimony avatar Aug 19 '19 14:08 leosimony

Actually it will. Docker runs on bare metal servers. Containerization is not the same as Virtualizaton. In this case it will allow you to work around code dependency issues.

If I have a bit of free time later today I can write up some details on it. That said, you will be well served getting some docker experience.

You could also use lxc/lxd, but IMO for this docker will be more user friendly.

Regards,

Mitch Brown [email protected] 330-391-0447


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 10:05 AM To: erikkaashoek/Comskip Cc: Mitch Brown; Comment Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Mitch, I am not sure how that will work for us. We need this on a Physical box.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMXRMLITZJ2A3QNKA5TQFKSAXA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TBPTA#issuecomment-522590156, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHZPMVVHRKOI2XBUIDCSDTQFKSAXANCNFSM4INB4VZQ.

mjbrowns avatar Aug 19 '19 14:08 mjbrowns

That said, buster is pretty new. Not sure docker is ready on it either :)

Regards,

Mitch Brown [email protected] 330-391-0447


From: Mitchell Brown [email protected] on behalf of Mitchell Brown [email protected] Sent: Monday, August 19, 2019 10:09 AM To: erikkaashoek/Comskip; erikkaashoek/Comskip Cc: Comment Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Actually it will. Docker runs on bare metal servers. Containerization is not the same as Virtualizaton. In this case it will allow you to work around code dependency issues.

If I have a bit of free time later today I can write up some details on it. That said, you will be well served getting some docker experience.

You could also use lxc/lxd, but IMO for this docker will be more user friendly.

Regards,

Mitch Brown [email protected] 330-391-0447


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 10:05 AM To: erikkaashoek/Comskip Cc: Mitch Brown; Comment Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Mitch, I am not sure how that will work for us. We need this on a Physical box.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMXRMLITZJ2A3QNKA5TQFKSAXA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TBPTA#issuecomment-522590156, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHZPMVVHRKOI2XBUIDCSDTQFKSAXANCNFSM4INB4VZQ.

mjbrowns avatar Aug 19 '19 14:08 mjbrowns

Thanks Mitch. I am new to Docker. Any details on this is appreciated.

On Mon, Aug 19, 2019, 7:39 PM Mitch Brown [email protected] wrote:

Actually it will. Docker runs on bare metal servers. Containerization is not the same as Virtualizaton. In this case it will allow you to work around code dependency issues.

If I have a bit of free time later today I can write up some details on it. That said, you will be well served getting some docker experience.

You could also use lxc/lxd, but IMO for this docker will be more user friendly.

Regards,

Mitch Brown [email protected] 330-391-0447


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 10:05 AM To: erikkaashoek/Comskip Cc: Mitch Brown; Comment Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Mitch, I am not sure how that will work for us. We need this on a Physical box.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMXRMLITZJ2A3QNKA5TQFKSAXA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TBPTA#issuecomment-522590156>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AGHZPMVVHRKOI2XBUIDCSDTQFKSAXANCNFSM4INB4VZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=ALKF2HPJWAJCU5IGVQ265XDQFKSS5A5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TCASI#issuecomment-522592329, or mute the thread https://github.com/notifications/unsubscribe-auth/ALKF2HKEDRANH2ZZTE6XM7LQFKSS5ANCNFSM4INB4VZQ .

leosimony avatar Aug 19 '19 14:08 leosimony

Basically, just reading your error strings, it looks like Debian Buster has moved the avformat library to a version that deprecates features that Comskip requires. I don't have time to work on a fix (and I'm not a maintainer anyway). I imagine this will get fixed eventually, as Buster becomes more mainstream.

In the meantime, if you are in a hurry, I do suggest using docker. Granted, docker is a bit of a learning curve, but once you get into it a bit you'll be hooked. Docker basically creates an application-centric isolation environment with only libc dependency. That means you can install/config/run software in the container on any platform that has libc, but "inside" the container it can be running a different (linux) operating system. In reality, there isn't an operating system "running" inside the container, but it has access to all the libraries of the other linux platform that the application needs, and so you can satisfy and stabilize dependencies that way. This allows us to implement the principle where applications are separated from their environment and their dependencies, allowing us to upgrade the OS "inside" or "outside" the container without breaking things.

Here's an intro to Docker: https://docs.docker.com/get-started/. for this instance you wouldn't need to go past parts 1 & 2, although 3 is useful. Beyond that is more enterprise stuff you won't need to know about yet. Here's a quick tutorial: https://www.tutorialspoint.com/docker/. This one you can go through the containers & shells part.

Here's a link to installing Docker on Buster - https://computingforgeeks.com/install-docker-and-docker-compose-on-debian-10-buster/

Once you get it installed, you can either build your own docker image or (I suggest) use one that someone else has created. Once you get started you will pretty quickly figure out how to customize things.

Here's a link to a docker container someone else built for comskip: https://hub.docker.com/r/hereshem/comskip. This one has reasonably good instructions to get you going. Word of warning though, this one doesn't really clean up after itself. I would enhance its instructions as follows:

  1. docker pull hereshem/comskip - this downloads the container environment.
  2. docker run -itd --name comskip -v /path-to-data/data:/usr/src/app/data --rm hereshem/comskip * -v specifies to map whatever you enter as "/path-to-data/data" to the path /usr/src/app/data inside the container. Think of this as a mount from outside to inside. * This command "runs" the container. In this case it is set up to do absolutely nothing but sit there until you do something with it.
  3. docker exec -it comskip bash (this maps your session into the container and runs a bash shell)
  4. bash> comskip videofile.mp4 (now you can run commands inside the container to skip commercials)
  5. after exiting the container, do: docker stop comskip. This will sotp the container and it will automatically delete itself and clean up.

Once you've gotten your head around what is going on, I suggest using something a bit more automated. Example is: https://hub.docker.com/r/mezz64/comskip. The instructions on this one are nonexistent but if you follow the github link you can read the start.sh script and the file watch python script. This one, once you run it, monitors files in a particular directory. For automation just drop your files into the directory and it will process them.

There really aren't any instructions for this but if you follow the link to the github you can look at the scripts; its pretty simple.

I've written my own pretty complex container for this designed to run as a sidecar with plex. My github repo is here: https://github.com/mjbrowns/plexpost

If you look in the Dockerfile, Makefile and the build directory you will see the way I set up the build (I could probably make it more clean but it works).

Mitch Brown 7725 Spieth Rd Medina, OH 44256http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=7725+Spieth+Rd&csz=Medina%2C+OH+44256&country=us 330-391-0447tel://330-391-0447/

[email protected]mailto:[email protected]


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 10:11 AM To: erikkaashoek/Comskip [email protected] Cc: Mitch Brown [email protected]; Comment [email protected] Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Thanks Mitch. I am new to Docker. Any details on this is appreciated.

On Mon, Aug 19, 2019, 7:39 PM Mitch Brown [email protected] wrote:

Actually it will. Docker runs on bare metal servers. Containerization is not the same as Virtualizaton. In this case it will allow you to work around code dependency issues.

If I have a bit of free time later today I can write up some details on it. That said, you will be well served getting some docker experience.

You could also use lxc/lxd, but IMO for this docker will be more user friendly.

Regards,

Mitch Brown [email protected] 330-391-0447


From: Leo Simon [email protected] Sent: Monday, August 19, 2019 10:05 AM To: erikkaashoek/Comskip Cc: Mitch Brown; Comment Subject: Re: [erikkaashoek/Comskip] comskip on Debian Buster (#108)

Mitch, I am not sure how that will work for us. We need this on a Physical box.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMXRMLITZJ2A3QNKA5TQFKSAXA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TBPTA#issuecomment-522590156>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AGHZPMVVHRKOI2XBUIDCSDTQFKSAXANCNFSM4INB4VZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=ALKF2HPJWAJCU5IGVQ265XDQFKSS5A5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TCASI#issuecomment-522592329, or mute the thread https://github.com/notifications/unsubscribe-auth/ALKF2HKEDRANH2ZZTE6XM7LQFKSS5ANCNFSM4INB4VZQ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/erikkaashoek/Comskip/issues/108?email_source=notifications&email_token=AGHZPMQGSWFXDMOBGWNRBBLQFKS2NA5CNFSM4INB4VZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TCGZA#issuecomment-522593124, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHZPMXSFN2DAQHFXYMQJXTQFKS2NANCNFSM4INB4VZQ.

mjbrowns avatar Aug 19 '19 15:08 mjbrowns

Mitch, thank you so much for these elaborate steps. I will go through and give this a try for sure.

Thanks again.

leosimony avatar Aug 19 '19 17:08 leosimony

I ran into this issue starting yesterday when updating my Docker image, I think more people are going to be hitting it.

Spent a few minutes looking at it and most of the code changes are very simple, but there are ~3 that are more complex and will require someone who is familiar with the code to fix.

For now I'm going to try force-downgrading libavcodec-dev and doing a static build.

Ranbato avatar Feb 08 '22 22:02 Ranbato