FFmpegfs Fuse Multi Media Filesystem 2.14
Todo List
Member Cache_Entry::destroy ()

Implement delete later mechanism

Return true when deleted, false if kept for delete later

Member create_bluray_virtualfile (BLURAY *bd, const BLURAY_TITLE_INFO *ti, const std::string &path, const struct stat *statbuf, void *buf, fuse_fill_dir_t filler, bool is_main_title, bool full_title, uint32_t title_idx, uint32_t chapter_idx)
We actually calculate the overall Blu-ray bitrate here, including all audio streams, not just the video bitrate. This should be the video bitrate alone. We should also calculate the audio bitrate for the selected stream.
Member create_cuesheet_virtualfile (LPCVIRTUALFILE virtualfile, Track *track, int titleno, const std::string &path, const struct stat *statbuf, int trackcount, int trackno, const std::string &aperformer, const std::string &album, const std::string &genre, const std::string &date, int64_t *remainingduration, LPVIRTUALFILE *lastfile)
probe original file for info
Member create_dvd_virtualfile (const ifo_handle_t *vts_file, const std::string &path, const struct stat *statbuf, void *buf, fuse_fill_dir_t filler, bool full_title, int title_idx, int chapter_idx, int angles, int ttnnum, int audio_stream, const AUDIO_SETTINGS &audio_settings, const VIDEO_SETTINGS &video_settings)
We actually calculate the overall DVD bitrate here, including all audio streams, not just the video bitrate. This should be the video bitrate alone. We should also calculate the audio bitrate for the selected stream.
Member FFmpeg_Transcoder::add_albumart_stream (const AVCodecContext *input_codec_ctx)
Add support for album arts
Member FFmpeg_Transcoder::add_stream (AVCodecID codec_id)
FFmpeg actually can transcode while presevering the SAR. FFmpegfs rescales to fix that problem. Need to find out what I am doing wrong here...
Member FFmpeg_Transcoder::decode_frame (AVPacket *pkt)
Calling decode_video_frame until all data has been used, but for DVDs only. Can someone tell me why this seems required??? If this is not done some videos become garbled. But only for DVDs...

With fix: all DVDs OK, some Blurays (e.g. Phil Collins) not...
With fix: all DVDs shitty, but Blurays OK.

Applying fix for DVDs only.
Member FFmpeg_Transcoder::flush_delayed_subtitles ()
Implement flush_delayed_subtitles() if required
Member FFmpeg_Transcoder::get_hw_decoder_name (AVCodecID codec_id, std::string *codec_name=nullptr) const
HWACCEL - Supported formats
Member FFmpeg_Transcoder::get_hw_mmal_decoder_name (AVCodecID codec_id, std::string *codec_name) const

mmal VC1 hardware acceleration not working. Probably because I have not bought a key...

INFO : [/root/test/in/Test_1440x576_WVC1_6Mbps.wmv] Hardware decoder acceleration active using codec 'vc1_mmal'.
INFO : [/root/test/in/Test_1440x576_WVC1_6Mbps.wmv] Hardware decoder acceleration enabled. Codec 'vc1_mmal'.
mmal: mmal_vc_port_info_set: failed to set port info (2:0): EINVAL
mmal: mmal_vc_port_set_format: mmal_vc_port_info_set failed 0x6e54c560 (EINVAL)
mmal: mmal_port_disable: port vc.ril.video_decode:in:0(WVC1)(0x6e54c560) is not enabled
mmal: mmal_port_disable: port vc.ril.video_decode:out:0(0x6e546660) is not enabled
mmal: mmal_port_disable: port vc.ril.video_decode:ctr:0(0x6e54c240) is not enabled
ERROR : [/root/test/in/Test_1440x576_WVC1_6Mbps.wmv] Failed to open video input codec for stream video (error '0').
ERROR : [/root/test/in/Test_1440x576_WVC1_6Mbps.wmv] Failed to open video codec (error 'Unknown error occurred').

