Giter Site home page Giter Site logo

chromecastize's People

Contributors

barnowldown avatar bartlaarhoven avatar defiyaco avatar frawa avatar lmillefiori avatar murzz avatar peteruithoven avatar petrkotek avatar pfrenssen avatar talisein avatar tveronesi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chromecastize's Issues

Error when mediainfo doesn't return number of audio channels

I have a few videos using the mp4 container that give an error when using the --stereo option:

Processing: /mnt/videos/testvideo.mp4
- general: MPEG-4 -> mkv
- input video profile: [email protected]
- video: AVC -> copy
/usr/local/bin/chromecastize.sh: line 179: [: -gt: unary operator expected
- audio: Ogg -> copy
- video length: 02:22:06.744

The file is not converted to stereo. It seems to happen because mediainfo cannot find the number of audio channels.

Default to Opus for the audio codec

We are still defaulting to Ogg Vorbis as the audio codec but this has been superseded by Opus years ago. Opus is fully supported in all chromecast devices.

Filenames with spaces

It appears that with the latest commit filenames with spaces are no longer processed.

An up-to-date version ?

Hi ... It's going to be a long time since chromecastize hasn't be updated ...

What version (or fork one ?) is the best (which contains all fixes) ?

Thanks in advance

Directories containing filesnames with whitespaces don't work

If a directory contains movies files which have whitespace in their names chromecastize fails to correctly process the files because the central loop for f in $(find ...) splits strings by whitespace (which is the default in bash). I workaround this problem with another script which does the find -type f .. and sets IFS=$'\n' which makes the for loop break list items by new line...

Audio bitrate lower

After the conversion the audio bitrate is lower than before. For example, with a movie I had first 640Kbps and than 276Kbps. It's not a big problem, but I'll search for a solution.

Is the avconv check necessary?

I'm running arch and since there's no avconv utility, I simply removed it from the check and everything seems to be working as it should. Is the check for avconv necessary for other distros? If not, I'd like to propose it be removed, I can issue a pull request...

help casting/converting a file

First of all I would like to thank you for your time and help to the community.

I think your script is really helpful, but I need help for a specific file I cannot stream via Chromecast from a Synology station.

First of all chromecastize says it should be playable:

./chromecastize.sh videofile.mkv
===========
Processing: videofile.mkv
- general: Matroska -> ok
- video: AVC -> copy
- audio: AAC -> copy
- file should be playable by Chromecast!

If I try to force it to mp4 I get this output

./chromecastize.sh --mp4 videofile.mkv
===========
Processing: videofile.mkv
- file was generated by `chromecastize`, skipping

If I try to force it to mkv I get this output

./chromecastize.sh --mkv videofile.mkv
===========
Processing: videofile.mkv
- file was generated by `chromecastize`, skipping

mediainfo:

mediainfo videofile.mkv
General
Unique ID                                : xxxxxxxxxxxxxxxxxxxxxxxxxx
Complete name                            : videofile.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 382 MiB
Duration                                 : 47 min 46 s
Overall bit rate                         : 1 118 kb/s
Encoded date                             : UTC 2015-10-07 10:29:45
Writing application                      : mkvmerge v8.4.0 ('A better way to fly') 32bit
Writing library                          : libebml v1.3.1 + libmatroska v1.4.2
FileExtension_Invalid                    : mkv mk3d mka mks

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 8 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 47 min 46 s
Bit rate                                 : 948 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.043
Stream size                              : 324 MiB (85%)
Writing library                          : x264 core 148 r2597 e86f3a1
Encoding settings                        : cabac=1 / ref=8 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=948 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : HE-AAC / LC
Codec ID                                 : A_AAC
Duration                                 : 47 min 46 s
Bit rate                                 : 168 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz / 24.0 kHz
Frame rate                               : 23.438 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 31 ms
Stream size                              : 57.4 MiB (15%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

Menu
00:00:00.000                             : en:00:00:00.000
00:00:46.797                             : en:00:00:46.797
00:19:04.393                             : en:00:19:04.393
00:27:08.794                             : en:00:27:08.794
00:34:34.906                             : en:00:34:34.906
00:41:11.219                             : en:00:41:11.219
00:46:48.472                             : en:00:46:48.472

Any suggestion?

Allow users to customize the default configuration

The current lineup of Chromecast devices have different capabilities. It would be great to allow people to customize the defaults for chromecastize to match their own device.

For example users with a Chromecast Ultra might want to always encode using h265, while users with a 3rd generation Chromecast might want to change the h264 level to 4.2.

We can check if there is a config.sh file in the users' config folder and source it if present. In order to inform users about the possible configuration options and suggest sane defaults for the different devices we can also ship an example file.

Error when passing new `--force-vencode` option

When I try to pass the new --force-vencode option that was added in #49 I am getting the following error:

Unrecognized option 'preset fast -profile:v high -level 4.1 -crf 17 -pix_fmt yuv420p'.
Error splitting the argument list: Option not found

This is caused by Bash automatically escaping the DEFAULT_VCODEC_OPTS variable with quotes because it contains spaces.

Keep the original file for torrent seeding

Hi! I didn't knew that chromecastize existed so I did it myself and used it for years; but luckily I found your implementation and that's what I'm using nowadays :)

I find important to keep the original file without changing its name to keep torrent-seeding it.

I was wondering if there's any configuration option for this or if you would be interested in this PR.

We could add a '-chromecast' suffix to the filename, before the extension.

Thanks for all your work :))

ffmpeg install not recognized

I installed ffmpeg on linux 14.04 server using this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

