Skip to content

Commit

Permalink
Merge pull request #13 from timvideos/carlfk
Browse files Browse the repository at this point in the history
More fixes to get the HDMI2USB working
  • Loading branch information
mithro committed Aug 31, 2015
2 parents 302c097 + 2eaa06e commit 31ee6ce
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dvsource-v4l2-other.py
Expand Up @@ -211,15 +211,16 @@ def launch_gstreamer():
# http://www.sciencemedianetwork.org/wiki/Tutorials/Video/Pixel_Aspect_Ratio
{"ntsc-4:3":
# Convert to 4:3 with non-square pixels (was 10.0/11 ~= 0.91, now 8.0/9 ~= 0.88)
"videoscale ! video/x-raw,width=720,height=480,pixel-aspect-ratio=\(fraction\)10/11 !",
"videoscale ! video/x-raw,width=720,height=480,pixel-aspect-ratio=\(fraction\)8/9 !",
"ntsc-16:9":
# Convert to 4:3 with non-square pixels (was 40.0/33 ~= 1.21, now 32.0/27 ~= 1.19)
"videoscale ! video/x-raw,width=720,height=480,pixel-aspect-ratio=\(fraction\)40/33 !",
# Convert to 16:9 with non-square pixels (was 40.0/33 ~= 1.21, now 32.0/27 ~= 1.19)
"videoscale ! video/x-raw,width=720,height=480,pixel-aspect-ratio=\(fraction\)32/27 !",
"pal-4:3":
# Convert to 4:3 with non-square pixels (was 59.0/54 ~= 1.09 == ITU-PAR, now 16.0/15 ~= 1.07 == NLE-PAR used by Final Cut / Adobe)
# I420 == works, Y41B == works, Y42B == not working
"videoscale ! video/x-raw,width=720,height=576,pixel-aspect-ratio=\(fraction\)16/15 !",
"pal-4:3":
# Convert to 4:3 with non-square pixels (was 118.0/81 ~= 1.46 == anamorphic 'ITU', now 64.0/45 ~= 1.42 == anamorphic 'NLE')
"pal-16:9":
# Convert to 16:9 with non-square pixels (was 118.0/81 ~= 1.46 == anamorphic 'ITU', now 64.0/45 ~= 1.42 == anamorphic 'NLE')
"videoscale ! video/x-raw,width=720,height=576,pixel-aspect-ratio=\(fraction\)64/45 !",
}["%s-%s" % (args.system, args.aspect)] +
" " +
Expand All @@ -231,9 +232,11 @@ def launch_gstreamer():
"videorate ! video/x-raw,framerate=\(fraction\)25/1 !",
}[args.system] +
" " +
# FIXME: Check which color space is needed by PAL verse NSTC.
# Convert to color space needed by dvswitch
"videoconvert ! video/x-raw,format=\(string\)I420 !" +
# For PAL, either I420 or Y41B works.
# For NTSC, only Y41B seems to work.
# Y42B doesn't seem supported by dvswitch at all.
"videoconvert ! video/x-raw,format=\(string\)Y41B !" +
" " +
["", "tee name=t ! "][args.display] +
" " +
Expand Down

0 comments on commit 31ee6ce

Please sign in to comment.