-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Missing Video Metadata #351
Comments
These metadata are present for both files in your screenshot. I see nothing important missing. The only difference is the codec id, which is |
In the windows explorer, you can see the windows 10 is able to preview the file and read the metadata. |
The video files cannot be opened on:
It works fine on VLC. I have to transcode the video with Handbrake to make it work. |
Thank you for the details. I will investigate when I have some time (and currently I don't have access to any of the software that you listed which fail). For now, could you paste the result of In particular, I would like to know which diff --git a/app/src/recorder.c b/app/src/recorder.c
index 2e846e9..b13bb5a 100644
--- a/app/src/recorder.c
+++ b/app/src/recorder.c
@@ -63,25 +63,11 @@ SDL_bool recorder_open(struct recorder *recorder, AVCodec *input_codec) {
return SDL_FALSE;
}
-// In ffmpeg/doc/APIchanges:
-// 2016-04-11 - 6f69f7a / 9200514 - lavf 57.33.100 / 57.5.0 - avformat.h
-// Add AVStream.codecpar, deprecate AVStream.codec.
-#if (LIBAVFORMAT_VERSION_MICRO >= 100 /* FFmpeg */ && \
- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)) \
- || (LIBAVFORMAT_VERSION_MICRO < 100 && /* Libav */ \
- LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 5, 0))
- ostream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
- ostream->codecpar->codec_id = input_codec->id;
- ostream->codecpar->format = AV_PIX_FMT_YUV420P;
- ostream->codecpar->width = recorder->declared_frame_size.width;
- ostream->codecpar->height = recorder->declared_frame_size.height;
-#else
ostream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
ostream->codec->codec_id = input_codec->id;
ostream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
ostream->codec->width = recorder->declared_frame_size.width;
ostream->codec->height = recorder->declared_frame_size.height;
-#endif
ostream->time_base = (AVRational) {1, 1000000}; // timestamps in us
int ret = avio_open(&recorder->ctx->pb, recorder->filename, |
It seems the If block code is executed, libavcodec is 58.18.100
|
I copied the file with ffmpeg and it fixed the metadata issue.
|
@rom1v that video is working correctly on all video players/programs I've tried. |
Great, then I have a fix 🎉 |
Fixed on |
Thanks to my colleague @robUx4 who helped me a lot during the FOSDEM to fix this issue (and others which prevented recording to MKV, now it also works 🎉) |
Do you have an ETA for when this might be released? |
Hello, the recording videos are missing some metadata like length and frame width/height. VLC can play them normally, but if you try to look for videos details in windows 10, adobe premiere, and other video players. They can't read the metadata and some players cannot read the files.
It could be an encoding problem. I'm comparing a scrycpy video (test.mp4) and adb recording (adb video.mp4)
https://imgur.com/a/IuKqsTn
I hope this helps. Thanks!
The text was updated successfully, but these errors were encountered: