Skip to content

Instantly share code, notes, and snippets.

@NeMO84
Created March 17, 2011 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeMO84/875255 to your computer and use it in GitHub Desktop.
Save NeMO84/875255 to your computer and use it in GitHub Desktop.
Remove place holder keys...
{"muxer"=>{"__content__"=>"mp4"}, "filters"=>{"scale_width"=>{"__content__"=>"640"}, "scale_height"=>{"__content__"=>"480"}, "frame_rate"=>{"__content__"=>"30.00"}}, "codecs"=>{"codec"=>[{"name"=>{"__content__"=>"H264"}, "bit_rate"=>{"__content__"=>"1200000"}}, {"name"=>{"__content__"=>"AAC"}, "bit_rate"=>{"__content__"=>"128000"}, "channels"=>{"__content__"=>"2"}}]}}
# I want to convert the above into
{"muxer"=> {"mp4"}, "filters"=> {"scale_width"=> "640", "scale_height"=> "480", "scale_frate_rate"=> "30.00"}, "codecs"=> {"codec"=>[{"name" => "H264", "bit_rate" => "1200000"},{"name" => "AAC","bit_rate" => "128000","channels" => "2"}]}}
# Essentially remove the "__content__" place holders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment