element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Wolfson Audio Stream with FFMPEG help
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 664 subscribers
  • Views 769 views
  • Users 0 members are here
  • wolfson
  • ffmpeg
  • raspberry_pi
  • raspberrypi
  • raspeberry_pi_accessories
Related

Wolfson Audio Stream with FFMPEG help

Former Member
Former Member over 11 years ago

Hello everyone. I've been able to get the card working as examples that people have shared here.  However, I would like to be able to combine the on board mics with the camera module to stream using FFMPEG.  Can anyone help with this? I thought I was close but I still get no audio.

 

Here is my latest command:

 

raspivid -t 0 -w 720 -h 405 -fps 25 -vf -b 500000 -o - | ffmpeg -i - -f arecord -r 44100 -c 2 -f S32_LE -vcodec copy -acodec aac -an -f flv -metadata streamName=myStream rtmp://[myserver]/live/myStream

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 11 years ago

    Hi,

     

    I also struggled many hours with such a thing, without success. Here is what I understood so far (Please anyone feel free to correct me if I made mistakes) :

    - ffmpeg is deprecated and avconv should be used (same features, same parameters)

    - I also tried with gstreamer

    - raspivid stream may not be synced with audio as the h264 format used is not timestamped

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Nicolas,

    I was able to get FFMPEG stream A/V but you are correct. The more I researched it there is no timestamp so FFMPEG can not do the sync. Due to the necessity of encoding the audio it becomes delayed from the h.264 video and is never in sync.

    I still have no solution for this. My hope is that someone smarter than me will answer this.

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    David,

     

    I would really be interested in knowing how you got this working, since I still had no chance to make it work on my side. Could you provide me with the command line ? It may also help other users in this situation.

     

    Thanks;

    Nicolas

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Here is the bash script I'm using. When I start my RPi it goes right into this and streams directly to my public streaming server (Wowza). I did spend the time to compile FFMPEG.  I have an image of this but I'm not sure I want to put it out on a public link from my server.

     

    I run a live streaming company specializing in Wowza. One of my sites is http://worshipmedia.tv and I could really use a solution like this for my company.  Right now I use IP cameras and that works well but it would be nice to brand my own solution if I could.

     

     

    #!
    clear
    
    #---------------------------------------------------------------------------
    # Audio/Video stream
    mkfifo temp.v
    raspivid -t 0 -w 360 -h 202 -fps 12 -g 60 -vf -hf -b 200000 -v -o temp.v & \
    arecord -f S32_LE -c 2 -r 44100 -D plughw:0,0 -B 0.1 | \
    ffmpeg \
        -i temp.v \
        -i - \
        -ab 32k \
        -ac 2 \
        -strict -2 \
        -c:v copy \
        -c:a aac \
        -report \
        -vsync 2 \
        -async 1 \
        -f flv -metadata streamName=myStream rtmp://[yourserverdomain]/live/myStream
    
    
    
    #---------------------------------------------------------------------------
    # Audio only stream
    #arecord -f S32_LE -c 2 -r 44100 -D plughw:0,0 | \
    #ffmpeg -i pipe:0 \
        #-acodec aac \
        #-ab 32k \
        #-ac 2 \
        #-strict -2 \
        #-f flv -metadata streamName=myStream rtmp://[yourserverdomain]/live/myStream
    
    
    
    
    #---------------------------------------------------------------------------
    # Video only stream
    #raspivid -t 0 -w 720 -h 405 -fps 25 -vf -b 500000 -o - | \
    #ffmpeg -i pipe:0 -c:v copy -f flv -metadata streamName=myStream rtmp://[yourserverdomain]/live/myStream








    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Thanks for your help.

     

    Unfortunately, I am not able to make it work. I tried your command lines, but I guess I need an rtmp server. I also tried to save the file as a mp4 or mkv file with no success : I do have audio, VLC detects a video track, but it is always black.

     

    Any Idea ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube