Skip to content
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

Need to support different video profiles #36

Closed
Wkkkkk opened this issue Aug 7, 2023 · 1 comment
Closed

Need to support different video profiles #36

Wkkkkk opened this issue Aug 7, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Wkkkkk
Copy link
Contributor

Wkkkkk commented Aug 7, 2023

Some existing problems are:

  • Browsers may handle video profile parsing differently. For example, only videos of constrained-baseline profiles can be played out in Safari now (while Chrome supports a larger range). Users from different platforms may find it inconvenient to use the tool or understand its behavior.
  • Support for H.265/HEVC is not complete yet. It's not clear yet why Chrome rejects H265 video.
@Wkkkkk Wkkkkk added the enhancement New feature or request label Aug 7, 2023
@Wkkkkk Wkkkkk self-assigned this Aug 7, 2023
@Wkkkkk
Copy link
Contributor Author

Wkkkkk commented Aug 7, 2023

To solve the problem, one possible way is to transcode the video from the SRT stream before connection. To do that, we can use commands:

## Generate a video stream of high profile
gst-launch-1.0 -v videotestsrc ! clockoverlay ! video/x-raw, height=360, width=640 ! videoconvert ! \
    x264enc tune=zerolatency ! video/x-h264, profile=high ! \
    mpegtsmux ! srtsink uri="srt://127.0.0.1:1234?mode=listener" wait-for-connection=false

## Transcode the stream into supported profile (e.g., constrained-baseline for Safari)
gst-launch-1.0 srtsrc uri="srt://127.0.0.1:1234?mode=caller" ! queue ! decodebin ! queue ! videoconvert ! \
    x264enc tune=zerolatency ! video/x-h264, profile=constrained-baseline ! \
    mpegtsmux ! srtsink uri="srt://127.0.0.1:1235?mode=listener" wait-for-connection=false

## Connect 
GST_DEBUG=1 cargo run --release -- -i 127.0.0.1:1235 -o 127.0.0.1:8888 -p 8000 -s caller | bunyan

## Play with WebRTC player, URL: 
http://localhost:8000/channel

This approach, however, does not apply to H265 video on Mac as 'x265enc' is not shipped into GStreamer SDK (on Mac).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant