Comments (6)
the --select-streams option of mp4-dash-encode.py should allow you to ignore the data streams in your input video.
(I also forgot to mention that mp4fragment needs to be in your path, as the encoding script will fragment the video files after encoding)
from bento4.
The typical encoding workflow is to configure an encoder/transcoder to produce one file per bitrate, in a way that guarantees the alignment of GOPs (Group Of Picture), so that a valid, aligned, set of DASH segments can be made. Some encoders can produce files that are already in fragmented-mp4 form, but some don't (in which case mp4fragment is used to fragment the encoder output).
It isn't always easy to constrain encoders/transcoders to produce outputs with fixed GOP sizes (encoders try to be smart, with features like automatic scene-cut detection, etc.), but it is necessary. Some encoders are sophisticated enough to know about multi-bitrate encoding right from the start, which is more efficient than doing multiple single-bitrate encodings.
The simple utility mp4-dash-encode.py included in the Bento4 distribution shows how this can be done with ffmpeg (both for h.264 and hevc).
from bento4.
when I run that tool, I get an error:
➜ builds git:(master) ✗ py ../Source/Python/utils/mp4-dash-encode.py -b 5 frag_bunny.mp4
ERROR: binary tool failed with error 1
I get the feeling that this has to do with me not installing the binary tools, or having them in my path. Or not having the option for --exec-dir=.
like with Source/Python/utils/mp4-dash.py.
Anyways, I'm giving a talk next week on MSE that will be live streamed from air.mozilla.org, and I plan on plugging these great FOSS tools! https://air.mozilla.org/tech-talk-3/
from bento4.
mp4-dash-encode.py needs to run ffmpeg, so you'll need that to be in your path.
You can see a detailed report on that the 'binary tool error' is exactly here by running the tool with the '-v -d' options (verbose and debug).
That tools hasn't received a lot of testing, it is something that I use myself regularly, but I always have the same settings/patterns, so there are probably a lot of unexplored combinations.
from bento4.
Data stream encoding not supported yet (only streamcopy)
https://pastebin.mozilla.org/8836681
ffmpeg and ffprobe are in my path. both are version 2.6.3.
hmm, I have libfdk_aac:
➜ builds git:(master) ✗ ffmpeg -codecs 2>/dev/null| grep aac
DEA.L. aac AAC (Advanced Audio Coding) (decoders: aac libfdk_aac ) (encoders: aac libfdk_aac libvo_aacenc )
D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
from bento4.
Looks like I have to play around with muxing. I was able to edit the first command that ran to:
➜ builds git:(master) ✗ ffmpeg -i "bunny.mp4" -strict experimental -codec:a libfdk_aac -ac 2 -ab 128k -preset slow -map_metadata -1 -codec:v libx264 -profile:v baseline -force_key_frames 'expr:eq(mod(n,72),0)' -bufsize 500k -maxrate 750k -x264opts rc-lookahead=72 -s 256x144 -f mp4 video_00500.mp4_ -map 0:0 -map 0:1
which worked. Ah, if I strip out the two unsupported streams:
➜ builds git:(master) ✗ ffmpeg -i bunny.mp4 -map 0:0 -map 0:1 -c copy bunny_clean.mp4
➜ builds git:(master) ✗ py ../Source/Python/utils/mp4-dash-encode.py -b 5 bunny_clean.mp4
➜ builds git:(master) ✗ py ../Source/Python/utils/mp4-dash-encode.py -b 5 bunny_clean.mp4
/bin/sh: mp4fragment: command not found
ERROR: binary tool failed with error 127
➜ builds git:(master) ✗ PATH=$PATH:. py ../Source/Python/utils/mp4-dash-encode.py -b 5 bunny_clean.mp4
ahoy mateys, were in business!
from bento4.
Related Issues (20)
- Many crashes found in Bento4 through fuzzing
- AddressSanitizer: heap-buffer-overflow in mp42aac
- Update dashif:laurl to dashif:Laurl per latest specification
- C++ 20 support ? HOT 3
- HLS with multiple audio channels: mp4hls creates additional "random" audio channels. Why is that? HOT 2
- HDR10Plus signaling issue HOT 1
- Packaging DASH stream with time based index without splitting mp4 file HOT 3
- AddressSanitizer: heap-buffer-overflow in mp42aac
- mp4dump decodes `senc` box incorrectly for non-constant IV
- DRM: Apply different Content Key to different tracks and renditions HOT 5
- mp4decrypt can decrypt aac sample-aes? HOT 1
- mp4mux ERROR: unsupported input type 'C' HOT 2
- Multiple vulnerabilities exist in mp4edit
- SEGV ASAN in mp4decrypt
- AddressSanitizer: FPE in mp42aac
- Memory leaks in Ap4DataBuffer.cpp:210:28 (v1.6.641)
- [REQ] add a (GH-compliant) license file
- mp42ts : ac-4 "Error: audio codec not supported" HOT 2
- How to watch the contents of NowTV using Linux
- new release with C++20 compatibility?
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 bento4.