- dennis.bohn
- Posts: 1
- Joined: Sun Apr 26, 2020 8:48 pm
Transcode (h264/ac3 [http-livestream]) to (h264/aac [rtmp-server])
Hello,
I am using ffmpeg on my pc at the moment to transcode and send a http-livestream from my satellite-receiver to a private server.
It works very well so I was wondering, if it is also possible on my RaspberryPi 3.
I compiled ffmpeg with --enable-omx, --enable-omx-rpi and --enable-mmal for testing and as long as I didnt deinterlace and scale the video the transcoding worked very well.
But when I tried to deinterlace and scale the video, the framerate dropped to 5fps.
So I was wondering, if it would be possible with gstreamer. Unfortunately I had now success with gst-launch-1.0.
The following steps worked so far.
Save the http-livestream to a ts-file
Send a testvideo to my private server
But I have no clue how to build a command line for the following steps.
1. STREAM: Read live-stream over http
2. STREAM: Demux live-stream
3. VIDEO: Decode Video [h264, 25fps]
4. VIDEO: Deinterlace Video
5. VIDEO: Resize Video [1280x720]
6. VIDEO: Encode Video [h264, 2Mbit/s]
7. AUDIO: Decode Audio [ac3]
8. AUDIO: Encode Audio [aac, 128Kbit/s]
9. STREAM: Mux [flv]
10. STEAM: Send to rtmp-server
My last try to get at least video to work was this one.
But I get always the following warning
Best regards
Dennis
I am using ffmpeg on my pc at the moment to transcode and send a http-livestream from my satellite-receiver to a private server.
Code: Select all
ffmpeg -i http://xxx.xxx.xxx.xxx:8001/1:0:19:1519:455:1:C00000:0:0:0: -vf "yadif=0 ,scale=1280:720" -vcodec libx264 -vprofile high -preset slower -crf 22 -maxrate 2M -bufsize 4M -g 25 -acodec aac -strict -2 -f flv rtmp://my.server/hlsI compiled ffmpeg with --enable-omx, --enable-omx-rpi and --enable-mmal for testing and as long as I didnt deinterlace and scale the video the transcoding worked very well.
Code: Select all
ffmpeg -c:v h264_mmal -i http://xxx.xxx.xxx.xxx:8001/1:0:19:1519:455:1:C00000:0:0:0: -vcodec h264_omx -b:v 2M -acodec aac -strict -2 -f flv rtmp://my.server/hlsCode: Select all
ffmpeg -c:v h264_mmal -i http://xxx.xxx.xxx.xxx:8001/1:0:19:1519:455:1:C00000:0:0:0: -vf "yadif=0 ,scale=1280:720" -vcodec h264_omx -b:v 2M -acodec aac -strict -2 -f flv rtmp://my.server/hlsThe following steps worked so far.
Save the http-livestream to a ts-file
Code: Select all
gst-launch-1.0 souphttpsrc location='http://xxx.xxx.xxx.xxx:8001/1:0:19:1519:455:1:C00000:0:0:0:' is-live=true ! filesink location=video.ts -eCode: Select all
gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)I420, width=(int)640, height=(int)480' ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! flvmux streamable=true ! rtmpsink location=rtmp://my.server/hls1. STREAM: Read live-stream over http
2. STREAM: Demux live-stream
3. VIDEO: Decode Video [h264, 25fps]
4. VIDEO: Deinterlace Video
5. VIDEO: Resize Video [1280x720]
6. VIDEO: Encode Video [h264, 2Mbit/s]
7. AUDIO: Decode Audio [ac3]
8. AUDIO: Encode Audio [aac, 128Kbit/s]
9. STREAM: Mux [flv]
10. STEAM: Send to rtmp-server
My last try to get at least video to work was this one.
Code: Select all
gst-launch-1.0 -v souphttpsrc location='http://xxx.xxx.xxx.xxx:8001/1:0:19:1519:455:1:C00000:0:0:0:' is-live=true ! decodebin ! tsdemux ! h264parse ! omxh264dec ! videoconvert ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! flvmux streamable=true ! rtmpsink location=rtmp://my.server/hlsIs this even possible with gst-launch-1.0 on a RaspberryPi 3?mpegtspacketizer mpegtspacketizer.c:2331:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp
Best regards
Dennis
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion