Comments (9)
Update: Just encoded one of my test images, 580KB, with libx265 and the resulting file.mp4 about 31MB, compared to 123MB with libx264rgb.
Update 2: Apparently I accidentally made it lossy, so I passed a lossless option, and now it's 63MB. Still better though, and it only takes 15 seconds to encode.
Update 3: WOW. Apparently, since libx265 isn't rgb, each pixel is a simple integer rather than a tuple of 3 integers, so we can massively simplify the decoding process. Decoding the pixels is now over 3x faster than it was in pure Python, and the speedups are probably almost as large in Cython.
from fvid.
Do you mind if I merge zfec error correction and a flag for using H265 into master? (I did the H265 flag yesterday)
from fvid.
Sounds good.
from fvid.
References:
https://www.videoconverterfactory.com/tips/h265vsh264.html
https://trac.ffmpeg.org/wiki/Encode/H.265
https://support.google.com/youtube/troubleshooter/2888402
from fvid.
Oh wow, this is cool! I'm not very experienced with video codecs, so I didn't even know there was a better option. I think this is a good idea. What happens if the program was to "try h265 first and default back to libx264rbg"? Does FFmpeg fail and quit by default when libx264rbg fails?
from fvid.
So yeah, ffmpeg would fail when it tries to decode a file with the wrong mime type. I'm not totally sure how to catch that fail, but I'm confident it could be done.
Edit: Fun fact: There's actually a newer, even better format called H.266, or VCC, but it was only standardized in July 2020, so not enough implementations yet for ffmpeg to use it.
from fvid.
Yesterday I was working on a project using a program called mediainfo to view file metadata on Linux. Looking up their project, it looks like it also supports mac and windows and we could use it to view video data like a codec and therefore make fvid support virtually any codec by reading that info prior to decoding. I'm willing to bet that ffprobe can do the same thing. If I get some time today I could look into that, but anyone else that is curious can try it too.
from fvid.
@AlfredoSequeida That's a possibility. I think it'd be better to just add an option for a user to be able to specify the codec they want that ffmpeg supports though.
from fvid.
@Theelgirl I'm definitely ok with the H265 flag and I think that zfec should be good too (good job on that by the way). My only concern about zfec is that with the current zip issue, which I haven't had time to look at, I haven't seen a successful decode form a compressed vid (like from YouTube). So we just have to remember to fix that before pushing out the next version to PyPI.
from fvid.
Related Issues (20)
- Fvid command not recognized HOT 4
- Proposal: Cython Support HOT 7
- PR Compatibility HOT 35
- GUI HOT 19
- After running command, nothing is returned, and it proceeds to a new line HOT 4
- Youtube HOT 6
- cannot import name 'main' from 'fvid' HOT 23
- Converting large files is not feasible due to high memory usage HOT 1
- Syntax error in line 121 in the fvid.py code HOT 2
- New version release HOT 12
- gzip CRC check fails HOT 6
- Close vunerabilities with pickle HOT 9
- Here are some ideas HOT 34
- No such file or directory: '_temp.mp4'
- How to download HOT 1
- No module named 'magic' HOT 6
- SyntaxError: invalid syntax HOT 8
- The system cannot find the file specified HOT 3
- [Bug] Output file on decoding is always "file.bin" HOT 30
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fvid.