Jump to content

Search the Community

Showing results for tags 'comskip'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android Mobile
    • Android TV / Fire TV
    • Emby Theater
    • iOS
    • Apple TV
    • Kodi
    • Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • LG Smart TV
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Other
    • Non-Emby General Discussion
    • Developer API
    • Hardware
    • Media Clubs
    • Legacy Support


  • Emby Blog

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 6 results

  1. ShotToTheDome

    Emby post-processing dvr script for linux

    I thought I'd post my emby post-processing dvr script. Tested and working on Debian Linux 8.9 Files processed end up being named *originalvideoname*.ts.mkv so i can search by that and make sure recordings have no issues. After I look at them, I manually rename to just .mkv. I do not have automatically convert recordings checked or the two preserve boxes checked under live tv --> settings. Script flow: see if lockfile exists. if so wait 60 sec create lockfile commerical scan and commerical cutting ccextractor to pull out closed captions and convert to srt file Encode to h264 using ffmpeg and combine in srt file from previous step Trim off first 60 sec from recording (due to iptv delay you get a minute from previous show. I have recordings set to last 1 min longer in emby record. The shows using my OTA tuners start early by 1 min to compensate) Remove srt/extra files Overwrite original ts recording delete lockfile Depends on: comskip, comcut (comchap optional), ccextractor, ffmpeg I eventually want to fool around with a nvidia gtx 1050 and see how nevnc with hevc/h265 works on the ffmpeg encoding line. Software h265 encoding on very fast saves an additional 30-40% space on same setting as h264 on medium but my encoding framerate goes from 420fps (14x) to 69fps (2.3x) on dual Xeon e5-2670s. The picture looks pretty much identical when i look at them side by side post.sh emby script #!/bin/csh set path = ($path /usr/local/bin) set lockFile = '/tmp/dvrProcessing.lock' set origFile = "$1" set tmpFile = "$1.tmp" set tmpEncode = "$1.mkv" set tmpEncode2 = "$1.2.mkv" set tmpSrt = "$1.srt" set dvrPostLog = '/path/to/embydvr/dvrProcessing.log' set dvrLockLog = '/path/to/embydvr/dvrLock.log' #Wait if post processing is already running while ( -f $lockFile ) echo "'$lockFile' exists, sleeping processing of '$origFile'" | tee $dvrLockLog sleep 60 end #Create lock file to prevent other post-processing from running simultaneously echo "Creating lock file for processing '$origFile'" | tee -a $dvrPostLog touch $lockFile #Mark and cut commercials echo "cut from '$origFile'" | tee -a $dvrPostLog /path/to/embydvr/comchap/comcut --lockfile=/tmp/comchap.lock --comskip-ini=/path/to/embydvr/comskip.ini "$origFile" #Pull CC from file to SRT file echo "Pulling Closed captions from '$origFile' to SRT file" | tee -a $dvrPostLog ccextractor "$origFile" -o "$tmpSrt" #Encode file to H.264 with mkv container using ffmpeg and mux in CC srt echo "Re-encoding '$origFile' to MKV file while adding cc data" | tee -a $dvrPostLog /usr/bin/ffmpeg -i "$origFile" -i "$tmpSrt" -map 0 -map 1 -acodec copy -scodec copy -c:v libx264 -preset medium -crf 23 -profile:v high -level 4.1 -deinterlace "$tmpEncode" #Trim off first minute echo "Remove first 60 sec of file" | tee -a $dvrPostLog /usr/bin/ffmpeg -ss 00:01:00 -i "$tmpEncode" -vcodec copy -acodec copy -scodec copy "$tmpEncode2" #Remove SRT file echo "Remove SRT file" | tee -a $dvrPostLog rm -f "$tmpSrt" #Remove tmpEncode file echo "Remove tmpEncode file" | tee -a $dvrPostLog rm -f "$tmpEncode" #Rename transcoded file to temp file in case no subtitles echo "Rename 2nd transcoded file to tmp file" | tee -a $dvrPostLog mv -f "$tmpEncode2" "$tmpFile" #Overwrite original ts file with the transcoded file echo "Removing '$origFile'" | tee -a $dvrPostLog mv -f "$tmpFile" "$origFile" #Rename .ts file to .ts.mkv echo "Renaming '$origFile' to .mkv" | tee -a $dvrPostLog mv -f "$origFile" "$1.mkv" #Remove lock file echo "Done processing '$origFile' removing lock" | tee -a $dvrPostLog rm $lockFile exit 0
  2. Hi, I just switch from PLEX to emby about 2 months ago. One thing I like the plex recording feature is it's able to delete or mark to skip commercial after dvr recording. I can't find the feature in emby. And then recently I noticed comskip package which might able to do so. https://github.com/SynoCommunity/spksrc/wiki/Comskip However I'm a noob and there is no step by step tutorial about setting it up. Is there anyone kind enough to teach me set up? For now I received error message trying to set on my own.
  3. unhooked


    Ok so I slapped together something after taking notes here and adding to my existing cruft to remove commercials and attempt to make tv more roku friendly. The problem is, trying to just re-container .ts leaves me with horrible audio desync. Everything else works as expected, just ffmpeg -c copy is ugly. http://unhooked.net/tv/afterplex handbrake transcodes just fine, but I was hoping for fast which this isn't. suggestions to make ffmpeg play nice, or alternatives welcome. 12-Stable, comcut github, everythign else pkg.
  4. Is there a way that Emby can run a script after each TV recording is done? Here's what I'm trying to do, running Emby in a Freebsd jail I would like to pass the file name and location of each completed recording to a script. The script would then run comskip to remove the commercials, I'm not running windows so MCEbuddy is out.
  5. Hi there, it would be nice to change the Upcoming Shows Tab to use the EPG from the LiveTV Feature of Emby (should work with LiveTV Plugins, too). This would elimnate the problem for users outside of the USA to see whats shows if their library are upcoming in local TV. Furthermore you can Record the episode(s) directly from this page. If this is implemented a further nice feature could be, emby to search in LiveTV EPG for missings or new episodes which are not in the library and add automaticly a schedule timer to record. For example I have got all episodes of The Big Bang Theory, and the new season will be aired in my local TV, I set this series to "Auto Record" and when new episodes are aired emby will record it, comskip, convert it and autosort it into my library. Greets
  6. Chubby Arse

    Comskip + Applying EDL Experts?

    Hi all, I've been playing with Comskip on my Media Portal recordings. My recordings are in .ts files. The recording in particular that I'm trying to gives the following data in MediaInfo: General ID : 4 (0x4) Complete name : C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.ts Format : MPEG-TS File size : 3.97 GiB Duration : 2h 8mn Overall bit rate mode : Variable Overall bit rate : 4 403 Kbps Video ID : 48 (0x30) Menu ID : 137 (0x89) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : 27 Duration : 2h 8mn Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Standard : Component Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 64 (0x40) Menu ID : 137 (0x89) Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Muxing mode : LATM Codec ID : 17 Duration : 2h 8mn Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Delay relative to video : -475ms Language : English descriptor_tag_extension : 6 Text ID : 80 (0x50) Menu ID : 137 (0x89) Format : DVB Subtitle Codec ID : 6 Duration : 2h 8mn Delay relative to video : 3s 934ms Language : English I've successfully generated edl files one of my recordings - here's the content I am trying to apply. Here's the log file from generating the edl: St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.log 5.00 257.80 0 1295.40 1560.36 0 2749.56 3014.24 0 4202.24 4467.20 0 5762.88 6082.48 0 7306.20 7731.40 0 I've tried to use Mencoder to apply the edl using the following command line: "C:\Media Utilities\Mencoder\mencoder.exe" -oac copy -ovc copy "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.ts" -edl "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.edl" -o "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27_Edited.ts" Which gave me the following result: Audio format 0x4c34504d is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it. I've attached the complete log file: Attempt1.txt So I tried the following with -oac pcm: "C:\Media Utilities\Mencoder\mencoder.exe" -oac pcm -ovc copy "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.ts" -edl "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.edl" -o "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27_Edited.ts" And got "Too many audio packets in the buffer: (4096 in 3495096 bytes). I've attached the complete log file: Attempt2.txt Lastly, I tried this: "C:\Media Utilities\Mencoder\mencoder.exe" -oac copy -fafmttag 0x706d -ovc copy "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.ts" -edl "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27.edl" -o "C:\Temp\ComskipTests\St Trinian's 2_ The Legend of... - Channel 4 HD - 2015-09-27_Edited.ts" and got the "Too many audio packets in the buffer: (4096 in 3414814 bytes)." I've attached the complete log file: Attempt3.txt Can anyone help get get this applied. I tried to find out if ffmpeg could process edl files and produce a direct stream copy of the edited source - but it looks like that can only do one cut at a time into a new file and then join the edits (files) together. I've also read that mencoder is only really suitable for avi file processing - but anything other approach is not well documented and quite thin on the ground. Once I understand what is going on, I plan to do a POC where emby could possibly support this out-of-the-box, but that seems a long way away! Thanks - any help or insight is appreciated.
  • Create New...