-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MissingFieldError("codec_name") #23
Comments
OK, I think I have a good idea what's going on here. Could you please run the following for me and post the JSON it outputs? ffprobe -v quiet -show_streams -of json ~/Downloads/file.mp4 I'll use that JSON to make sure I fix this problem correctly the first time. :-) Basically, what I need to do is mark some more of the following fields with /// An individual content stream within a video.
#[derive(Debug, RustcDecodable)]
#[allow(missing_docs, dead_code)]
pub struct Stream {
pub index: usize,
pub codec_name: String,
pub codec_long_name: Option<String>,
pub codec_type: CodecType,
pub codec_time_base: Fraction,
pub codec_tag_string: String,
pub codec_tag: String,
pub profile: Option<String>,
pub width: Option<usize>,
pub height: Option<usize>,
//has_b_frames
//sample_aspect_ratio
//display_aspect_ratio
pub pix_fmt: Option<String>,
pub level: Option<u32>,
pub sample_rate: Option<f64>,
pub channels: Option<usize>,
pub bits_per_sample: Option<u32>,
//avg_frame_rate
pub time_base: Fraction,
pub start_time: f64,
//duration
pub tags: Option<BTreeMap<String, String>>,
} ...so that |
fixed in #24 below is the json. I believe it may be because this mp4 file has some extra RTP streams that aren't used? maybe the upstream encoder put in some junk
|
This tends to break more often than other parts of substudy, so let's add some easy-to-use debug logging to help with problems like #23.
Seems if you use a format (mp4) other then MKV you get this error "MissingFieldError("codec_name")". However a simple convert works in ffmpeg. I wasn't sure if there is another way to get around this. I may try my hand at a PR on this, but have never done Rust ;) Great program btw, much easier then sub2srs
ffmpeg -i ~/Downloads/file.mp4 -vcodec copy -acodec copy ~/Downloads/out_file.mkv
The text was updated successfully, but these errors were encountered: