mrw wrote: > I've put together a short script that might assist with launching > ffmpeg/avconv. It draws from earlier scripts posted on the main iPlayer > thread over the last few days. > > . . . > And if any perl/linux guru can tell me why the 'pipe catcher' works, I'm > all ears !
Hello mrw. I'm suprised that this works. The perl process which is interpreting the script will be replaced by whichever of the ffmpeg/avconv programs it finds, so can't 'catch' the SIGPIPE, and then how does it kill off the process? Are you sure it's not simply running an ffmpeg process that is able to clean itself up? Your original 'bourne shell script in 2380 ' (http://forums.slimdevices.com/showthread.php?53229-Announce-BBCiPlayer-Plugin-(UK-only)&p=807086&viewfull=1#post807086) did run ffmpeg as a subprocess and had a trap signal handler to kill off the ffmpeg. The script in ' BBCiPlayer post 2459' (http://forums.slimdevices.com/showthread.php?53229-Announce-BBCiPlayer-Plugin-(UK-only)&p=807217&viewfull=1#post807217) runs a the media program as a separate child process, and as both it and the perl script/process share the same pipe file descriptor it's possible to catch the signal in the script and then kill-off the child process. Attached is an updated version that will attempt to run either ffmpeg or avconv, whichever it can find. Cheers. +-------------------------------------------------------------------+ |Filename: playhls.pl | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=17411| +-------------------------------------------------------------------+ ------------------------------------------------------------------------ Parky's Profile: http://forums.slimdevices.com/member.php?userid=30307 View this thread: http://forums.slimdevices.com/showthread.php?t=103158 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
