I can't claim to be an advanced user of the CLI, but take a look at Shutter Encoder. It's a GUI for FFMPEG and there are some presets available on the site as well.
It does include both an option to split and merge files as well.
Not excactly bat files since you've got to install software but hope it helps.
It occurs to me you may want to combine videos together one after the other (which is sometimes called concatenating them) and resize at the same time. In that case what you'd do is chain together the "concat" filter from the example on the site you linked, and a resize filter either before or after that. For example:
ffmpeg -i "C:\Users\Downloads\First Attempt.mp4" -i "C:\Users\Downloads\Great Success.mp4" -filter_complex "[0:v][1:v]concat=n=2:v=1:a=1, scale=1440:1080:flags=neighbor[out]" -map "[out]" "C:\Users\Downloads\First Attempt then Great Success - Concatted and Resized.mp4"
Though if you're looking to add one video to another, you might want to consider something where you can see what you're doing, like the free version of DaVinci Resolve
For future reference, we have distro specific install pages, so you could point a mint user directly to https://snapcraft.io/install/ffmpeg/mint which has the instructions you mention.
I don't know much about color profiles, but you might have more success with a tool better suited to the task e.g. imagemagick
,
perhaps this thread can help.
edit: oh hmm wait, i missed that you use windows. That indeed needs a batch file if you don't have some unix environment installed like msys or cygwin. It's been a very long time since i used a batch file but i think something like this should work for that:
set palette="c:\tmp\palette.png" set filters="fps=15,scale=320:-1:flags=lanczos"
ffmpeg -v warning -i %1 -vf "%filters%" -y %palette% ffmpeg -v warning -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %2
I originally thought you did it on linux: It looks like you got it right but you might not have enable execute permissions on gifenc.sh. Try
/bin/sh gifenc.sh video.mkv anim.gif
or
chmod +x gifenc.sh
and redo the ./gifenc you already did. I suppose now you get an error telling 'permission denied'?
Otoh, i usually use imagemagick which has a real good guide on the steps needed and can create a really good gif when you follow through (it takes a bit of reading though). http://www.imagemagick.org/Usage/video/
The part 'Higher Quality Ordered Dithered Video' shows you how to tweak the color usage to best use but all the previous stuff is worth reading either way you pick, ffmpeg or imagemagick.
In my experience ffmpeg doesn't have much capacity to make broken videos like that, in fact it's just the opposite that you can re-multiplex a video using ffmpeg -copy commands to fix a video that's missing some metadata information like that one is.
The tools you're looking for would probably be something designed to directly modify the headers. In mpv/mov this would be called the MOOV atoms, and actually you can fairly easily muck with them in a hex editor, just look for the part that's almost human readable at the very start or very end of the file and start deleting stuff and it should be possible to make something that plays in VLC but is missing key information like duration
For mkv/webm I'm not sure what the equivalent header information is called, but I imagine mkvtoolnix would be a good place to start.
Going from 5.43 to 4.7gb is about 86.55% size. if it's at 17,000 kbps that would mean you'd want the bitrate about 14,700(-ish). FFMpeg could certainly do this, but if you aren't already familar with using it you'll want to read throguh the documentation to learn how to specify codecs, bit-rates, etc.
If you're not an advanced level video editor and just want a quick solution I'd also reccomend checking out Handbrake. It has a pretty easy to use interface and a lot of options.
Not ffmpeg but sox - maybe put this in batch in folder containing only files to be joined:
sox "*.wav" "long.wav"
Joins in order if you name files 1.wav,2.wav,3.wav etc. If you want file multiple times just duplicate and number.
Don't use the embed URL. That is not the video data.
ffmpeg -i [URL shortened link] -c copy c:\video.mp4
Thanks for the idea. This is what type of response I got: https://hastebin.com/sesibikiki.cs
The custom firmware for the webcam thats providing these two streams really arent that great and im starting to question the endeavor.
VLC is stuttering? That's strange .. I'd try mpv https://mpv.io/ maybe u can share that file with me? via DM?
I do play files from NAS by Emby on NVIDIA Shield Pro, hardly any files causes issues with playback, all connected via 1Gb network.
https://hastebin.com/alixiqowen.bash
Hm, I tried it with multiple FLACs now and ffmpeg always detects the album art as "Stream #0:1: Video: mjpeg". So the problem is already in reading the image from FLAC. How to fix?
Hi!
Thanks for your help!
I think vstack works better. I was thinking of smth like this where the main content takes the most space and the other video takes a smaller space at the bottom. hstack would work too so I'll try both to figure out which layout is better?
Can you help me understand some of the code?
scale=-2:240
doing?[0:v], [vs], [vp], [1:v]
tags mean? What do they do?-preset:v slow
does the 'v' stand for very, as in -preset:veryslow
?-cq
is like -crf
?Thank you in advance!
I'm really impressed by all the things ffmpeg can do and there's a lot to learn and I can't wait so these questions are just me trying to understand it better
I'd suggest installing ffmpeg via Chocolatey. Works fine and it gets added to your PATH automatically. And you can easily check for/install updates with a few CLI commands. The chocolatey package installs the GPL build (4.3.1) as of today.
You might want to manually download the Vulkan builds if you have an AMD GPU.
On Windows, https://chocolatey.org/packages/ffmpeg can be used to install and manage prebuilt FFmpeg binaries. The choco installer automatically sets the necessary path etc (or it did the last time I had Windows box). This uses Zeranoe's build.
C:\ > choco install ffmpeg
ffplay
has no playlist capability. It is primarily used as a testbed for ffmpeg
. You could create a shell script with plenty of effort. I advise against it. You could consider a CLI-capable music player that handles playlists. mpv
does a good job: https://mpv.io .
That's really weird, especially since the G90T does support VP9 HW decode: https://www.mediatek.com/products/smartphones/mediatek-helio-g90-series
Try out VLC or Kodi 20 Alpha to see what happens: https://kodi.tv/download/android
No prob. Was going to add a blurb about the Shield, but I haven't tested how it handles these converted PGS subs. sub2bd should work as long as the Shield doesn't throw a fit about bizarre PGS subtitles - they're usually in one position, there are rarely more than one set on screen, etc. - all rules that get ignored by fan subbers.
FWIW, I bought my parents a Shield a few years ago to use as a Plex client, and I gave up and just used Kodi + Plex. I'm not a fan of Kodi's UI either, but I've actually never seen it after setting it up. When I open it, it launches the Plex add-on automatically.
Send me a PM if you want a test file that is sure to test the Shield's Plex app's PGS chops.
Ok. I still think you should try Handbrake and see if it meets your needs. Otherwise, this kind of work has a way of turning into needing a tweak here and a tweak there. And that's maybe even before you get to getting your ffmpeg settings the way you want them.
Everything you've asked for is quite do-able there, and falls squarely into the use case for Handbrake, and will let you experiment with out needing someone to tweak things for you if you find more changes you'd like as you get farther into it.
According to this page, it uses ffmpeg under the hood. It must come with it bundled because I have never had to install ffmpeg separately either.
https://handbrake.fr/docs/en/latest/technical/source-formats.html
> https://www.voidtools.com/forum/viewtopic.php?f=12&t=9787 > alpha, my bad
I used to use it all the time and while back something happened & I got rid.
Thanks. Got it. Its lovely.
Its doing MP4, WEBM, MKV, mp3 but not .FLV. Will report.
I was not able to find a PPA but seems like there is a snap package of ffmpeg that includes hardware acceleration. I haven't tried it, but looking at the screenshot it is compiled with --enable-nvenc
at least which enables encoding on Nvidia cards.
This page includes a nice usage example how to use nvenc
on ffmpeg
.
homebrew is a package manager for OSX, it's not that complicated of an installation ;)
Same as running apt
, dnf
, yum
or pacman
, depending on your linux distro.
​
That said, yes, this is a homebrew issue, not an ffmpeg issue.
/u/wurkaccount you can try brew doctor
, to see what the problem is. Then brew will try to tell you what to do from there. You can always try to brew reinstall ffmpeg
, which should (re)create the directory and relink in the process, or brew unlink ffmpeg && brew install ffmpeg
if it doesn't want to find ffmpeg on its own. Which solution works will depend on where the problem lies.
Which version of FFmpeg are you using? 3.4 ("Cantor") has many updated features including more filters. Remember that FFmpeg filters do not match any "standard" and CSS filters are determined by mathematical definitions. So the short answer is that you can't get a precise match using the two filtering methods. You can view the CSS standards here, which may help you match up better.
If I had a choice, I would use the CSS filters because they are supported by standards. The FFmpeg filters you choose now may be changed in future releases and patches. Using CSS would keep your videos looking consistent.
the problem is I am setting the channel source before. But I change the transcode profile from superfast the veryfast I am getting error( Unfortunately I can not see the error, only transcoding is not start. I am sharing the screenshot maybe this would better help to undertanstand.
P.S. The writer of panel does not answer to my questions. I am keeping to use it because it is really cheap even chepest sw transcoder panel I have ever seen. This config comes out when I select any transcode profile from panel but every profile comes with superfast. I would like to use faster profile because with superfast the stream quality is really weak.
A bit of a sidestep, but you may find this super helpful to start:
https://github.com/kcha/gopro_renamer
It’ll rename your video segments to much more user friendly names
Ffmpeg concat isn’t hard to do after that
With regards to MPlayer, from a quick Google it seems like MPlayer doesn't enable multi-channel playback by default, which may be it's insisting that there are only two channels. http://www.mplayerhq.hu/DOCS/HTML/en/advaudio-surround.html
By the way, if you want a smaller file size, I'd just extract the DTS core rather than convert to AC3.
What you need isn’t ffmpeg. Use streamlink . You still need to start it when you want it to start. But you can probably do an offset. But last time I tried, it would only go back 2 hours.
ffWorks is an excellent ffmpeg GUI for Mac:
It's a paid program, but there is a free trial. If you have all your files queued up at once, then the free trail might be enough for you.
I paid for it, and it was easily worth it. It's an excellent GUI, it allows you to either keep it simple or discover a ton of the hidden features of ffmpeg.
This program along with MakeMKV are easy worth paying for it you intend to archive a ton of DVDs and Blu-Rays.
The great thing is that the script can be run manually and it'll process everything in a directory for you.
Also, look into Sonarr. I used Sickbeard for a few years but switched. Sonarr is better overall IMO.
Wonderful! I just had the same problem as OP (and even posted right after them). MkvToolNix works great. And it's so much less of a hassle as you don't have to write the flags for mappings, metadata etc. yourself. Any need conversion etc. can be done afterwards with FFMPEG.
Many thanks!
I personally prefer using mkvtoolnix for concatenating videos.
You can either use their GUI tool or use the command mkvmerge
:
mkvmerge -q -o "<OUTNAME>.mkv" \ --chapter-language 'eng' \ --generate-chapters 'when-appending' \ --generate-chapters-name-template '<FILE_NAME>' \ --chapter-charset 'UTF8' \ <INPUT_FILES>
The above command will add additional chapters based on the filename (with the extension removed), but you can remove the 'generate-chapters' portions if you want to keep the chapters that already exist.
There are ways to add Metadata via ffmpeg but since you already converted to mkv it might be easier to just use mkvmerge to edit the language of audio and even subtitle. It's super easy and it has a windows GUI. Plus there is no encoding done and just save the mkv file once you are done and media info should show the updated information for the language and subtitle.
You should find the version for your operating system by following the link. There is an installer and executable version of mkvtoolnix. I personally use the standalone version but give it a try. It's super easy to edit mkv Metadata without encoding.
>Changing Format_Level, colour_range, transfer_characteristics without re-encoding the file?
The metadata, maybe, the actual stream characterstics, no.
This:
> I want to change / add the metadata to this - is it possible to change this data without re-encoding the video file? What are the commands I would need?
mkvpropedit, part of the mkvtoolnix might be able to do it, though I haven't tried. The underlying data stream would still be encoded at the parameters described originally though. So, it might play, but it might not, and you might get really weird artifacts during playback if it does play.
What is it you are hoping to accomplish?
The documentation clearly states that it's only supported for H.264.
You'll get mismatching framerate metadata with other codecs (bitstream vs. container) so it depends which one is preferred by the playback software/device.
> So it leads me to believe that MKV contains the metadata in a different format. Does anyone know which format it has? And how I can inject it?
I'd use MKVToolNix—its GUI has a header edtor that lets you set this type of metadata. It's not very user-friendly though so you might need to cross-reference the required values in the mkvmerge documentation
Try using MKVToolNixGUI. It has a metadata tool that allows you to add/edit metadata without creating a new output file.
https://mkvtoolnix.download/downloads.html
It only accepts mkv files but you can use ffmpeg to copy the audio/video stream to and from the mp4 container.
Have your ffmpeg output to .h265 instead of .mkv.
Then use the patcher tool
Then do like
ffmpeg -i patched.hevc -i audio.mp4 -map 0:v -map 1:a -c copy out.mkv
or use mkvtoolnix GUI to do the muxing after the fact https://mkvtoolnix.download/downloads.html#windows
I tried to figure out how to do this with ffmpeg and I know you can but the easiest way for me was to install mkvmerge and use MKVToolNix gui. Just drag your mkv and subtitles into the input window and hit the start multiplexing button.
If you put the youtube link into JDownloader2 you can choose between all the different resolutions available for download from youtube, I don't know if any of them are CFR, but if they are, that's the way to get it.
I use MPV and I know that it interprets BT.709 as BT.1886. However, MPV doesn't perform any gamma correction unless you explicitly enable it using --target-trc=<trc>
(unless the input is HDR, that is)
Here is the relevant portion from the documentation:
> --target-trc=auto > > Disable any adaptation, except for atypical transfers. Specifically, HDR or linear light source material gets automatically converted to gamma 2.2, while SDR content is not touched. (default)
It is feasible with ffmpeg, but I would rather do that using a video player, and I would suggest mpv, because it allows the best navigation through the video. Yo pause on the image you want to capture (space bar or left mouse button), you press s and the frame is saved.
Maybe the same would be doable with ffplay (you can navigate the file by right-clicking on the displayed video whose width corresponds with the total width of the video and you pause with the space bar), but I don't know the screen capture shortcut, if any (there's probably one, but little documented, as it often happens with ffmpeg).
If delay isn't an issue at all, just copy over the whole file before playing it.
Otherwise, mpv allows you to set the demuxer buffer size using --demuxer-max-bytes
so you could give it multiple gigabytes of RAM to buffer.
> Stream #0:0(eng): Video: h264 (High 10), yuv420p10le(tv, bt709/unknown/unknown, progressive), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
This is 10-bit video. 10-bit H.264 is very uncommon (pirates like to use it though) and not supported by a lot of software-/hardware-decoders. Either convert it to 8-bit or use a different playback software. (mpv, VLC etc.)
Very strange. If you omit the -nostats -loglevel 0
part, is there any interesting output?
Only things I can think of are trying a different container (.mkv or even muxing to a new .avi file) and see if the problem persist with those. You should also see if the problem also occurs on different players like mpv and VLC to rule it out as a player-specific issue.
You could also poke at the source and remuxed files with something like ffprobe -show_format -show_programs -show_streams -show_data
and examine the output to see what changed between the files.
I'm trying to write a WSL-Bash replacement for Beets and I'm running into some trouble with this. I'm suspecting this is the same problem that made Beets malfunction for me in some cases. Thanks!
I would honestly just use the original FLAC tools. You can make it generate replay gain side data like this:
flac -8 --verify --no-padding --replay-gain -e -f *.flac
(This will reencode all FLAC files in the current directory and add replay gain side data. Make sure to isolate every album in its own folder because FLAC will calculate both Album- and Track-replay-gain data)
here's another zip. There are three files: log timestamped 171810 is from my re-creating the output (I foolishly deleted it after doing it with your command above), log 172024 and the screenshot are from the last two commands you told me to run, respectively.
volume reported was -17dB (or close to it). Ran the second command, finally finished, still no audio. Here's a link to the log (it's zipped, its a large video so the log was almost 1GB). https://gofile.io/?c=unPSoa
Thanks for looking!
I checked your file and the MP4 contained is probably corrupted. Trying to remux it with ffmpeg doesn't work, but MKVToolNix managed to read it (and remux it to MKV) correctly. I believe MP4Box would work too.
Anyway, here's your file.
I planned to make the book free in April after one year but I completed one year in self-publishing in February end. So, I have made the ebook free early. The full-colour $34 paperback will continue to be available for purchase on Amazon. I finished the year with 20 books in my name and some other pseudonyms. This FFMPEG book has been my most popular book so I hope you buy the paperback or one of my other 19 titles.
The ePub ebook is on Dropbox because my host has been suffering DDOS attacks. My vsubhash.com domain is also transitioning. I will host the file on my site when things are more stable.
I had asked FFMPEG.org to list my book and some other FFMPEG books on their site but they have not done anything. I will ask them again after my domain has transitioned.
I'd consider doing this on an Nvidia Jetson. You can pick up a full Jetson TX2 dev kit from Amazon for $400. The Jetson also gives you hardware access via GPIO pins (which may or may not be relevant to your robotics use case).
Ebook link https://www.amazon.com/FFMPEG-Quick-Hacks-collection-quick-reference-ebook/dp/B087VZMFVK/
I have just uploaded the new update and it is locked on Amazon. I am unable to check when the free offer starts. I think it is 3 June 12.00 AM PDT.
I got the book reviewed by a FFmpeg developer Lou Logan and made his edits. Many thanks to him.
The ebook usually gets updated in a day.
The updated paperback will take one or two days to be live. Still do no buy it until I reduce the price from $29 to $22. I wanted to check extended markets and the price went north. There are no markets now thanks to the pandemic.
I would also like to thank Reddit. My other books are #1 Top Free in their respective categories now - Political Humour, Cartoons, etc.