{"id":27813948,"url":"https://github.com/stsquad/ps3enc","last_synced_at":"2025-05-01T12:07:20.457Z","repository":{"id":730426,"uuid":"379471","full_name":"stsquad/ps3enc","owner":"stsquad","description":"A bunch of scripts for handling media in a PS3/PS4 compatible way.","archived":false,"fork":false,"pushed_at":"2017-03-01T20:01:06.000Z","size":137,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-01T12:07:14.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.bennee.com/~alex/blog/2009/11/20/ripping-ps3-compatible-mp4s/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stsquad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-11-20T12:16:08.000Z","updated_at":"2023-06-04T06:28:50.000Z","dependencies_parsed_at":"2022-07-18T12:31:44.006Z","dependency_job_id":null,"html_url":"https://github.com/stsquad/ps3enc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fps3enc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fps3enc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fps3enc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fps3enc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stsquad","download_url":"https://codeload.github.com/stsquad/ps3enc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251871583,"owners_count":21657473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-01T12:07:19.796Z","updated_at":"2025-05-01T12:07:20.448Z","avatar_url":"https://github.com/stsquad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Alex's Random Media Handling Scripts\n====================================\n\nThe following scripts are used for ripping and encoding media files\ninto a format suitable for playing on a PS3/PS4 (h.264 encoded MP4's).\n\nAll the heavy encoding work is done with ffmpeg or mencoder.\n\nWhy?\n====\n\nEvery other solution I've tried sucks?\n\nThere are loads of ripping front-ends out there however they don't\nhappen to suit me. These scripts concentrate on being command line\nbased, tuned for the Playstation (may main media hub) and useful for\nripping box sets by using heuristics to identify the episodes on a\ndisk.\n\nIt's also an exercise in coding more python for me. Having said that\nit is all open source so I'll happily accept patches and you are\nperfectly free to fork it for your own needs.\n\nApproach and prerequisites\n==========================\n\nThe script is optimised for my setup. As the files are quite big and a\nlot of the stuff in multi-pass is thrown away most of the heavy file\nI/O is in /tmp which on my 16GB machine is huge tmpfs partition. This\nmeans the encoding is rarely I/O bound which makes running multiple\nencodes less of a load on my machine (which is a 2 core + 2 thread i5\nsystem).\n\nThese scripts require the following:\n\n* ffmpeg\n* mencoder (fallback, used for subtitle rips)\n* lsdvd\n* MP4Box\n\nUsage\n=====\n\nThere are currently three scripts\n\nrip.py\n------\n\nThe rip script is used to rip a DVD into 1-n separate VOB files. It\nattempts to calculate this by looking for the modal episode length\nafter having rounded to the nearest 6 minutes. If you explicitly\nset the max times from the command line it will rip anything else\nwithin 80% of the size.\n\nThe aim of this is to make ripping fairly seamless when presented with\na TV box set.\n\nEpisodes will be numbered from 1 unless the -b flag specifies a\nnew base.\n\nThe script requires the \"lsdvd\" utility to be installed to get the\nchapter information from the DVD.\n\nUnless -l/-r is specified the script will automatically kick of\nps3enc.py to start encoding the VOB file. Otherwise the script will\ncreate a log of files ripped that can be passed to an encoding process\nas ripping 4 episodes in one go on a single or duel core machine isn't\nactually that efficient.\n\nSee --help for all the command line options.\n\nps3enc.py\n---------\n\nThis script encodes video files into PS3 compliant MP4 files. By\ndefault it does a 3 pass encode with a video bitrate of 2MBs.\n\nIt has a couple of presets:\n\n  -c/--cartoon\n\n  Single pass, lower bitrate, enables a filter that seems to improve\n  encoding\n\n  --film\n\n  Higher video bitrate also increases the audio bitrate as films often\n  have quite a dense soundtrack which benefits from it.\n\nmkv2mp4.py\n----------\n\nThis was originally written by L.J.J Lee, also under GPLv3\n(https://github.com/vgasu/mkv2mp4). I've made a few tweaks to it since.\n\nmkv2mp4 is a commandline utility, written in Python, which allows conversion\nof video files in the Matroska container (*.mkv file extension) containing\nH.264 video to be converted into a format which the PS3/PS4 and Xbox 360 can play.\n  \nIt differs from other similar tools in that no video transcoding is\nperformed; the video is passed through untouched and the just the audio is\ntranscoded if necessary.  This means that the conversion is much faster\n(the whole process being quicker than realtime on reasonably modern\nmachines), and more importantly that there is no degradation in video quality\n(which makes it very suitable for HD video).\n  \nDue to the fact no video transcoding is performed, this tool is somewhat\nrestrictive in the input formats it supports.  Supported formats are the\nthe following - the intention being that this should work on (at least) files\nconforming to the x264 HD scene rules - FLAC multichannel audio is the only\nexception currently.\n  - Container: Matroska.\n  - Video codec: H.264\n  - Audio codec: the app supports all audio codecs, however:\n    - ffmpeg's multichannel support currently isn't great, and therefore only\n      a subset of codecs with more than two channels will work.  5.1 AC3 and\n      5.1 DTS are known to work, 5.1 FLAC is known not to, others are untested.\n    - All stereo codecs which ffmpeg can decode should work.\n\nTechnical details:\n\n  This application makes the following alterations to the file:\n  - Extract tracks from mkv input (uses mkvinfo \u0026 mkvextract)\n  - Edit H.264 video stream to have level 4.1 or less (this is just a change\n    to the file header - no transcoding).  This is because the Xbox 360 doesn't\n    play files with a higher level.\n  - Transcode audio to stereo AAC (unfortunately the Xbox 360 doesn't support\n    any 5.1 audio codecs in mp4) (using ffmpeg for decoding and encoding (with\n    native aac support), or ffmpeg for decoding and neroAacEnc for encoding.\n  - Drop any tracks other than the first video and audio tracks (the Xbox 360\n    doesn't support multiple video or audio tracks, and doesn't support\n    subtitles in mp4).\n  - Remux into an mp4 container.  Files are split such that they are smaller\n    than 4GB (again... a restriction for the Xbox 360).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsquad%2Fps3enc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstsquad%2Fps3enc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsquad%2Fps3enc/lists"}