I'm using framemd5 to check lossless transcoding to FFV1.mkv and am getting mismatches between my source and FFV1 files.
If I generate the framemd5 files in Windows, I get presentation timestamp mismatches on the audio between the source file and FFV1. The MD5s themselves match.
If I generate the framemd5 files for the FFV1 in Linux (WSL), everything matches just fine.
Is there something I am doing wrong, or is this just a quirk of the ffmpeg/FFV1/Windows combination?
I am using ffmpeg version 2022-07-14-git-882aac99d2-full_build-www.gyan.dev in Windows and
ffmpeg version 4.4.2-0ubuntu1~20.04.sav2 in WSL.
Many thanks!
Jim
Related
When ffmpeg is given a command to output a file with a particular extension it presumably runs an internal algorithm do determine what encoder and/or muxer to use with it. Is there a command to find out whether a particular output extension is supported or not? Like in imagemagick with a command magick identify -list format?
ffmpeg -h muxer=mp4 does not work with image formats like jpg and png even though ffmpeg is capable of outputting images of these formats.
ffmpeg -formats does not seem reliable enough as well as instead of jpg it has singlejpg and does not include png (only apng and png_pipe).
I tryed to download a video+audio from YouTube by using youtube-dl:
youtube-dl https://www.youtube.com/watch?v=7wfUUZvybPY
I got a video file (.webm) without audio. I'm looking for a way to download video+audio in a single file by using the command line (cmd) in Windows 10. Do you have any suggestion?
youtube-dl.exe --format mp4 https://www.youtube.com/watch?v=7wfUUZvybPY
However, youtube-dl relies on ffmpeg for many format conversions. Install ffmpeg for Windows and look at youtube-dl docs here
I found a solution; the following command merges the audio and video files in a file.mkv:
youtube-dl.exe --sub-lang en --write-sub https://www.youtube.com/watch?v=7wfUUZvybPY
I have an mp4 which I want to convert from color to black and white using the terminal.
How?
EDIT: My question is NOT a duplicate because I want to do this with an mp4 (video, not image).
If you install ffmpeg (cross-platform video converter), you can do it with a one line command by filtering the saturation to 0.
ffmpeg -i <inputfile> -vf hue=s=0 -acodec copy <outputfile>
Maybe overkill but GStreamer could probably achieve that. It's mainly for streaming media but you can use it to manipulate local files also.
https://gstreamer.freedesktop.org/
It can either be executed as a command taking your mp4 as argument along with a long series of other arguments directly from the terminal or the framework can be imported in a project. Takes some time to get the hang of it tho and it's probably an easier way.
I found this screenshot which shows that you can add a cover image to an mkv file in a way that it is displayed as the icon of the file in the Windows explorer using Shark007+icaros.
But these tools are messing with the system in a really bad way. A lot of people are having problems with it and I too very much regret that I've installed it. I'm really glad I got my Windows to boot again...
Anyway, how could I programmatically add a cover image to an mkv file?
And would I need to change something in the registry to make Windows display them?
I'm not neccessarely looking for code, I'm more looking for something like the format the cover needs to have and the byte at which I have to inject/insert/attach the image file and maybe a registry entry that would cause the tagged images to be displayed etc.
You can use the FFmpeg multimedia framework to attach an image as MKV metadata. More Windows builds can be found at Zeranoe.
Example CLI usage:
ffmpeg -i input.mkv -c copy -attach image.jpg -metadata:s:t \
mimetype=image/jpeg output.mkv
-c copy copy all streams in the source file without re-encoding
-attach image.jpg attach a JPEG image
-metadata:s:t mimetype=image/jpeg set the attachement MIME type
On *nix the same can be accomplished with MKVToolNix.
Ubuntu demo:
Programmatic approach:
use the ffmpeg C libraries to attach or replace the cover art
write a custom Shell Extension to read the MKV format and display the image attachement as thumbnail.
I would like to decode HEVC encoded files to YUV files.
Is there any simple way to do this yet? An executable would be nice but I would make do with source code that is easily compilable.
It's as simple as (guide assumed linux, tweek it to your needs)
Clone the official reference codec (the official-official is a svn-repo found at https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/trunk/ but a read-only git-repo that is kept in sync with the svn is provided by BBC which is so much easier to work with IMHO)
git clone git://hevc.kw.bbc.co.uk/git/jctvc-hm.git
To create the executables:
cd jctvc-hm/build/linux && make -f makefile
Binaries are now placed in
jctvc-hm/bin
Now, to decode a HEVC-encoded binary file into YCbCr, do
./TAppDecoderStatic -b encoded_file.bin -o reconstructed.yuv
If you are not on a linux system, just goto the build folder and you will hopefully find something you can use for your system:
$ cd jctvc-hm/build && ls
HM_vc10.sln HM_vc8.sln HM_vc9.sln linux/ vc10/ vc8/ vc9/
Follow the instructions on https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/branches/HM-9.2-dev/doc/software-manual.pdf, the source code can be downloaded from https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/trunk/ by using any subversion software.
You can build it on both Windows and Linux based OS. After you built the software, you may run the exe files as it is instructed on the software manual.
Alternatively, you can use libde265 as a much faster decoder.
Get the latest version from its github release page.
Configure with ./configure --disable-sherlock265
Compile: make
Generate the YUV file with
./dec265/dec265 hevc-file.bin -o output.yuv -t4
The option -t4 is for multi-threaded decoding. You can also do more things like input NAL-unit streams, dump the headers, directly display the video, or check the SEI hashes.
You can download the ffmpeg windows build exe file
simply decoding HEVC bitstream.
ffmpeg.exe -i xxx.bin out.yuv