mendevi.encode¶
Perform encoding measures.
Functions
|
Transcode an existing video. |
|
Transcode a video file and store the result in the database. |
|
Return the ffmpeg encode cmd. |
|
Return the absolute target bitrate in kbit/s. |
Details
- mendevi.encode.encode(src: Path, **kwargs: dict) tuple[Path, str, str, dict[str]][source]
Transcode an existing video.
Parameters¶
- srcpathlib.Path
The source video file to be transcoded.
- **kwargsdict
Transmitted to
get_transcode_cmd().
Returns¶
- dstpathlib.Path
The transcoded video path. The stem contains the md5 hash of the file content.
- cmdstr
The ffmpeg command.
- logstr
The output generated by the cmd.
- activitydict[str]
The computeur activity during the transcoding process.
- mendevi.encode.encode_and_store(database: Path, env_id: int, src: Path, **kwargs: dict) None[source]
Transcode a video file and store the result in the database.
Parameters¶
- mendevi.encode.get_transcode_cmd(src: Path, dst: Path, **kwargs: dict) CmdFFMPEG[source]
Return the ffmpeg encode cmd.
- mendevi.encode.quality_to_rate(kwargs: dict[str]) int[source]
Return the absolute target bitrate in kbit/s.
Based on https://twitch-overlay.fr/quelle-connexion-internet-choisir-pour-streamer-sur-twitch/ and https://bitmovin.com/blog/video-bitrate-streaming-hls-dash/
You can plot the bitrate with: mendevi plot mendevi.db -x bitrate -y psnr -f ‘mode = “vbr”’
The flow margin is taken to be twice as small and twice as large as the recommendations.