ffmpeg appears to be running fine.
When I enter command "which fmpeg" I receive response: /home/myusername/bin/ffmpeg
When I run chromecastize, I receive an error that ffmpeg is not installed as follows:
avconv (or ffmpeg) is not available, please install it

Forgive me, as I am noob. Don't know if this is the right way to report this, or ask for help. Perhaps my install of ffmpeg needs to be moved somewhere else?

Still level 5.2

Hello, after using this in one of my video files, it is suposed to be ready for chromecast but Plex still says that my server is not powerfull enough. It says that I should be level 4.2 and that I am level 5.1.

Process followed:

Processing: ../../Downloads/Series/The Sopranos/Season 3/The Sopranos - S03E01 - Mr. Ruggerio's Neighborhood HDTV-720p.mkv

  • general: Matroska -> ok
  • input video profile: [email protected]
  • video: AVC -> copy
  • audio: AC-3 -> libvorbis
  • video length: 00:47:11.800
    [matroska,webm @ 0xb3f4f0] Read error at pos. 1668452740 (0x63729184)3941.7kbits/s frame=70795 fps=1252 q=-1.0 Lsize= 1363994kB time=00:47:11.68 bitrate=3946.0kbits/s
    conversion succeeded; file '../../Downloads/Series/The Sopranos/Season 3/The Sopranos - S03E01 - Mr. Ruggerio's Neighborhood HDTV-720p.mkv' saved
    renaming original file as '../../Downloads/Series/The Sopranos/Season 3/The Sopranos - S03E01 - Mr. Ruggerio's Neighborhood HDTV-720p.mkv.bak'

When I chech with mediainfo my file after chromecastize it still says: Format profile : [email protected]

Do you guys have some idea? Thank you.

[Chromecast] [MDE] Augmented profile: { "directPlay": { "mp4": { "mimeType": "video/mp4; codecs="avc1.42E01E"", "video": { "codecs": { "h264": { "maxLevel": 42 } }, "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8, "maxFrameRate": 60 }, "audio": { "codecs": { "aac": { "maxSamplingRate": 48000, "maxChannels": 2 }, "mp3": {}, "ac3": {} } } }, "mkv": { "mimeType": "video/webm", "video": { "codecs": { "h264": { "maxLevel": 42 }, "vp8": {} }, "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8, "maxFrameRate": 60 }, "audio": { "codecs": { "aac": { "maxSamplingRate": 48000, "maxChannels": 2 }, "mp3": {}, "vorbis": {}, "ac3": {} } } }, "mpegts": { "protocol": "hls", "video": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8, "maxFrameRate": 60 }, "audio": { "codecs": { "ac3": {} } } } }, "directStream": { "video": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8, "maxFrameRate": 60, "codecs": { "h264": { "maxLevel": 42 } } }, "audio": { "codecs": { "aac": { "maxSamplingRate": 48000, "maxChannels": 2 }, "mp3": {}, "opus": {}, "vorbis": {} }, "maxChannels": 6 } } }

Conversion fails if `$HOME` folder is not accessible

I am running chromecastize on a headless system that does not have any home folders for the users on the system. If I try to convert a file, this fails when it tries to write to the processed_files which is hardcoded to the path ~/.chromecastize/processed_files.

$ chromecastize my-video.mkv 
mkdir: cannot create directory ‘/home/pieter’: Permission denied
touch: cannot touch '/home/pieter/.chromecastize/processed_files': No such file or directory
===========
Processing: my-video.mkv
grep: /home/pieter/.chromecastize/processed_files: No such file or directory
- general: Matroska -> ok
- video: AVC -> copy
- audio: AC-3 -> libvorbis
- video length: 00:51:21.568
frame=73883 fps=112 q=-1.0 Lsize= 1971531kB time=00:51:21.56 bitrate=5241.1kbits/s speed=4.69x    

- conversion succeeded; file 'my-video.mkv' saved
- renaming original file as 'my-video.mkv.bak'
/usr/local/bin/chromecastize: line 93: /home/pieter/.chromecastize/processed_files: No such file or directory

- failed to convert 'my-video.mkv' (or conversion has been interrupted)
- deleting partially converted file...

I think to solve this we should do two things:

  1. Provide an option to override the location of the config folder.
  2. Check if the processed_files file is writable before starting the conversion, and abort the process if it is not. This will alert the user right away of the problem, and not after waiting for the conversion to complete.

Multi thread options

I'm not sure if your app is using multithread. Avconv/ffmpeg have -threads auto option or even specifying the amount of threads to use -threads 2. You can add these options to the app in order to get shorter codification times.

*.ok Invalid argument

This is the error:

Processing: Movies/About Time.mkv

  • general: Matroska -> ok
  • video: AVC -> copy
  • audio: AC-3 -> libvorbis
  • video length: 02:03:22.144
    [NULL @ 0x7f0a4e64a7e0] Unable to find a suitable output format for 'Movies/About Time.mkv.ok'
    Movies/About Time.mkv.ok: Invalid argument
  • failed to convert 'Movies/About Time.mkv' (or conversion has been interrupted)
  • deleting partially converted file...

Support deletion of `.bak`files

Currently original file gets renamed to .bak. Would be nice to support removal of original files, e.g. by renaming them to unique extension such as .ccbak and then removing by find command

Processing stops when mediainfo returns an error for a file

I am trying to process a large number of files on my NAS. It appears that some files cannot be parsed successfully by mediainfo and return an error code. When this happens I get the following message, and the process aborts:

'' is an unknown codec. Please add it to the list in a CONFIG section.

We could check the exit status of mediainfo and skip the file if it returns an error. In order to better inform the user which files were skipped we could maintain a log file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.