@related: [[gstreamer]] [[vlc]] [[freebox]] [[freeplayer]] [[mpeg1]]
==== transcode ====
gst-launch filesrc location="$in" \
! decodebin ! audioconvert ! ffenc_mp2 bitrate=320000 \
! ffmux_mpeg \
! filesink location="$out" .
==== freebox ====
Trying to create a file compatible with [[freeplayer]] like this one :
http://ia300124.us.archive.org/3/items/TrustedComputing/TrustedComputing_LAFKON_HIGH_mpeg1.mpg
w=720; h=576
w=640; h=480
w=320; h=240
w=480; h=360
w=800; h=600
out=/tmp/tmp.mpg
num_buffers=64
gst-launch \
videotestsrc num_buffers=${num_buffers} \
! videoscale ! video/x-raw-yuv, width=$w,height=$h,framerate=\(fraction\)25/1 \
! ffmpegcolorspace \
! ffenc_mpeg1video ! queue \
! ffmux_mpeg name=mux \
! filesink location=$out \
audiotestsrc \
! ffenc_mp2 \
! mux.
....*´¨ ) ¸.•´¸.•´¨) ¸.•*¨)¸.•´¨) ¸.•*¨)¸.•´¨) ¸.•*¨)¸.•´¸.•´¨) ¸.•*¨)¸.•´¨)¸.•*¨) (¸.•´ (¸.•´ .•´ : (´¸.•*´¯`*•-->
Then using vlc as a gateway, seems to work, but far than a real stream
/usr/bin/vlc --sout-standard-dst=212.27.38.253:1234 --sout-ts-pid-video=68 --sout-ts-pid-audio=69 --sout-ts-pid-spu=70 --sout-standard-access=udp --sout-standard-mux=ts --sout=#std --sout-ts-pcr=80 --sout-ts-dts-delay=400 --sout-transcode-maxwidth=720 --sout-transcode-maxheight=576 --extraintf=http --http-host=:8080 --http-src=/usr/share/freeplayer/http-fbx/ --m3u-extvlcopt --play-and-stop --no-play-and-stop --loop udp://@:1235 ouvaton.mpg
# pause
# prev
gst-launch videotestsrc num_buffers=${num_buffers} ! videoscale ! video/x-raw-yuv, width=$w,height=$h,framerate=\(fraction\)25/1 ! ffmpegcolorspace ! ffenc_mpeg1video ! udpsink port=1235 host=localhost
Now must set ts-pid, rtp etc but how ?
gst-launch videotestsrc num_buffers=${num_buffers} ! videoscale ! video/x-raw-yuv, width=$w,height=$h,framerate=\(fraction\)25/1 ! ffmpegcolorspace ! ffenc_mpeg1video ! udpsink port=1234 host=212.27.38.253