color_transfer | Performs color transfer | Computer Vision library
kandi X-RAY | color_transfer Summary
kandi X-RAY | color_transfer Summary
Super fast color transfer between images.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Transfers two images
- Apply min and max scaling
- Scale an array
- Compute the mean and standard deviation of an image
- Display an image
color_transfer Key Features
color_transfer Examples and Code Snippets
Community Discussions
Trending Discussions on color_transfer
QUESTION
I have downloaded a [short media][1] i intend to convert then i will use the result as basis to practice and test any and all FFMPEG commands i learn or use later.
That video seems to have an unknown invalid stream which never disappears no matter everything i tried to discard it. When i try to work with it later i get various problems like missing codec or no stream which is not the focus here but the reason why i got stubborn to remove the things i cannot deal with.
The following probing prints a warning in yellow color on last row.
...ANSWER
Answered 2020-Dec-05 at 05:09The data stream is a timecode stream. When ffmpeg reads a MOV/MP4 file with such a stream, it stores the timecode as metadata. If the output muxer is MOV/MP4, it will read that metadata and store that timecode as a data track. Add -write_tmcd false
to disable this behaviour.
QUESTION
I'm unable to create single channel audio file with ffmpeg from an mp4 file, with the following python code
...ANSWER
Answered 2020-Oct-21 at 18:17Your MP4 file has no audio, so ffmpeg
can't extract any audio from it.
QUESTION
I need to extract the codec_name
of the second video stream (artwork) of a video file.
So I do this :
...ANSWER
Answered 2020-Apr-28 at 09:14You don't need jq for this particular case.
QUESTION
I have an MXF file with 16 audio mono streams and I need to recode it in a mp4 file with 2<=n<=16 channels merging input streams, e.g. input channels 1 and 2 on output channel 1 and 9 and 10 on output channel 2. This job will be done with ffmpeg. I read the documentation and found the amerge and amix filters that would be nice, but they output one channel only. Is there any solution for this problem?
Thanks, Laura
Find below the output of ffprobe on mxf file:
...{ "streams":[ { "index":0, "codec_name":"mpeg2video", "codec_long_name":"MPEG-2 video", "profile":"4:2:2", "codec_type":"video", "codec_time_base":"1/25", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "width":1920, "height":1080, "coded_width":0, "coded_height":0, "has_b_frames":1, "sample_aspect_ratio":"1:1", "display_aspect_ratio":"16:9", "pix_fmt":"yuv422p", "level":2, "color_range":"tv", "color_space":"bt709", "color_transfer":"bt709", "color_primaries":"bt709", "chroma_location":"topleft", "field_order":"tt", "refs":1, "r_frame_rate":"25/1", "avg_frame_rate":"25/1", "time_base":"1/25", "start_pts":0, "start_time":"0.000000", "duration_ts":448, "duration":"17.920000", "bit_rate":"50000000", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":1, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":2, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":3, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":4, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":5, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":6, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":7, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } }, { "index":8, "codec_name":"pcm_s24le", "codec_long_name":"PCM signed 24-bit little-endian", "codec_type":"audio", "codec_time_base":"1/48000", "codec_tag_string":"[0][0][0][0]", "codec_tag":"0x0000", "sample_fmt":"s32", "sample_rate":"48000", "channels":1, "bits_per_sample":24, "r_frame_rate":"0/0", "avg_frame_rate":"0/0", "time_base":"1/48000", "start_pts":0, "start_time":"0.000000", "duration_ts":860160, "duration":"17.920000", "bit_rate":"1152000", "bits_per_raw_sample":"24", "disposition":{ "default":0, "dub":0, "original":0, "comment":0, "lyrics":0, "karaoke":0, "forced":0, "hearing_impaired":0, "visual_impaired":0, "clean_effects":0, "attached_pic":0, "timed_thumbnails":0 }, "tags":{ "file_package_umid":"0x060A2B340101010501010D2313000000968F75C6B5B34D649967EEDD0076B989" } } ], "format":{ "filename":"/media-caches/video-essence/VIDEO/MXF-XDCAM_HD422@50Mbps1080i25_16Ch/941.mxf", "nb_streams":9, "nb_programs":0, "format_name":"mxf", "format_long_name":"MXF (Material eXchange Format)", "start_time":"0.000000", "duration":"17.920000", "size":"135028296", "bit_rate":"60280489", "probe_score":100, "tags":{ "uid":"0a9ef41a-36b4-4066-a8a3-b95f62299b6c", "generation_uid":"e134647e-fea1-4673-91c1-afa277d13c00", "company_name":"Sony", "product_name":"MPC", "product_version":"v1.0", "application_platform":"Sony MXF Development Kit (Win32)", "product_uid":"060e2b34-0401-0103-0e06-0120027f0200", "modification_date":"2012-09-17T11:56:20.000000Z", "material_package_umid":"0x060A2B340101010501010D231300000081C32F48A63347D4890F55D3ADC25B99", "timecode":"00:35:30:08" } } }
ANSWER
Answered 2020-Feb-14 at 18:31The code is organised with line breaks. A \
breaks a line in a Unix shell.
QUESTION
As part of a larger script, I need to be able to read the timecode off of a DPX file. I have ffmpeg and ffprobe, but I'm a beginner when it comes to using those programs.
For MOV files, I was able to cobble this together:
...
ANSWER
Answered 2020-Jan-20 at 19:01If you are still looking for this.. use ImageMagick (imagemagick.org)
The DPX header is standard SMPTE, you can fetch it with:
magick identify -format "%[dpx:television.time.code]" 76890.dpx
In this case it returned the value: 01:00:21:16
QUESTION
I'm writing a script that needs to either convert or re-container an MP4 as an MOV with timecode.
I have an MP4 generated from Adobe Premiere. If I bring that file back into Premiere, I have timecode. I can see it so I know it is there.
I can't seem to extract the timecode track from the MP4. I've looked everywhere online and found some discussions around it, but no actual success in extracting the timecode.
I've been using ffprobe to see if there's any mention of the timecode in the MP4, but having no luck. I've tried PyMediaInfo with no success.
Here's what ffprobe shows:
...ANSWER
Answered 2019-Nov-03 at 08:48The timecode is stored in an Adobe specific format (XMP) which ffmpeg does not normally parse and even when it does, it just treats it as a raw blob.
You can use a similar command to the one below to extract the TC and then remux the file using ffmpeg by passing -timecode EXTRACTED_VALUE
QUESTION
I am trying to compress a video with ffmpeg.
My operating system: Ubuntu 16.04
My ffmpeg version (retrieved through ffmpeg -version
):
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
FYI, The information about the video can be retrieved with:
ffprobe -show_streams -i "video.mp4"
and I get:
...ANSWER
Answered 2019-Sep-01 at 13:33The problem was that I had the error:
The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
which was not really displayed as an error. This made me understand (also thanks to some comments) that my version of ffmpeg was really old. Before updating it I was able to compress the video by doing by adding the option -strict -2
to my commands
However, I strongly suggest updating FFmpeg to the latest version (I followed this link)
I hope this post will help someone in the same trouble.
QUESTION
Why do I see this error message:
[Parsed_scale_0 @ 0x559a264c28a0] Invalid size 'if(gt(iw'
[AVFilterGraph @ 0x559a268a19e0] Error initializing filter 'scale'
with args 'if(gt(iw' Error initializing complex filters.
Invalid argument
when trying to crop a video using ffmpeg and the following complex filter:
...ANSWER
Answered 2019-Apr-10 at 16:56Wrap the whole filtergraph in double quotes:
QUESTION
We have videos that we transcode to h.264, but COPY the original audio track (they all vary). We are now trying to prepend a 10 second disclaimer before the original video begins. Apparently the audio tracks of the two videos must be the same, so I'm trying to add a silent audio track to the generated video based on the audio track of the video it will be concatenated with.
From other questions, I've learned to add -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100
, but this results in garbled audio when the concatenation occurs. So using ffprobe, I would like to get whatever audio properties are needed and use them in the prepending video.
So the question is: How can I specify the specific audio track settings I want/need when creating the 10 second video?
FFMpeg to create 10 second disclaimer
ffmpeg.exe -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -loop 1 -i disclaimer.png -filter:v "fade=out:st=8:d=2" -c:v libx264 -t 10 -pix_fmt yuv420p -r 29.97 disclaimer.mp4
FFProbe
...ANSWER
Answered 2019-Mar-25 at 18:37Concatenation has two requirements:
- All inputs must have the same number and type of streams.
- All streams must have the same parameters.
disclaimer.mp4
has no audio. OriginalVideo.mp4
has HE-AACv2 audio.
So you will need to create a silent audio stream for disclaimer.mp4
and encode it as HE-AACv2. However, this may be problematic because the only HE-AACv2 audio encoder supported by FFmpeg is libfdk_aac which your ffmpeg
build does not support. Alternatively you can look into using a different, standalone encoder.
Or create the silent audio as LC-AAC (the command AAC variant) and re-encode the OriginalVideo.mp4
as LC-AAC.
QUESTION
I used a program called MetaZ on my mac to tag all my video files (m4v). I am now trying to use these m4v files in Kodi which requires .nfo files and separate picture files for movie posters, etc. I want to extract the picture that is already in the m4v file.
When I use ffprobe -show_streams, I can see that index4 is a png file (codec_name=png). How do I extract it? I believe ffmpeg can do it, but can't figure out how.
Here is the output from ffprobe:
...ANSWER
Answered 2017-Oct-31 at 05:24Use
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install color_transfer
You can use color_transfer like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page