mmal MPEG1 hardware acceleration not working. Probably because I have not bought a key...

INFO : [/root/test/in/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).mpeg] Transcoding to ts.
INFO : [/root/test/in/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).mpeg] Hardware decoder acceleration active using codec 'mpeg2_mmal'.
INFO : [/root/test/in/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).mpeg] Hardware decoder acceleration enabled. Codec 'mpeg2_mmal'.
mmal: mmal_vc_port_info_set: failed to set port info (2:0): EINVAL
mmal: mmal_vc_port_set_format: mmal_vc_port_info_set failed 0x6b985440 (EINVAL)
mmal: mmal_port_disable: port vc.ril.video_decode:in:0(MP2V)(0x6b985440) is not enabled
mmal: mmal_port_disable: port vc.ril.video_decode:out:0(0x6b985890) is not enabled
mmal: mmal_port_disable: port vc.ril.video_decode:ctr:0(0x6b94db90) is not enabled
ERROR : [/root/test/in/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).mpeg] Failed to open video input codec for stream video (error '0').
ERROR : [/root/test/in/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).mpeg] Failed to open video codec (error 'Unknown error occurred').
ERROR : [/root/test/out/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).ts] Transcoding exited with error.
ERROR : [/root/test/out/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).ts] System error: (5) Input/output error
ERROR : [/root/test/out/En Vogue - Don-t Let Go (Love) (Official Music Video) (mpeg2).ts] FFMpeg error: (-1313558101) Unknown error occurred

Member FFmpeg_Transcoder::get_hw_vaapi_codec_name (AVCodecID codec_id, std::string *codec_name) const
fixit, MPEG-1 decoding does not work...
Member FFmpeg_Transcoder::open_output_frame_set (Buffer *buffer)
Make frame image compression rate command line settable
Member FFmpeg_Transcoder::open_subtitles ()
Add text to bitmap conversion.
Member FFmpeg_Transcoder::produce_audio_dts (AVPacket *pkt)
Is this a FFmpeg bug or am I too stupid?
OPUS is a bit strange. Whatever we feed into the encoder, the result will always be floating point planar at 48 K sampling rate.
For some reason the duration calculated by the FFMpeg API is wrong. We have to rescale it to the correct value. Same applies to mpegts, so let's rescale.
Member FFmpeg_Transcoder::read_decode_convert_and_store (int *finished)
Cue sheet track: Must check video stream, too and end if both all video and audio packets arrived. Discard packets exceeding duration.
Member FFmpeg_Transcoder::start_new_segment ()
Set reasonable size here
Member FFmpeg_Transcoder::video_size (size_t *filesize, AVCodecID codec_id, BITRATE bit_rate, int64_t duration, int width, int height, bool interleaved, const AVRational &framerate)
AV1 prediction has not been tested yet
Member ffmpegfs_getattr (const char *path, struct stat *stbuf)
Calculate correct file size for frame image in set
Member ffmpegfs_readdir (const char *path, void *buf, fuse_fill_dir_t filler, off_t, struct fuse_file_info *)
Calculate correct file size for frame image in set
Member find_original (std::string *filepath)
This probably won't work, need to redo "Fallback to old method"
Member is_device (__attribute__((unused)) const AVClass *avclass)
Currently always returns 0. Must implement real check.
Member kick_next (LPVIRTUALFILE virtualfile)

Will work only if transcoding finishes within timeout. Probably remove or raise timeout here.

Disable timeout

Member parse_find_best_audio_stream ()
Returning 0 is not necessarily the best match. Probably better to parse. For "The life of Brian", e.g., this is the Hungarian audio track. No big deal, though, I can recite mostly all dialogs in English and German (and Latin :), but should be fixed anyway.
Member parse_find_best_video_stream ()
Returning 0 is not necessarily the best match. Probably better to parse. Most DVDs contain only one video track anyway, so this does not hurt at the moment.
Member VcdIO::duration () const override
Implement duration of video CD chapters