RF HDTV Modulator for DVHS VCR with built in ATSC tuner - Page 6 - AVS Forum
Forum Jump: 
 4Likes
Reply
 
Thread Tools
post #151 of 158 Old 11-09-2014, 03:50 PM
Member
 
Join Date: Jul 2014
Location: 45'N 73'W
Posts: 34
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 5
Quote:
Originally Posted by cubsking99 View Post
Are you transcoding the video or just stream copying it?
Transcoding but would prefer copying if possible and then packetize the output.

The open caster manual used ffmpeg to extract stream and then seemed to use x264 (patched) to packetize it. But doing so still took 30% of my CPUs. When I tried all 3 cams, the CPUs were at 100%. Note that this is a virtual machine but still, even on bare bone, I'm sure it'd be sucking a lot of CPU.

So, yeah, my goal is copy if possible and then chunk it up (es -> pes -> ts -> mux -> atsc).

Steph
stefvie2k is online now  
Sponsored Links
Advertisement
 
post #152 of 158 Old 11-10-2014, 08:17 AM
Member
 
cubsking99's Avatar
 
Join Date: Dec 2005
Posts: 15
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 10
Quote:
Originally Posted by stefvie2k View Post
Transcoding but would prefer copying if possible and then packetize the output.

The open caster manual used ffmpeg to extract stream and then seemed to use x264 (patched) to packetize it. But doing so still took 30% of my CPUs. When I tried all 3 cams, the CPUs were at 100%. Note that this is a virtual machine but still, even on bare bone, I'm sure it'd be sucking a lot of CPU.

So, yeah, my goal is copy if possible and then chunk it up (es -> pes -> ts -> mux -> atsc).

Steph
I don't think you need to re-encode to do it. Try this:

Code:
ffmpeg -re -i SOURCE_URL -c:v copy -c:a copy -f mpegts
udp://127.0.0.1:1234?pkt_size=188&buffer_size=65535
You can use the pkt_size directive on RTP or UDP streams coming from ffmpeg. For more info, see here:

https://www.ffmpeg.org/ffmpeg-protocols.html

Hope that helps!

Mark
cubsking99 is offline  
post #153 of 158 Old 11-10-2014, 08:09 PM
Member
 
Join Date: Jul 2014
Location: 45'N 73'W
Posts: 34
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 5
Quote:
Originally Posted by cubsking99 View Post
I don't think you need to re-encode to do it. Try this:

Code:
ffmpeg -re -i SOURCE_URL -c:v copy -c:a copy -f mpegts
udp://127.0.0.1:1234?pkt_size=188&buffer_size=65535
You can use the pkt_size directive on RTP or UDP streams coming from ffmpeg. For more info, see here:

https://www.ffmpeg.org/ffmpeg-protocols.html

Hope that helps!

Mark
Thanks... but I managed to get it to work with no transcoding. Basically, I'm going from my IP CAM's H264/AVC Part 10 stream to mpeg transport stream. Then I extract the video PES out of the TS and re-mux it into my ATSC transport stream with all my other PIDs.

...
ffmpeg -re -rtsp_transport tcp -i "rtsp://admin:12345@cam1.local:554/Streaming/Channels/1" -map 0:0 -an -c:v copy -streamid 0:65 -bsf dump_extra -y input.ts &
ts2pes input.ts 65 > video.pes &
...

... PID 65 is my Video stream defined as H264/AVC (0x1b) so I'm now able to broadcast my IP CAM in 1080P in H264 to my TVs.

Again, once I'm all done with my testing, I'll upload all my scripts to GitHub.

Steph
stefvie2k is online now  
post #154 of 158 Old 11-22-2014, 05:57 AM
Member
 
Join Date: Jul 2014
Location: 45'N 73'W
Posts: 34
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 5
So Trip, did you get your stuff working?

JamesMHC, can you check your private messages?
stefvie2k is online now  
post #155 of 158 Old 11-22-2014, 08:59 PM
AVS Addicted Member
 
Trip in VA's Avatar
 
Join Date: Jun 2003
Location: Alexandria, VA, US | Age: 26
Posts: 14,467
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 105 Post(s)
Liked: 67
Send a message via AIM to Trip in VA Send a message via Yahoo to Trip in VA
Yes, I've successfully piped LPB through the house via your software. I was tinkering with my dish again today and have a borderline signal on OETA which means I should be close to having a signal good enough to try sending that one out as well.

I look forward to future developments!

- Trip

N4MJC

Comments are my own and not that of the FCC (my employer) or anyone else.

RabbitEars

"Ignorance and prejudice and fear walk hand in hand..." - Rush "Witch Hunt"

Trip in VA is offline  
post #156 of 158 Old 11-24-2014, 05:05 PM
Member
 
cubsking99's Avatar
 
Join Date: Dec 2005
Posts: 15
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 10
Quote:
Originally Posted by stefvie2k View Post
my Video stream defined as H264/AVC (0x1b) so I'm now able to broadcast my IP CAM in 1080P in H264 to my TVs.
So if you're leaving it H264, are your TVs able to natively show that or do you have something else decoding the stream to display?

I'm looking forward to seeing your scripts and source when you can get them posted...
cubsking99 is offline  
post #157 of 158 Old 11-25-2014, 07:31 PM
Member
 
Join Date: Jul 2014
Location: 45'N 73'W
Posts: 34
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 5
Quote:
Originally Posted by cubsking99 View Post
So if you're leaving it H264, are your TVs able to natively show that or do you have something else decoding the stream to display?

I'm looking forward to seeing your scripts and source when you can get them posted...
Yeah, my Samsung Smart TV (series 6 2013 model) is able to decode the h264 stream, my old Sharp and Samsung TV/Monitor aren't able to.

I'm a bit busy lately because my son is having an asthma flare-up... but hopefully I'll be able to post this up soon...

Here's the ffmpeg/x264 script that I used to generate the test pattern.

Code:
~/bin/ffmpeg -v 0 -re -f lavfi -i "smptehdbars=size=1920x1080:rate=$video_frame_rate" \
  -vf drawtext="fontsize=15:fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf:timecode='00\:00\:00\:00':rate=$video_frame_rate:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=940-text_w/2:y=650" -c:v rawvideo -an -f yuv4mpegpipe -y video.y4m &

~/bin/x264 --profile baseline --level 4.0 --nal-hrd cbr --vbv-bufsize 200 --bitrate 720 --keyint 12 --vbv-init 0 -o video.pes video.y4m &
stefvie2k is online now  
post #158 of 158 Old Today, 09:54 PM
Member
 
Join Date: Jul 2014
Location: 45'N 73'W
Posts: 34
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 5
Hi All,

I've push new version of my program along with the source code onto the GitHub site at https://github.com/stefvie2k/HDTV998Server

Enjoy,

Steph
stefvie2k is online now  
Reply HDTV Technical

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off