EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / how to stream video and audio

how to stream video and audio

|

Microcontroller › Raspberry Pi › how to stream video and audio

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 3 months ago by Nikhil P.R..
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 18, 2015 at 10:12 am #3560
    Mohamed
    Participant

    how to stream video and audio from raspberry pi with less latency

    February 27, 2019 at 2:57 pm #15028
    Nikhil P.R.
    Participant
    Try this for audio
     
    1. Make sure you compile against this implementation / version of ortp 
    ortp-0.22.0.tar.gz
    Get it from here : http://download.savannah.nongnu.org/rel … p/sources/
     
     
    2. I changed the opus encoder / decoder to int16 from float – due to my audio devices was simple 
    16 bit cheep stuf. 
    changes to tx.c rx.c and device.c
     
     
    jakobsen@w520:~/work/trx/trx-0.3$ diff rx.c /home/jakobsen/work/friaudio/pi_node/src/trx/rx.c 
    73c73,74
    < float *pcm;
    —
    > //float *pcm;
    > opus_int16 *pcm;
    79c80,81
    < r = opus_decode_float(decoder, NULL, 0, pcm, samples, 1);
    —
    > r = opus_decode(decoder, NULL, 0, pcm, samples, 1);
    > // r = opus_decode_float(decoder, NULL, 0, pcm, samples, 1);
    81c83,84
    < r = opus_decode_float(decoder, packet, len, pcm, samples, 0);
    —
    > r = opus_decode(decoder, packet, len, pcm, samples, 0);
    > // r = opus_decode_float(decoder, packet, len, pcm, samples, 0);
    241c244,245
    < 
    —
    > 
    > 
    268a273
    > 
     
    jakobsen@w520:~/work/trx/trx-0.3$ diff tx.c /home/jakobsen/work/friaudio/pi_node/src/trx/tx.c 
    63c63,64
    < float *pcm;
    —
    > //float *pcm;
    > opus_int16 *pcm;
    91c92,93
    < z = opus_encode_float(encoder, pcm, samples, packet, bytes_per_frame);
    —
    > z = opus_encode(encoder, pcm, samples, packet, bytes_per_frame);
    > //z = opus_encode_float(encoder, pcm, samples, packet, bytes_per_frame);
    245,246c247,248
     
    jakobsen@w520:~/work/trx/trx-0.3$ diff device.c /home/jakobsen/work/friaudio/pi_node/src/trx/device.c 
    56c56
    < r = snd_pcm_hw_params_set_format(pcm, hw, SND_PCM_FORMAT_FLOAT);
    —
    > r = snd_pcm_hw_params_set_format(pcm, hw, SND_PCM_FORMAT_S16_LE); //SND_PCM_FORMAT_FLOAT);
  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Fun with AI and swordfish basic June 22, 2025
  • Simple LED Analog Clock Idea June 22, 2025
  • Is AI making embedded software developers more productive? June 22, 2025
  • Can I make two inputs from one?? June 21, 2025
  • Behlke swich June 21, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise