GithubHelp home page GithubHelp logo

Comments (5)

winlinvip avatar winlinvip commented on August 29, 2024

Workaround: Utilize the recording feature of Oryx.

TRANS_BY_GPT4

from srs.

suzp1984 avatar suzp1984 commented on August 29, 2024

video_full_range_flag is belong to a sps parameter. But srs only support part of sps demux. Maybe I can add more sps demux/remux features to srs later.

To this question, the pixel format is determined by this way:

First, read sps vui parameters, to get sps->vui.video_full_range_flag;
https://github.com/FFmpeg/FFmpeg/blob/63697d3350b1975c05be126d466659885c09d2e1/libavcodec/h2645_vui.c#L62
Then, set color_range in AVContext to AVCOL_RANGE_JPEG or AVCOL_RANGE_MPEG by above value.
https://github.com/FFmpeg/FFmpeg/blob/63697d3350b1975c05be126d466659885c09d2e1/libavcodec/h264_slice.c#L1105
Then, get pix_fmt from the color_range.
https://github.com/FFmpeg/FFmpeg/blob/63697d3350b1975c05be126d466659885c09d2e1/libavcodec/h264_slice.c#L892-L895

So, the pix_fmt become AV_PIX_FMT_YUVJ420P, which is marked as deprecated in ffmpeg, if video_full_range_flag > 0.

from srs.

hieunv avatar hieunv commented on August 29, 2024

Thank @suzp1984 and @winlinvip,
I found the new thing.
I can pack the .mp4 file on camera by libmp4v2 with video_full_range_flag >0 and the video still can play on MAC/WIN/IOS
I guess the video_full_range_flag=0 using for TV, buildboard... so it don't need enough attribute, and Video players easily accept it.
The video player need more metadata on video header in case The video_full_range_flag > 0.
I used ffmpeg stream mp4 file pack by libmp4v2 to srs server by rtmp. And the file from DVR still can play on MAC/WIN/IOS.
The problem now, I haven't found a difference between playable files and non-playable files

from srs.

hieunv avatar hieunv commented on August 29, 2024

I attach file :
video-libmp4v2-3M.mp4 can play on default player of all OS, include Win/IOS/MAC

video-libmp4v2-3M.mp4

Camera streamed rtmp and saved by DVR mode with name original, that can't play on default video player of WIN/IOS/MAC

original.mp4

I didn't find diffirence thing beetwen 2 files

from srs.

suzp1984 avatar suzp1984 commented on August 29, 2024

goto srs/trunk folder.
make srs_mp4_parser.
./objs/srs_mp4_parser original.mp4 verbose
./objs/srs_mp4_parser video-libmp4v2-3M.mp4 verbose
The mp4 container details will be printed, I don't know every single bytes means, but they are different. Anyway, srs_mp4_parser maybe helpful to dig deeper.

And I don't think video-libmp4v2-3M.mp4 plays well in MacOS with QuickTime Player. Compare the ffplay with QuickTime Player, I found QuickTime Player only render top-left (around 1/4) picture compared with ffplay, and Quicktime Player is silent, no voice.

So video-libmp4v2-3M.mp4 still has problem.

from srs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.